-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
/usr/include leaking into conda-build with openmp runtimes enabled. #230
Comments
Is it using the just built clang to build openmp? |
In the second line of the error report above you can see "$SRC_DIR/llvm/build/bin/clang" as the exe of the build command so, yes, I believe that it is using the just built clang. If I try to build the runtime without including clang as a project to build then it gives me an error so I assume that is a requirement of building the runtime. |
Yeah, you need some patches to clang to automatically find the sysroot. (Or set --sysroot to make clang aware of the conda sysroot) |
Should we backport those patches to LLVM/clang 15? |
@isuruf It seems that for the runtime build portion, when cmake is trying to use the newly built clang to check for the compiler capabilities, that all those checks are failing because of the following:
Suggestions? Thanks! |
Did you use my suggestions above? |
Don't see why not |
Yes, I used the second one. |
|
|
|
Hmm, you might need the other two patches too. |
I thought the same and I tried it. After the rebuild, activating the build environment and rerunning the pthread test program, It changed the linker from /usr/bin/ld to /home/username/miniconda3/envs/pyomp39/conda-bld/llvmdev_1690494537428/_build_env/bin/x86_64-conda-linux-gnu-ld but otherwise the errors are the same about crtbegin.o and -lgcc not being found. |
Sidenote: Please post code & shell output enclosed in triple backticks. |
|
Though I note that the errors mention clang-14:
so the backports to the |
Yes indeed, I am backporting to llvm 14.0.6. You can see what I'm doing in my first post where I show a part of build.sh where I am enabling the clang, lld, and libunwind projects along with the openmp runtime. I'm not "installing" clang...it is just being built as part of the llvm build process and then a later part of the build process that is doing the runtime is using the clang that was built earlier in the build. |
@isuruf @h-vetinari I found https://discourse.llvm.org/t/cannot-find-lgcc-with-new-clang-worked-with-clang-7/4232/7. Running clang --verbose on the clang that is being built in the conda build environment finds no candidate gcc implementations. $SRC_DIR/llvm/build/bin/clang --verbose |
Try
|
That directory didn't exist directly under llvmdev_1690494537428 but does exist in the _build_env subdir. I tried doing the ln from that directory to work/llvm/build but it had no effect. |
From what I can tell you are not using conda-forge packages for the build environment. Can you do
and try again with a fresh build environment? |
Did a completely clean environment and got everything from conda-forge and it still gives me the same error. |
Checking in on this old issue again. AFAIU everything should be fixed for v15+. Is there still a problem @DrTodd13? |
Comment:
I'm not using the conda-forge recipes (instead basing what I'm doing on the Numba recipe) but I thought this group might have expertise to answer my question. In build.sh, I'm building clang/lld/libunwind and the openmp runtimes as below.
_cmake_config+=(-DLLVM_ENABLE_PROJECTS:STRING="clang;lld;libunwind")
_cmake_config+=(-DLLVM_ENABLE_RUNTIMES:STRING=openmp)
I'm doing this in a Centos 7 VM. The build gets into building the runtime and for some of the compilation steps I get the following errors.
It seems to be trying to get the C++ include files from /usr/include and failing because enable_if_t is not available in the base gcc available on centos 7 (gcc 4.8.5). I don't know why it is trying to use this gcc at all since the conda environment created at the beginning has gcc 7.5 in it as follows:
Any suggestions on how to proceed? Thanks!
The text was updated successfully, but these errors were encountered: