-
Notifications
You must be signed in to change notification settings - Fork 18
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
Libc++.so.1 (llvmtools) requires libatomic.so.1 #12
Comments
hmmmmmm |
Re-built now llvm/clang for
|
Looks like for libcxx, I’ll have to set a flag to disable libatomic |
How? |
Looks like I’ll have to patch |
Although it’s strange that after rebuilding not sure if it matters that |
Commenting this will disable libatomic detection for Linux when configure libcxx (cmake). check_library_exists(atomic __atomic_fetch_add_8 "" LIBCXX_HAS_ATOMIC_LIB)
102 else()
103 check_library_exists(pthread pthread_create "" LIBCXX_HAS_PTHREAD_LIB)
104 check_library_exists(m ccos "" LIBCXX_HAS_M_LIB)
105 check_library_exists(rt clock_gettime "" LIBCXX_HAS_RT_LIB)
106 set(LIBCXX_HAS_SYSTEM_LIB NO)
107 # check_library_exists(atomic __atomic_fetch_add_8 "" LIBCXX_HAS_ATOMIC_LIB)
108 endif() |
I wonder how atomic detected when building libcxx |
I probably will include a check for libunwind, libcxx, and libcxxabi to make sure there are no GCC dependencies. It’s annoying to finally build LLVM for llvmtools only to realize llvmtools has GCC dependencies. |
LLVM 12.0.0Successful by using above trick! sed -i '/check_library_exists(atomic __atomic_fetch_add_8 "" LIBCXX_HAS_ATOMIC_LIB)/d' \
${LLVMSRC}/projects/libcxx/cmake/config-ix.cmake Progress of building Clang/LLVM in llvmtools (I'm prefer GNU's Make btw): [ 99%] Built target clangStaticAnalyzerFrontend
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
[ 99%] Building C object tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/c-index-test.c.o
[ 99%] Building CXX object tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/core_main.cpp.o
[100%] Linking CXX executable ../../../../bin/c-arcmt-test
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
[100%] Built target c-arcmt-test
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
[100%] Linking CXX static library ../../../../lib/libclangFrontendTool.a
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
[100%] Built target clangFrontendTool
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
make[2]: Entering directory '/mnt/cmlfs/sources/llvm/build'
[100%] Linking CXX static library ../../../../../lib/libclangDependencyScanning.a
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
[100%] Built target clangDependencyScanning
[100%] Linking CXX executable ../../../../bin/c-index-test
make[2]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
[100%] Built target c-index-test
make[1]: Leaving directory '/mnt/cmlfs/sources/llvm/build'
make: Leaving directory '/mnt/cmlfs/sources/llvm/build |
Closing issue as @owl4ce fixed issue |
llvmtools'
libc++.so.1
from libcxx should NOT rely onlibatomic.so.1
, which is provided by GCC.This will require to build LLVM for llvmtools with a
LD_LIBARARY_PATH
hackThe text was updated successfully, but these errors were encountered: