<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 8, 2016, at 7:28 AM, Frederick Kellison-Linn via swift-dev &lt;<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div 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&nbsp;<font face="Menlo" class="">[2112/2254] Performing configure step for 'compiler-rt’</font>, since the compiled <font face="Menlo" class="">clang</font>&nbsp;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="">&nbsp; '/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="">&nbsp; 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&nbsp;Version 8.1 (8B62)</div><div class="">&nbsp; &nbsp; |----clang/clang++:&nbsp;Apple LLVM version 8.0.0 (clang-800.0.42.1)</div></div></div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class=""><font face="Menlo" class="">&nbsp; /Users/freddy/Development/swift/swift-source/build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/./bin/clang</font></div><div class=""><font face="Menlo" class="">&nbsp; -isysroot</font></div><div class=""><font face="Menlo" class="">&nbsp; /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk</font></div><div class=""><font face="Menlo" class="">&nbsp; -Wl,-search_paths_first -Wl,-headerpad_max_install_names</font></div><div class=""><font face="Menlo" class="">&nbsp; CMakeFiles/cmTC_b980a.dir/testCCompiler.c.o -o cmTC_b980a &amp;&amp; :</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">&nbsp; ld: unexpected token: !tapi-tbd-v2 file</font></div><div class=""><font face="Menlo" class="">&nbsp; '/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="">&nbsp; for architecture x86_64</font></div></div></div></div></blockquote></div><div><br class=""></div><div>That error sounds like the build is trying to use an old linker that does not understand the format of the current SDK's files.</div><div><br class=""></div><div>Xcode 8.1 (8B62) should be fine. If the problem is an old linker then it is most likely coming from some other install of Xcode on your machine.</div><div><br class=""></div><div>What is the output of `xcode-select -p` and `xcodebuild -version`? If those are pointing at some other install of Xcode then you can use `xcode-select -s` to tell the command-line tools which copy of Xcode to use.</div><div><br class=""></div><div>You can also re-run the failing clang command by hand and add -### to its arguments. clang will then print the full path to the linker it is running.</div><div><br class=""></div><div><br class=""></div><div>--&nbsp;</div><div>Greg Parker &nbsp; &nbsp; <a href="mailto:gparker@apple.com" class="">gparker@apple.com</a> &nbsp; &nbsp; Runtime Wrangler</div><div><br class=""></div><div><br class=""></div></body></html>