-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Can't link libomptarget.so.16 because of missing symbols #61693
Comments
@llvm/issue-subscribers-openmp |
I have tried the CMake command and I think you likely mismatch libstdc++ and libc++.
|
How would I check that it is correctly configured? Like how do I make sure that clang uses lib++? |
I built the clang using
I specifically am telling clang to use libc++, why would it be trying to use libstdc++? |
This part is confusing, that file should be provided by LLVM's |
You mean the pre-existing one, or the just-built one? |
It should be pulling it form the current LLVM build since it's added via |
Is this what you mean?
|
It's definitely linking in |
@jhuber6 I went into the lib directory inside of the build directory and tried that and I get this:
Does that tell you anything? |
If the grep gives you anything more than one line and that line is not an error, it should tell us that this symbol is included there... Currently facing similar errors for compiling zig (stage zig2)... Wait, in the zig wiki they explicitly say that only builds with exact same compilers are working. Perhaps that's also true for llvm (I think if you use ld instead of lld and llvm-ar or whatever it could error). Could you say me (or us) what tools you use exactly? |
I was seeing similar link errors while building openmp as a runtime component. But I noticed a race condition between OpenMP trying to use libc++ and it being built, which can cause libc++ to not be found when linking OpenMP libraries. Running This may also work with #59427. |
Yeah, that's not well defined for the runtimes build right now. That clang option specifies whether or not |
Building LLVM with libc++ and OpenMP as a runtime on a glibc based system causes some hard to fix build failures (see llvm/llvm-project#61693). As the point of building against libc++ was to make sure flang works well with it, adding OpenMP doesn’t help that, and flang OpenMP tests are already enabled on other flang bots, just disable OpenMP on flang-aarch64-libcxx.
When building LLVM 16.0.0 with Clang 15.0.3 using config:
I get an error at the linking stage of
libomptarget.so.16
Linking CXX shared library /home/liam/Downloads/llvm-project-16.0.0.src/build/lib/libomptarget.so.16
The text was updated successfully, but these errors were encountered: