<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hello,<div class=""><br class=""></div><div class="">I have been attempting to build Swift, but have been running into issues near the end of the build. Specifically, CMake fails on the step <font face="Menlo" class="">[2112/2254] Performing configure step for 'compiler-rt’</font>, since the compiled <font face="Menlo" class="">clang</font> fails to build a simple C program. The specific issue appears to be at the lines:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">ld: unexpected token: !tapi-tbd-v2 file</font></div><div class=""><font face="Menlo" class=""> '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd'</font></div><div class=""><font face="Menlo" class=""> for architecture x86_64</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">My system settings are as follows:</div><div class=""><br class=""></div><div class="">MacBook Pro (Retina, Mid 2012)</div><div class="">macOS Sierra Version 10.12.2 Beta (16C48b)</div><div class="">Xcode Version 8.1 (8B62)</div><div class=""> |----clang/clang++: Apple LLVM version 8.0.0 (clang-800.0.42.1)</div><div class=""><br class=""></div><div class="">The full text of the failure is below. Any help figuring out how to solve this issue would be greatly appreciated.</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">[2112/2254] Performing configure step for 'compiler-rt'</font></div><div class=""><font face="Menlo" class="">-- The C compiler identification is Clang 4.0.0</font></div><div class=""><font face="Menlo" class="">-- The CXX compiler identification is Clang 4.0.0</font></div><div class=""><font face="Menlo" class="">-- The ASM compiler identification is Clang</font></div><div class=""><font face="Menlo" class="">-- Found assembler: /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang</font></div><div class=""><font face="Menlo" class="">-- Check for working C compiler: /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang</font></div><div class=""><font face="Menlo" class="">-- Check for working C compiler: /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang -- broken</font></div><div class=""><font face="Menlo" class="">CMake Error at /Applications/CMake.app/Contents/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message):</font></div><div class=""><font face="Menlo" class=""> The C compiler</font></div><div class=""><font face="Menlo" class=""> "/Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang"</font></div><div class=""><font face="Menlo" class=""> is not able to compile a simple test program.</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> It fails with the following output:</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> Change Dir: /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/tools/clang/runtime/compiler-rt-bins/CMakeFiles/CMakeTmp</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> </font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> Run Build Command:"/opt/local/bin/ninja" "cmTC_b980a"</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> [1/2] Building C object CMakeFiles/cmTC_b980a.dir/testCCompiler.c.o</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> [2/2] Linking C executable cmTC_b980a</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> FAILED: cmTC_b980a</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> : &&</font></div><div class=""><font face="Menlo" class=""> /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang</font></div><div class=""><font face="Menlo" class=""> -isysroot</font></div><div class=""><font face="Menlo" class=""> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk</font></div><div class=""><font face="Menlo" class=""> -Wl,-search_paths_first -Wl,-headerpad_max_install_names</font></div><div class=""><font face="Menlo" class=""> CMakeFiles/cmTC_b980a.dir/testCCompiler.c.o -o cmTC_b980a && :</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> ld: unexpected token: !tapi-tbd-v2 file</font></div><div class=""><font face="Menlo" class=""> '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.tbd'</font></div><div class=""><font face="Menlo" class=""> for architecture x86_64</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> clang-4.0: error: linker command failed with exit code 1 (use -v to see</font></div><div class=""><font face="Menlo" class=""> invocation)</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> ninja: build stopped: subcommand failed.</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> </font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> </font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class=""> CMake will not be able to correctly generate this project.</font></div><div class=""><font face="Menlo" class="">Call Stack (most recent call first):</font></div><div class=""><font face="Menlo" class=""> CMakeLists.txt:12 (project)</font></div></div><div class=""><br class=""></div><div class="">Freddy</div></body></html>