Mac OSX 10.12 and xcode 8 x64 compile errors!

711 views
Skip to first unread message

Dave Wang

unread,
Nov 1, 2016, 9:25:21 AM11/1/16
to discuss-webrtc
In mac osx 10.12 and xcode 8 ,compile errors!


➜  src git:(b68d655) ninja -C out/Debug-sim64 AppRTCMobile

ninja: Entering directory `out/Debug-sim64'

[1/944] LINK clang_x64/iossim

FAILED: clang_x64/iossim 

TOOL_VERSION=1477986768 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++  -stdlib=libc++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.7 -Wl,-ObjC -Wl,-pie -mmacosx-version-min=10.8 -o "clang_x64/iossim" -Wl,-filelist,"clang_x64/iossim.rsp"  -framework Foundation

ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks//Foundation.framework/Foundation.tbd' for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Traceback (most recent call last):

  File "../../build/toolchain/mac/linker_driver.py", line 222, in <module>

    Main(sys.argv)

  File "../../build/toolchain/mac/linker_driver.py", line 72, in Main

    subprocess.check_call(compiler_driver_args)

  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 541, in check_call

    raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['../../third_party/llvm-build/Release+Asserts/bin/clang++', '-stdlib=libc++', '-arch', 'x86_64', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk', '-mmacosx-version-min=10.7', '-Wl,-ObjC', '-Wl,-pie', '-mmacosx-version-min=10.8', '-o', 'clang_x64/iossim', '-Wl,-filelist,clang_x64/iossim.rsp', '-framework', 'Foundation']' returned non-zero exit status 1

[10/944] CXX clang_x64/obj/third_party/protobuf/protobuf_full/descriptor.o

ninja: build stopped: subcommand failed.




Henrik Kjellander

unread,
Nov 2, 2016, 5:27:48 PM11/2/16
to discuss-webrtc
I'm not sure what can be wrong with your environment. I can compile the same with 10.12.1 and Xcode 8.0. So does our bots.
A quick Google search seems to confirm this error happens in other places too, so I don't think WebRTC is to blame here.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/2135dec5-aa04-4286-b042-e469a191a0d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

German Korovkin

unread,
Apr 25, 2017, 12:42:58 PM4/25/17
to discuss-webrtc
Well quick look via internet shows that this might happen when ENV is broken (mostly when compiler belongs to another Xcode-console tools and SDK picked up from another) - those issues resolved by xcode-select 

But what I can see exactly in this error (assuming that you have one SDK and one Xcode console tools) - that LD invoked by third party clang cannot read TBD v2 format of SDK libs. 
I've tried to rebuild myself and got pretty the same error (different target though).

TOOL_VERSION=1493133415 ../../build/toolchain/mac/linker_driver.py ../../third_party/llvm-build/Release+Asserts/bin/clang++  -stdlib=libc++ -arch x86_64 -Wl,-dead_strip -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -Wl,-ObjC -Wl,-pie -Werror -o "./protoc" -Wl,-filelist,"./protoc.rsp"  
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

Cannot say any more helpful but at least you know now that I have the same problem :)

Btw, do you have any macports/homebrew clang/llvm installed ? Do you have PATH pointed on macports/homebrew BIN folder first?

вторник, 1 ноября 2016 г., 16:25:21 UTC+3 пользователь Dave Wang написал:

German Korovkin

unread,
Apr 25, 2017, 12:57:46 PM4/25/17
to discuss-webrtc
Oh, sorry guys I've missed post date - hate those dead threads

Anyways, solution was to unset PATH to do not point to /opt/local* stuff from macports - seems like one of the "forth" party linkers has been invoked towards those fancy TBD libs
Reply all
Reply to author
Forward
0 new messages