<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What version of ld are you using? (ld -v)<div class=""><br class=""></div><div class="">If you have .tbd files in your SDK, then the ld that shipped with that version of Xcode should be capable of using them to link. The tools should be using that version of ld by default, but it is possible something is going wrong.</div><div class=""><br class=""></div><div class="">If might help to run the command that is failing with "-v", and include the full command and its errors.</div><div class=""><br class=""></div><div class=""> - Daniel</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Dec 9, 2015, at 9:10 PM, Alex Lew 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 dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">Apologies if this is not the right place to ask this.</div><div class=""><br class=""></div><div class="">I built Swift successfully today, but was failing lots of tests because the linker couldn't find CoreFoundation (or other frameworks, including libsystem and libobjc). It looks like ld was invoked with the arguments:</div><div class=""><br class=""></div><div class=""> -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk</div><div class=""><br class=""></div><div class="">The MacOSX10.11.sdk/usr/lib directory <i class="">did</i> have the desired libraries/frameworks in it, but they had the extension .tbd, not .dylib, and I think that confused the linker. I commented out the following lines from swift/lib/Driver/ToolChains.cpp:</div><div class=""><br class=""></div><div class=""><div class=""><br class=""></div><div class=""> if (!context.OI.SDKPath.empty()) {</div><div class=""> Arguments.push_back("-syslibroot");</div><div class=""> Arguments.push_back(context.Args.MakeArgString(context.OI.SDKPath));</div><div class=""> }</div></div><div class=""><br class=""></div><div class="">(lines 915-918), reran util/build-script -t, and everything started working (presumably because the linker was now searching in /usr/lib, where the dylib files are).</div><div class=""><br class=""></div><div class="">I'm curious to understand what was going on here. Should I have been using a different version of ld? Configured something else differently? I'm in a little over my head.</div><div class=""><br class=""></div><div class="">Thank you!</div><div class=""><br class=""></div><div class="">-Alex</div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=AdkfTiApI80cNEyortTzHbERtY5det-2FDBvSxuhs4q2NdQRwCaLFtkpp1QdZ1syUkvKZ4a0tgSvObsVvZacHDFM4WZbfb9AjI3s6dlFVtx3poYVVMNUBq9VuV-2BkAGxPtcaxblr1iqp-2FjRjSPYrAgsQ6GkW2iDGn68sb2WozbtTIG4DYRgpYaVnSzQS1OlP1AVBtm-2B8PrM9J9kej26VQRRmFTa42il39ELciAT3CjOsmY-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-dev mailing list<br class=""><a href="mailto:swift-dev@swift.org" class="">swift-dev@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>