<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Hi all</tt><br>
<br>
<tt>I just ran into the same issue Jack described below.</tt><br>
<tt>I did a 2-stage build of LLVM/Clang/Compiler-rt on the current
release_50 branch.</tt><br>
<br>
<tt>Versions:</tt><br>
<tt>OSX 10.12.6, Xcode 8.0, CMake 1.8.2, Ninja 1.7.2, Ccache 3.3.4</tt><br>
<br>
<tt>Log:</tt><br>
<tt>$ cmake -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache</tt><br>
<tt> -DCMAKE_BUILD_TYPE=Release <br>
-DLLVM_ENABLE_LTO=ON </tt><br>
<tt> -DLLVM_TARGETS_TO_BUILD=host <br>
-DLLVM_CREATE_XCODE_TOOLCHAIN=ON </tt><br>
<tt> -DLLVM_INCLUDE_TESTS=ON <br>
-DLLVM_INCLUDE_EXAMPLES=OFF <br>
-DLLVM_INCLUDE_DOCS=OFF <br>
-DLLVM_ENABLE_PROJECTS="clang;compiler-rt;lldb" </tt><br>
<tt> -DCLANG_ENABLE_BOOTSTRAP=ON ../llvm</tt><br>
<tt>-- The C compiler identification is AppleClang 8.0.0.8000038</tt><br>
<tt>-- The CXX compiler identification is AppleClang 8.0.0.8000038</tt><br>
<tt>...</tt><br>
<tt>-- Build files have been written to:
/media/Dev/llvm50/build-ninja-clang-release</tt><br>
<tt>$ ninja stage2</tt><br>
<tt>...</tt><br>
<tt>-- Performing Test LLVM_NO_OLD_LIBSTDCXX</tt><br>
<tt>-- Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed</tt><br>
<tt>CMake Error at cmake/modules/CheckCompilerVersion.cmake:38
(message):</tt><br>
<tt> Host Clang must be able to find libstdc++4.8 or newer!</tt><br>
<tt>Call Stack (most recent call first):</tt><br>
<tt> cmake/config-ix.cmake:14 (include)</tt><br>
<tt> CMakeLists.txt:584 (include)</tt><br>
<br>
<tt>Hack to force LLVM_ENABLE_LIBCXX=ON:</tt><br>
<tt>diff --git a/cmake/modules/CheckCompilerVersion.cmake
b/cmake/modules/CheckCompilerVersion.cmake</tt><br>
<tt>index 2e8f5445781..38ec06c7631 100644</tt><br>
<tt>--- a/cmake/modules/CheckCompilerVersion.cmake</tt><br>
<tt>+++ b/cmake/modules/CheckCompilerVersion.cmake</tt><br>
<tt>@@ -1,6 +1,7 @@</tt><br>
<tt> # Check if the host compiler is new enough. LLVM requires at
least GCC 4.8,</tt><br>
<tt> # MSVC 2015 (Update 3), or Clang 3.1.</tt><br>
<tt> </tt><br>
<tt>+set(LLVM_ENABLE_LIBCXX ON)</tt><br>
<tt> include(CheckCXXSourceCompiles)</tt><br>
<tt> </tt><br>
<tt> if(NOT DEFINED LLVM_COMPILER_CHECKED)</tt><br>
<tt><br>
Maybe it just got messed up. However, I never explicitly pass <br>
-DLLVM_ENABLE_LIBCXX=ON and it never caused problems in
single-stage builds, <br>
as on OSX the setting defaults to ON. Shouldn't that be the same
for 2-stage <br>
out of the box? Maybe stage 1 passes an invalid setting to the </tt><tt><tt>stage
2<br>
</tt></tt><tt>configuration that overrides the otherwise correct
default?</tt><tt><br>
</tt><tt><br>
</tt><tt>Cheers</tt><tt><br>
</tt><tt>Stefan<br>
<br>
</tt>
<blockquote type="cite"><tt> Is anyone using the 3 stage bootstrap
described under 3-Stage</tt><tt><br>
</tt><tt>Non-Determinism at </tt><tt><a
href="http://llvm.org/docs/AdvancedBuilds.html"
target="_blank" rel="nofollow">http://llvm.org/docs/<wbr>AdvancedBuilds.html</a></tt><tt>?
I am</tt><tt><br>
</tt><tt>trying to build against the MacPorts current python2.7,
ninja and make</tt><tt><br>
</tt><tt>releases, a build of current trunk for llvm, compiler-rt,
cfe and</tt><tt><br>
</tt><tt>clang-tools-extra using...</tt><br>
<tt>% cmake -DLLVM_LINK_LLVM_DYLIB:BOOL=ON</tt><tt><br>
</tt><tt>-DCOMPILER_RT_ENABLE_IOS:BOOL=</tt><wbr><tt>OFF
-DLLVM_LIT_ARGS:STRING=-v</tt><tt><br>
</tt><tt>-DPYTHON_EXECUTABLE:FILEPATH=/</tt><wbr><tt>opt/local/bin/python2.7</tt><tt><br>
</tt><tt>-DLLVM_ENABLE_ASSERTIONS:BOOL=</tt><wbr><tt>OFF
-DCMAKE_OSX_SYSROOT:STRING=/</tt><tt><br>
</tt><tt>-DCMAKE_OSX_DEPLOYMENT_TARGET:</tt><wbr><tt>STRING=</tt><tt><br>
</tt><tt>-DLLVM_TARGETS_TO_BUILD="X86;</tt><wbr><tt>PowerPC;ARM"</tt><tt><br>
</tt><tt>-DCMAKE_INSTALL_PREFIX:PATH=/</tt><wbr><tt>Users/howarth/dist</tt><tt><br>
</tt><tt>-DCMAKE_BUILD_TYPE:STRING=</tt><wbr><tt>Release
-DLLVM_ENABLE_LIBCXX:BOOL=ON -G</tt><tt><br>
</tt><tt>Ninja -C /Users/howarth/3stage/cfe-5.0.</tt><wbr><tt>0.src/cmake/caches/3-stage.</tt><wbr><tt>cmake</tt><tt><br>
</tt><tt>../llvm-5.0.0.src</tt><tt><br>
</tt><tt>% ninja stage3</tt><br>
<tt>on x86_64-apple-darwin16 using the Xcode 8.3 Beta 5 devtools
as the</tt><tt><br>
</tt><tt>system compiler. The build is tripping up on the error...</tt><br>
<tt>-- Performing Test LLVM_NO_OLD_LIBSTDCXX</tt><tt><br>
</tt><tt>-- Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed</tt><tt><br>
</tt><tt>CMake Error at cmake/modules/</tt><wbr><tt>CheckCompilerVersion.cmake:38
(message):</tt><tt><br>
</tt><tt> Host Clang must be able to find libstdc++4.8 or newer!</tt><tt><br>
</tt><tt>Call Stack (most recent call first):</tt><tt><br>
</tt><tt> cmake/config-ix.cmake:14 (include)</tt><tt><br>
</tt><tt> CMakeLists.txt:559 (include)</tt><br>
<tt>where is seems that -DLLVM_ENABLE_LIBCXX:BOOL=ON isn't getting
passed</tt><tt><br>
</tt><tt>down to from stage1 to the stage2 configuration step. Any
ideas on how</tt><tt><br>
</tt><tt>to work around this for a build against the system
livc+++ under</tt><tt><br>
</tt><tt>Sierra?</tt><tt><br>
</tt><tt> Jack</tt></blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="https://weliveindetail.github.io/blog/">https://weliveindetail.github.io/blog/</a>
<a class="moz-txt-link-freetext" href="https://cryptup.org/pub/stefan.graenitz@gmail.com">https://cryptup.org/pub/stefan.graenitz@gmail.com</a></pre>
</body>
</html>