https://llvm.org/bugs/show_bug.cgi?id=26622
Bug ID: 26622 Summary: libcxx cannot find libatomic and cstddef Product: Build scripts Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: cmake Assignee: unassignedb...@nondot.org Reporter: gonzalob...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified I am trying to install libcxx on a macosx 10.11.2 without installing libcxxabi as explained in the libcxx website but cmake cannot find libatomic. I am using a recently compiled and installed clang from source. The command I am using is: # Build libcxx without libcxxabi cd ${LIBCXX_BUILD} cmake ${LIBCXX_SRC} -DCMAKE_BUILD_TYPE=Release -DLIBCXX_ENABLE_ASSERTIONS=Off -DLIT_EXECUTABLE=${LLVM_LIT} \ -DCMAKE_INSTALL_PREFIX=${PREFIX} -DLLVM_CONFIG=${PREFIX}/bin/llvm-config make -j $POOL_JOBS make install The error I get is: -- Configuring for standalone build. -- Found LLVM_CONFIG as /Users/name/pool/bin/llvm-config -- Found PythonInterp: /usr/local/bin/python (found version "2.7.11") -- Sphinx disabled. -- The CXX compiler identification is Clang 3.9.0 -- The C compiler identification is Clang 3.9.0 -- Check for working CXX compiler: /Users/name/pool/bin/clang++ -- Check for working CXX compiler: /Users/name/pool/bin/clang++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working C compiler: /Users/name/pool/bin/clang -- Check for working C compiler: /Users/name/pool/bin/clang -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Performing Test LIBCXX_HAVE_CXX_ATOMICS_WITHOUT_LIB -- Performing Test LIBCXX_HAVE_CXX_ATOMICS_WITHOUT_LIB - Failed -- Looking for __atomic_fetch_add_8 in atomic -- Looking for __atomic_fetch_add_8 in atomic - not found CMake Error at cmake/Modules/CheckLibcxxAtomic.cmake:39 (message): Host compiler appears to require libatomic, but cannot find it. Call Stack (most recent call first): cmake/config-ix.cmake:3 (include) CMakeLists.txt:240 (include) -- Configuring incomplete, errors occurred! See also "/Users/name/pool/build/libcxx/CMakeFiles/CMakeOutput.log". See also "/Users/name/pool/build/libcxx/CMakeFiles/CMakeError.log". Basically from CMakeError.log I found that the problem was that #include <cstddef> could not be found. That is why the atomic tests failed to compile, but this is werid since cstddef is provided by libc++ itself. I "fixed" this by just adding a path to libc++'s include directory to my install command: # Build libcxx without libcxxabi cd ${LIBCXX_BUILD} cmake ${LIBCXX_SRC} -DCMAKE_BUILD_TYPE=Release -DLIBCXX_ENABLE_ASSERTIONS=Off -DLIT_EXECUTABLE=${LLVM_LIT} \ -DCMAKE_INSTALL_PREFIX=${PREFIX} -DLLVM_CONFIG=${PREFIX}/bin/llvm-config -DCMAKE_CXX_FLAGS="-I${LIBCXX_SRC}/include" make -j $POOL_JOBS make install Still it looks that I am missing something, why should this be necessary? -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs