[swift-dev] problems with linking .tbd frameworks in test suite
Alex Lew
alexl.mail+swift at gmail.com
Wed Dec 9 23:10:56 CST 2015
Hi all,
Apologies if this is not the right place to ask this.
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:
-syslibroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
The MacOSX10.11.sdk/usr/lib directory *did* 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:
if (!context.OI.SDKPath.empty()) {
Arguments.push_back("-syslibroot");
Arguments.push_back(context.Args.MakeArgString(context.OI.SDKPath));
}
(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).
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.
Thank you!
-Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20151210/0e3ffce5/attachment.html>
More information about the swift-dev
mailing list