[llvm-dev] [cfe-dev] 3 stage ninja bootstrap on darwin? (original) (raw)
Chris Bieneman via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 1 10:14:18 PDT 2017
- Previous message: [llvm-dev] Compile LLVM into LLVM IR with non-Xcode Clang
- Next message: [llvm-dev] [cfe-dev] 3 stage ninja bootstrap on darwin?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
When doing multi-stage builds on Darwin you must have libcxx checked out in your source tree. Otherwise this error is expected.
-Chris
On Aug 5, 2017, at 10:39 AM, Stefan Gränitz via cfe-dev <cfe-dev at lists.llvm.org> wrote:
Hi all I just ran into the same issue Jack described below. I did a 2-stage build of LLVM/Clang/Compiler-rt on the current release50 branch. Versions: OSX 10.12.6, Xcode 8.0, CMake 1.8.2, Ninja 1.7.2, Ccache 3.3.4 Log: $ cmake -G Ninja -DCMAKECXXCOMPILERLAUNCHER=ccache -DCMAKEBUILDTYPE=Release -DLLVMENABLELTO=ON -DLLVMTARGETSTOBUILD=host -DLLVMCREATEXCODETOOLCHAIN=ON -DLLVMINCLUDETESTS=ON -DLLVMINCLUDEEXAMPLES=OFF -DLLVMINCLUDEDOCS=OFF -DLLVMENABLEPROJECTS="clang;compiler-rt;lldb" -DCLANGENABLEBOOTSTRAP=ON ../llvm -- The C compiler identification is AppleClang 8.0.0.8000038 -- The CXX compiler identification is AppleClang 8.0.0.8000038 ... -- Build files have been written to: /media/Dev/llvm50/build-ninja-clang-release $ ninja stage2 ... -- Performing Test LLVMNOOLDLIBSTDCXX -- Performing Test LLVMNOOLDLIBSTDCXX - Failed CMake Error at cmake/modules/CheckCompilerVersion.cmake:38 (message): Host Clang must be able to find libstdc++4.8 or newer! Call Stack (most recent call first): cmake/config-ix.cmake:14 (include) CMakeLists.txt:584 (include) Hack to force LLVMENABLELIBCXX=ON: diff --git a/cmake/modules/CheckCompilerVersion.cmake b/cmake/modules/CheckCompilerVersion.cmake index 2e8f5445781..38ec06c7631 100644 --- a/cmake/modules/CheckCompilerVersion.cmake +++ b/cmake/modules/CheckCompilerVersion.cmake @@ -1,6 +1,7 @@ # Check if the host compiler is new enough. LLVM requires at least GCC 4.8, # MSVC 2015 (Update 3), or Clang 3.1. +set(LLVMENABLELIBCXX ON) include(CheckCXXSourceCompiles) if(NOT DEFINED LLVMCOMPILERCHECKED) Maybe it just got messed up. However, I never explicitly pass -DLLVMENABLELIBCXX=ON and it never caused problems in single-stage builds, as on OSX the setting defaults to ON. Shouldn't that be the same for 2-stage out of the box? Maybe stage 1 passes an invalid setting to the stage 2 configuration that overrides the otherwise correct default? Cheers Stefan
Is anyone using the 3 stage bootstrap described under 3-Stage Non-Determinism at http://llvm.org/docs/AdvancedBuilds.html <http://llvm.org/docs/AdvancedBuilds.html>? I am trying to build against the MacPorts current python2.7, ninja and make releases, a build of current trunk for llvm, compiler-rt, cfe and clang-tools-extra using... % cmake -DLLVMLINKLLVMDYLIB:BOOL=ON -DCOMPILERRTENABLEIOS:BOOL=OFF -DLLVMLITARGS:STRING=-v -DPYTHONEXECUTABLE:FILEPATH=/opt/local/bin/python2.7 -DLLVMENABLEASSERTIONS:BOOL=OFF -DCMAKEOSXSYSROOT:STRING=/ -DCMAKEOSXDEPLOYMENTTARGET:STRING= -DLLVMTARGETSTOBUILD="X86;PowerPC;ARM" -DCMAKEINSTALLPREFIX:PATH=/Users/howarth/dist -DCMAKEBUILDTYPE:STRING=Release -DLLVMENABLELIBCXX:BOOL=ON -G Ninja -C /Users/howarth/3stage/cfe-5.0.0.src/cmake/caches/3-stage.cmake ../llvm-5.0.0.src % ninja stage3 on x8664-apple-darwin16 using the Xcode 8.3 Beta 5 devtools as the system compiler. The build is tripping up on the error... -- Performing Test LLVMNOOLDLIBSTDCXX -- Performing Test LLVMNOOLDLIBSTDCXX - Failed CMake Error at cmake/modules/CheckCompilerVersion.cmake:38 (message): Host Clang must be able to find libstdc++4.8 or newer! Call Stack (most recent call first): cmake/config-ix.cmake:14 (include) CMakeLists.txt:559 (include) where is seems that -DLLVMENABLELIBCXX:BOOL=ON isn't getting passed down to from stage1 to the stage2 configuration step. Any ideas on how to work around this for a build against the system livc+++ under Sierra? Jack -- https://weliveindetail.github.io/blog/ <https://weliveindetail.github.io/blog/> https://cryptup.org/pub/stefan.graenitz@gmail.com <https://cryptup.org/pub/stefan.graenitz@gmail.com>_______________________ cfe-dev mailing list cfe-dev at lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170901/f1e8be04/attachment.html>
- Previous message: [llvm-dev] Compile LLVM into LLVM IR with non-Xcode Clang
- Next message: [llvm-dev] [cfe-dev] 3 stage ninja bootstrap on darwin?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]