Help needed: fix build issue with xdxf_makedict in older platforms

Leonardo Brondani Schenkel leonardo at schenkel.net
Tue Nov 7 19:19:03 UTC 2017


The plot thickens. I cannot even compile a small test program:

$ cat test.cpp
#include <iostream>

int main() {
         std::cout << "Hello world";
         return 0;
}

$ clang-mp-5.0 test.cpp
ld: unexpected token: !tapi-tbd-v2 file 
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libSystem.tbd' 
for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

$ clang-mp-5.0 -v test.cpp
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-5.0/bin
  "/opt/local/libexec/llvm-5.0/bin/clang" -cc1 -triple 
x86_64-apple-macosx10.13.0 -Wdeprecated-objc-isa-usage 
-Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free 
-disable-llvm-verifier -discard-value-names -main-file-name test.cpp 
-mrelocation-model pic -pic-level 2 -mthread-model posix 
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn 
-target-linker-version 274.2 -v -dwarf-column-info -debugger-tuning=lldb 
-resource-dir /opt/local/libexec/llvm-5.0/lib/clang/5.0.0 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk 
-I/usr/local/include -stdlib=libc++ -fdeprecated-macro 
-fdebug-compilation-dir /Users/leonardo/Projects/xdxf_makedict 
-ferror-limit 19 -fmessage-length 228 -stack-protector 1 -fblocks 
-fobjc-runtime=macosx-10.13.0 -fencode-extended-block-signature 
-fcxx-exceptions -fexceptions -fmax-type-align=16 
-fdiagnostics-show-option -fcolor-diagnostics -o 
/var/folders/rz/6lvrwvyd1kv6sy6204mfmpxm0000gn/T/test-bf31f5.o -x c++ 
test.cpp
clang -cc1 version 5.0.0 based upon LLVM 5.0.0 default target 
x86_64-apple-darwin17.2.0
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/c++/v1"
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/local/include"
ignoring nonexistent directory 
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
  /usr/local/include
  /opt/local/libexec/llvm-5.0/include/c++/v1
  /opt/local/libexec/llvm-5.0/lib/clang/5.0.0/include
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include
 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks 
(framework directory)
End of search list.
  "/opt/local/libexec/llvm-5.0/bin/ld" -demangle -lto_library 
/opt/local/libexec/llvm-5.0/lib/libLTO.dylib -no_deduplicate -dynamic 
-arch x86_64 -macosx_version_min 10.13.0 -syslibroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk 
-o a.out /var/folders/rz/6lvrwvyd1kv6sy6204mfmpxm0000gn/T/test-bf31f5.o 
-L/usr/local/lib -lSystem 
/opt/local/libexec/llvm-5.0/lib/clang/5.0.0/lib/darwin/libclang_rt.osx.a
ld: unexpected token: !tapi-tbd-v2 file 
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib/libSystem.tbd' 
for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

// Leonardo.


More information about the macports-dev mailing list