-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Undefined symbols: ___truncsfbf2
when building on macOS
#52067
Comments
They are building their clang wrong :| |
By "they", do you mean Apple? |
No, I mean macports, I was able to reproduce this locally, so homebrew is wrong here as well |
I see llvm/llvm-project@489bda6 but I'm not sure @fxcoudert any idea? |
I'm confused that this generates a libcall to |
I'm puzzled by this statement. I don't see that we do any special treatment for this symbol, or anything related, in our LLVM build. But we do ship LLVM 17, and I seem to find only LLVM 16 on Yggdrasil, so maybe that's a difference in behaviour between those two versions? |
I think this is some weirdness happening with compiler-rt + apple. Where they aren't building the bf16 builtins even though it seems they should be built. |
I'm not expert in the bf16 type, but the behaviour of the compilers seems consistent:
So if things worked before, either:
|
That's not how our intrinsics convert to julia/src/runtime_intrinsics.c Lines 355 to 357 in 137783f
Or at least that's the intention. |
FWIW, I also encountered this after a
|
So the Should our build system try to detect if the user has Xcode (or at least the Xcode Command Line Tools) installed, and if so use that |
Changing to |
The issue is more subtle than that. The issue is that the macports/brew clang support |
llvm/llvm-project#84192 should fix it. But it will need to trickle down to distributions. So we probably need to bump the guard for |
use Command Line Tools for Xcode compiler clang++ |
This comment was marked as duplicate.
This comment was marked as duplicate.
This issue is currently blocking an update for |
This code needs an |
@gbaraldi could you provide a hint what "this code" is, i.e. which code needs that |
julia/src/runtime_intrinsics.c Lines 355 to 376 in 2e3628d
I know compilers make a complete mess of this |
I don't think it is a problem related to macOS. The same issue exists on Linux. Try to compile the latest Julia's code using LLVM 19. You will get similar error messages:
|
For what it's worth, getting the same issue compiling HDF5 on an Intel-based Mac with the latest versions of Xcode and CLT installed (with either selected). I did update Homebrew today so not sure if there was a dependency in there that could be causing this. Edit: On another Intel-based machine, I was able to verify that the issue was not with CLT nor Homebrew as neither have been updated for about 6 months. Rolling back to a previous version of the HDF5 source worked, so it's an issue with implementation (not properly conditioning for Intel-based machines, I believe). |
I am building the current master version of Julia from scratch on macOS (
Darwin redshift.pi.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:27 PDT 2023; root:xnu-10002.41.9~6/RELEASE_X86_64 x86_64 i386 Darwin
). I see this error:I have both GCC and Clang installed via MacPorts.
It seems that Julia uses this Clang (
which clang++
:/opt/local/bin/clang++
). I checked, and it seems that only GCC provides this function (/opt/local/lib/gcc13/gcc/x86_64-apple-darwin23/13.2.0/libgcc.a:truncsfbf2.o: 0000000000000000 T ___truncsfbf2
), but Clang does not provide it.The text was updated successfully, but these errors were encountered: