<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">What if you try:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">which ld</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">And, what’s your PATH?</div> <br><p class="airmail_on">On December 8, 2016 at 2:19:20 PM, Frederick Kellison-Linn (<a href="mailto:fred.kl@me.com">fred.kl@me.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>



<title></title>


Yeah that seems wrong to me as well. Do you know how I can change
the linker that clang invokes?
<div class=""><br class=""></div>
<div class="">Freddy</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Dec 8, 2016, at 5:16 PM, William Dillon
&lt;<a href="mailto:william@housedillon.com" class="">william@housedillon.com</a>&gt; 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="">The Apple folks might know better and correct me, but I’m
pretty certain you don’t want to be using any toolchains in
/opt/local. &nbsp;It all needs to be from the Xcode.app.</div>
<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=""><br class=""></div>
<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="">- Will</div>
<div class="bloop_sign" id="bloop_sign_1481235359696882944" 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=""><br class=""></div>
</div>
<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 2:14:42 PM, Frederick Kellison-Linn 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;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class=""></div>
<div class=""><span class="">The output of those commands
follows:</span>
<div class=""><span class=""><br class=""></span></div>
<div class="">
<div class=""><span class=""><font face="Menlo" class="">$
xcode-select -p</font></span></div>
<div class=""><span class=""><font face="Menlo" class="">/Applications/Xcode.app/Contents/Developer</font></span></div>
<div class=""><span class=""><font face="Menlo" class=""><br class=""></font></span></div>
<div class=""><span class=""><font face="Menlo" class="">$
xcodebuild -version</font></span></div>
<div class=""><span class=""><font face="Menlo" class="">Xcode
8.1</font></span></div>
<div class=""><span class=""><font face="Menlo" class="">Build
version 8B62</font></span></div>
<div class=""><span class=""><font face="Menlo" class=""><br class=""></font></span></div>
<div class=""><span class="">Both look fine to me.</span></div>
<div class=""><span class=""><br class=""></span></div>
<div class=""><span class="">It appears that clang is
invoking&nbsp;<font face="Menlo" class="">/opt/local/bin/ld</font>,
and running&nbsp;<font face="Menlo" class="">/opt/local/bin/ld
-v</font>&nbsp;gives:</span></div>
<div class=""><span class=""><br class=""></span></div>
<div class="">
<div class=""><span class=""><font face="Menlo" class="">@(#)PROGRAM:ld &nbsp;PROJECT:ld64-264.3.102</font></span></div>
<div class=""><span class=""><font face="Menlo" class="">configured
to support archs: i386 x86_64 x86_64h armv6 armv7 armv7s armv7m
armv7k arm64 (tvOS)</font></span></div>
<div class=""><span class=""><font face="Menlo" class="">LTO
support using: LLVM version 3.8.1</font></span></div>
</div>
<div class=""><span class=""><font face="Menlo" class=""><br class=""></font></span></div>
<div class=""><span class="">What is wrong with the config
here?</span></div>
<div class=""><span class=""><br class=""></span></div>
<div class=""><span class="">Freddy</span></div>
<div class=""><span class=""><font face="Menlo" class="">&nbsp;</font></span></div>
<div class="">
<blockquote type="cite" class="">
<div class=""><span class="">On Dec 8, 2016, at 4:28 PM, William
Dillon &lt;<a href="mailto:william@housedillon.com" class="">william@housedillon.com</a>&gt; wrote:</span></div>
<span class=""><br class="Apple-interchange-newline"></span>
<div class="">
<div id="bloop_customfont" class="" 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;">
<span class="">I think Greg is right. &nbsp;I’ve seen this before,
and the way I fixed it was by fixing the Xcode configuration,
specifically relating to the command-line tools.</span></div>
<span class=""><br class="" 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;">
</span>
<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 class="" style="font-family: helvetica, arial; font-size: 13px;"><span class="">-
Will</span></div>
</div>
<span class=""><br class="" 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;">
</span>
<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;">
<span class="">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:</span></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-stroke-width: 0px;">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div class=""></div>
<div class=""><span class=""><span class=""><br class=""></span></span>
<div class="">
<blockquote type="cite" class="">
<div class=""><span 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:</span></div>
<span class=""><br class="Apple-interchange-newline"></span>
<div class="">
<div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<span class="">Hello,</span>
<div class=""><span class=""><br class=""></span></div>
<div class=""><span 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<span class="Apple-converted-space">&nbsp;</span><font face="Menlo" class="">clang</font>&nbsp;fails to build a simple C program. The
specific issue appears to be at the lines:</span></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 class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<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 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="">--&nbsp;</div>
<div class="">Greg Parker &nbsp; &nbsp;<span class="Apple-converted-space">&nbsp;</span><a href="mailto:gparker@apple.com" class="">gparker@apple.com</a><span class="Apple-converted-space">&nbsp;</span>&nbsp; &nbsp; 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>
</blockquote>
</div>
</blockquote>
</div>
<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>
</blockquote>
</div>
</blockquote>
</div>
<br class=""></div>


</div></div></span></blockquote></body></html>