[MacPorts] #53151: ld64-latest: handeling tbd files
MacPorts
noreply at macports.org
Sat Dec 24 17:43:56 CET 2016
#53151: ld64-latest: handeling tbd files
---------------------------------+-------------------------
Reporter: MarcusCalhoun-Lopez | Owner: jeremyhu@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port: ld64-latest
---------------------------------+-------------------------
I am currently trying to get Qt to use MacPorts clang instead of Xcode
clang so as to hopefully support older OSs for longer..[[BR]]
The linker, however, does not seem to be able to handle
[http://stackoverflow.com/questions/31450690/why-xcode-7-shows-tbd-
instead-of-dylib tbd] files.[[BR]]
For example, the following code fails:
{{{
clang++-mp-3.9
-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
main.cxx
}}}
with the error
{{{
ld: unexpected token: !tapi-tbd-v2 file
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libc++.tbd'
for architecture x86_64
}}}
I have been able to workaround the problem by removing {{{-syslibroot}}}
from the linker.
The more difficult problem is when the .tbd file and dylib file are in the
same directory as in:
{{{
clang++-mp-3.9
-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks
-weak_framework XCTest main.cxx
}}}
which produces the error
{{{
ld: unexpected token: !tapi-tbd-v2 file
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks/XCTest.framework/XCTest.tbd'
for architecture x86_64
}}}
Any suggestions on a fix or workaround?
--
Ticket URL: <https://trac.macports.org/ticket/53151>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list