I'm suffering through a Cmake build of Clang 3.6. I'm experiencing an error "Host Clang must be able to find libstdc++4.7 or newer!". (Suffering because I know this process does not work with Autotools/Makefiles; so I'm trying Cmake but I know nothing about Cmake).
I'm using a recipe that can be found at "Clang 3.6 Recipe with libc++ and libc++abi", http://pastebin.com/0yg1Y7RK. It simply fetches components with wget, unpacks them in-tree, configures and then kicks off a build. The components that have been downloaded and placed in-tree are: * LLVM * Clang Front End * Compiler-RT * Tools Extra * libcxx * libcxxabi >From the build/ directory (and on OS X 10.8.5) I issue the following: cmake V=1 --enable-optimized --enable-cxx11 --enable-libcpp --prefix=/usr/local ../llvm It results in the the error below. Adding `--with-libcxx --with-libcxxabi` results in the same error. Line 38 of HandleLLVMOptions is shown after the error. I think its due to the LLVM_NO_OLD_LIBSTDCXX. There's a thread with a similar error at http://marc.info/?l=cfe-dev&m=141691588006254. But as a completely inexperienced Cmake user, I really can't follow what's being said or what I should do to resolve the issue. I thought placing things in-tree was the magic to make auto-configuration work. I'm not sure if I was mistaken or if I'm seeing a small issue in configuration. Does anyone have any ideas how to I can tell the build system I am trying to build libc++ and libc++abi, and it should not look for it? Thanks in advance. =================== $ ./clang-3.6-libcxx-recipe.sh Configuring build Present directory: /Users/jwalton/clang-3.6-libcxx/build -- Target triple: x86_64-apple-darwin12.6.0 -- Native target architecture is X86 -- Threads enabled. -- Doxygen disabled. -- Sphinx disabled. -- Go bindings disabled. -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) -- OCaml bindings disabled. CMake Error at cmake/modules/HandleLLVMOptions.cmake:38 (message): Host Clang must be able to find libstdc++4.7 or newer! Call Stack (most recent call first): CMakeLists.txt:344 (include) -- Configuring incomplete, errors occurred! ======== # line 33 `#include <atomic>` # line 38 is `message(FATAL_ERROR...` #include <atomic> std::atomic<float> x(0.0f); int main() { return (float)x; }" LLVM_NO_OLD_LIBSTDCXX) if(NOT LLVM_NO_OLD_LIBSTDCXX) message(FATAL_ERROR "Host Clang must be able to find libstdc++4.7 or newer!") endif() set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS}) set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) endif() elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0) message(FATAL_ERROR "Host Visual Studio must be at least 2012 (MSVC 17.0)") endif() endif() endif() _______________________________________________ cfe-users mailing list cfe-users@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users