Fails to build on OSX 10.12.2 XCode 8.2.1 (8C1002) default target

314 views
Skip to first unread message

Ivgeni Segal

unread,
Feb 5, 2017, 12:42:38 AM2/5/17
to v8-users
It appears to be a compatibility issue between clang that comes with V8 and Apple's latest Xcode. 

Does anybody know of a workaround for this?

v8 Revision 7c79736019c9a0b9ef03f64ab26e46bb98692abf Sat Feb 4 10:11:10 2017 -0800


tools/dev/v8gen.py x64.release
ninja: Entering directory `out.gn/x64.release'
[514/1441] LINK ./mkpeephole
FAILED: mkpeephole
TOOL_VERSION=1486268393 ../../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.9 -Wl,-ObjC -Wl,-pie -Werror -Wl,-dead_strip -o "./mkpeephole" -Wl,-filelist,"./mkpeephole.rsp"
ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libSystem.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 229, in <module>
    Main(sys.argv)
  File "../../build/toolchain/mac/linker_driver.py", line 79, in Main
    subprocess.check_call(compiler_driver_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, 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.9', '-Wl,-ObjC', '-Wl,-pie', '-Werror', '-Wl,-dead_strip', '-o', './mkpeephole', '-Wl,-filelist,./mkpeephole.rsp']' returned non-zero exit status 1
[519/1441] CXX obj/v8_libplatform/default-platform.o
ninja: build stopped: subcommand failed.

Ivgeni Segal

unread,
Feb 5, 2017, 1:14:29 AM2/5/17
to v8-users
Update: Figured it out. Apparently a wrong version of ld was being picked. 
The ld from macports located at /opt/local/bin was interfering with the build environment.
Without uninstalling macports, a simple workaround is to remove /opt/local/ from PATH for the build session.
Reply all
Reply to author
Forward
0 new messages