tensorflow: tensorflow does not build on macOS
Click to expand!
Issue Type
Bug
Source
source
Tensorflow Version
2.11.0
Custom Code
No
OS Platform and Distribution
macOS 12.6.1 21G217 x86_64
Mobile device
No response
Python version
3.10, 3.9, 3.8
Bazel version
5.3.2
GCC/Compiler version
Xcode 14.1 14B47b
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
I am trying to update the MacPorts distribution of tensorflow. It fails to build with the latest version 2.11.0. The build uses Xcode.
Related:
Standalone code to reproduce the issue
sudo port -pNc install py310-tensorflow
The MacPorts build recipe has worked up until the last version or so: https://github.com/macports/macports-ports/blob/master/python/py-tensorflow/Portfile
### Relevant log output
```shell
:debug:build system -W /opt/local/var/macports/build/_opt_local_ports_python_py-tensorflow/py310-tensorflow/work/tensorflow-2.11.0: PATH=/opt/local/var/macports/build/_opt_local_ports_python_py-tensorflow/py310-tensorflow/work/bazelwrap:/opt/local/libexec/bazel/bin:/opt/local/var/macports/build/_opt_local_ports_python_py-tensorflow/py310-tensorflow/work/bin:/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin BAZEL_SH=/bin/bash CC_OPT_FLAGS=-march=x86-64 /opt/local/libexec/bazel/bin/bazel --max_idle_secs=10 --output_user_root=/opt/local/var/macports/build/_opt_local_ports_python_py-tensorflow/py310-tensorflow/work/bazel_build fetch //tensorflow/tools/pip_package:build_pip_package
…
:info:build ld: malformed trie, childNodeOffset==0 file 'bazel-out/darwin-opt/bin/_solib_darwin_x86_64/libtensorflow_Spython_S_Upywrap_Utensorflow_Uinternal.so'
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build Error in child process '/usr/bin/xcrun'. 1
:info:build external/local_config_cc/cc_wrapper.sh: line 69: 75369 Abort trap: 6 "$(/usr/bin/dirname "$0")"/wrapped_clang "$@"
:info:build Target //tensorflow/tools/pip_package:build_pip_package failed to build
:info:build INFO: Elapsed time: 7166.337s, Critical Path: 421.62s
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (5 by maintainers)
@freedomtan is exactly right. I went ahead and documented the steps I followed here Building Tensorflow and Tensorflow Text on a M1 Mac