-
Notifications
You must be signed in to change notification settings - Fork 74k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tensorflow does not build on macOS #58805
Comments
@essandess Could you make sure to follow the instructions mentioned here and check the tested build configurations . |
That’s exactly what I have done. The failed build command provided above is exactly that specified in your link. It worked with previous versions of I’m simply trying to update the MacPorts Portfile that builds from source, and this fails at the end in with a linker failure, noted above and the other issues reported online. |
@essandess FYR, as I commented before in #58368 (comment), it's likely a linked (ld) or linker+compiler problem. I replaced ld in Xcode 14.x with the one from Xcode 13.x, then I can successfully build it. |
Thanks. Generally there's only the latest available Xcode available on macOS, but there is $ which ld
/opt/local/bin/ld
$ port provides `which ld`
/opt/local/bin/ld is provided by: ld64 Clearly, |
I tried setting |
I don't think bazel uses a different linker. Yes, on my mac, I have
And
That why I replaced the You can find older ld binaries in Xcode 13.x or Command Line Tools 13.x from Apple Developer site. |
@freedomtan is exactly right. I went ahead and documented the steps I followed here Building Tensorflow and Tensorflow Text on a M1 Mac |
That's awesome and everything for hacking one's own personal TF binary. But if one is trying to accomplish what I'm trying to accomplish: a general build formula that can be used to provide TF binaries across a suite of platforms in the MacPorts package manager, then not so much. Much better if this upstream would test the releases against up-to-date build configurations and avoid this whole reporting and hacking cycle. |
Hi, Your issue seems similar to the issue here #58368, could you please close this issue and track the progress in that thread, since it is already involving lots of discussion. |
That’s prebuilt for specific python versions, and doesn’t cover all of them. This issue is about TF failing to compile from source on macOS. |
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you. |
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
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
The text was updated successfully, but these errors were encountered: