<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="">The output of those commands follows:<div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">$ xcode-select -p</font></div><div class=""><font face="Menlo" class="">/Applications/Xcode.app/Contents/Developer</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">$ xcodebuild -version</font></div><div class=""><font face="Menlo" class="">Xcode 8.1</font></div><div class=""><font face="Menlo" class="">Build version 8B62</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Both look fine to me.</div><div class=""><br class=""></div><div class="">It appears that clang is invoking <font face="Menlo" class="">/opt/local/bin/ld</font>, and running <font face="Menlo" class="">/opt/local/bin/ld -v</font> gives:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">@(#)PROGRAM:ld PROJECT:ld64-264.3.102</font></div><div class=""><font face="Menlo" class="">configured to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m armv7k arm64 (tvOS)</font></div><div class=""><font face="Menlo" class="">LTO support using: LLVM version 3.8.1</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">What is wrong with the config here?</div><div class=""><br class=""></div><div class="">Freddy</div><div class=""><font face="Menlo" class=""> </font></div><div><blockquote type="cite" class=""><div class="">On Dec 8, 2016, at 4:28 PM, William Dillon <<a href="mailto:william@housedillon.com" class="">william@housedillon.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px;" class="">I think Greg is right. I’ve seen this before, and the way I fixed it was by fixing the Xcode configuration, specifically relating to the command-line tools.</div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="bloop_sign" id="bloop_sign_1481232398048780800" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="font-family: helvetica, arial; font-size: 13px;" class="">- Will</div></div><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><p class="airmail_on" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On December 8, 2016 at 1:24:59 PM, Greg Parker via swift-dev (<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>) wrote:</p><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 8, 2016, at 7:28 AM, Frederick Kellison-Linn via swift-dev <<a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">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<span class="Apple-converted-space"> </span><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></div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><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></div></div></blockquote></div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class=""><br class=""></div><div class="">-- </div><div class="">Greg Parker <span class="Apple-converted-space"> </span><a href="mailto:gparker@apple.com" class="">gparker@apple.com</a><span class="Apple-converted-space"> </span> Runtime Wrangler</div><div class=""><br class=""></div><div class=""><br class=""></div>_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-dev" class="">https://lists.swift.org/mailman/listinfo/swift-dev</a></div></div></span></blockquote></div></blockquote></div><br class=""></div></body></html>