linker errors: ld: unexpected token: !tapi-tbd-v3 file
ryandesign at macports.org
Fri Jul 20 04:40:15 UTC 2018
On Jul 19, 2018, at 17:46, Mark Moll wrote:
> The py-graph-tool port doesn’t compile on High Sierra (10.13) due to a linker error that happens during the configure stage :
> configure:19051: checking consistency of all components of python development environment
> 2037 configure:19079: /opt/local/bin/clang-mp-6.0 -o conftest -pipe -Os -arch x86_64 -DNDEBUG -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m/.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib -arch x86_64 -L/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/.. -lpython3.6 conftest.c -L/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib -lpython3.6m -Wl,-stack_size,1000000 -framework CoreFoundation /opt/local/Library/Frameworks/Python.framework/Versions/3.6/Python -Wl,-stack_size,1000000 -framework CoreFoundation /opt/local/Library/Frameworks/Python.framework/Versions/3.6/Python >&5
> 2038 ld: unexpected token: !tapi-tbd-v3 file '/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd' for architecture x86_64
> 2039 clang: error: linker command failed with exit code 1 (use -v to see invocation)
> The error goes away if ld64 is installed with the +ld64_xcode variant. It seems unlikely that py-graph-tool would be the only port affected. Is this a known problem and, if so, what is the correct workaround/fix?
The workaround is the one you found: install ld64 with the +ld64_xcode variant. The ld that would otherwise be provided by the ld64-latest port is too old to understand what newer compilers are producing.
The correct solution would be to update the ld64-latest port to a newer version. But that appears to be difficult. See:
>  See: https://trac.macports.org/ticket/56843 and https://trac.macports.org/attachment/ticket/56843/config.log
More information about the macports-dev