Can't build Chromium with Xcode 8 on macOS 10.11.6 |
||
Issue descriptionI was having difficulty building Chromium's component build per Issue 620127 and, per advice, manually installed the 10.10 SDK into Xcode. (I had previously been running an older version, and also upgraded it to 7.3.1 at the same time.) After taking the latest macOS security updates I was no longer able to build; "gn gen out/Release" complained that xcrun, and therefore find_sdk.py, couldn't run successfully while that 10.10 SDK was installed: ********** kbr-macbookpro4:src kbr$ gn gen out/Release ERROR at //build/config/mac/mac_sdk.gni:54:5: Script returned non-zero exit code. exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines") ^---------- Current dir: /Users/kbr/src/chrome/src/out/Release/ Command: python -- /Users/kbr/src/chrome/src/build/mac/find_sdk.py --print_sdk_path 10.10 Returned 1. stderr: 2016-09-24 16:32:08.772 xcodebuild[70979:341740] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk; its version (10.10) is below required minimum (10.11) for the macosx platform. xcodebuild: error: SDK "macosx10.10" cannot be located. 2016-09-24 16:32:09.192 xcodebuild[70984:341764] [MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk; its version (10.10) is below required minimum (10.11) for the macosx platform. xcodebuild: error: SDK "macosx10.10" cannot be located. xcrun: error: unable to lookup item 'Path' in SDK 'macosx10.10' Traceback (most recent call last): File "/Users/kbr/src/chrome/src/build/mac/find_sdk.py", line 90, in <module> print main() File "/Users/kbr/src/chrome/src/build/mac/find_sdk.py", line 82, in main ['xcrun', '-sdk', 'macosx' + best_sdk, '--show-sdk-path']).strip() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['xcrun', '-sdk', 'macosx10.10', '--show-sdk-path']' returned non-zero exit status 1 See //build/toolchain/mac/BUILD.gn:14:1: whence it was imported. import("//build/config/mac/mac_sdk.gni") ^-------------------------------------- See //BUILD.gn:71:1: which caused the file to be included. group("gn_all") { ^---------------- ********** Removing the 10.10 SDK from Xcode prevented the component build from working; the same problem described in Issue 620127 was still happening. In the hope that upgrading to Xcode 8 might help I did so and now can not compile. I've disabled goma. Here is the error: ninja: Entering directory `out/Release' [726/26505] LINK obj/chrome/chrome_helper_app_executable/Chromium Helper FAILED: obj/chrome/chrome_helper_app_executable/Chromium Helper TOOL_VERSION=1471414135 ../../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.7 -Wl,-ObjC -Wl,-pie -o "obj/chrome/chrome_helper_app_executable/Chromium Helper" -Wl,-filelist,"obj/chrome/chrome_helper_app_executable/Chromium Helper.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 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 "/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', '-Wl,-dead_strip', '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk', '-mmacosx-version-min=10.7', '-Wl,-ObjC', '-Wl,-pie', '-o', 'obj/chrome/chrome_helper_app_executable/Chromium Helper', '-Wl,-filelist,obj/chrome/chrome_helper_app_executable/Chromium Helper.rsp']' returned non-zero exit status 1 [735/26505] ACTION //chrome/app/nibs:chrome_xibs_compile_ibtool(//build/toolchain/mac:clang_x64) ninja: build stopped: subcommand failed. My source tree is current as of yesterday (Friday September 23). Could anyone help? Is Xcode 8 supported for Chromium builds on 10.11.6? This is on a corp laptop. Thanks.
,
Sep 25 2016
Just use xcode8's normal SDK.
,
Sep 25 2016
He is now (see MacOSX10.12.sdk above), but his system’s toolchain (command-line tools?) is still outdated.
,
Sep 25 2016
Thanks mark@ for your tip on the offline email thread about the command line tools being outdated. The issue turned out to be a PATH entry that had been added by MacPorts (!) some time ago, which was *overriding* the version of ld being used. I don't know how my Chromium builds were ever working. A clean rebuild with the 10.12 SDK still isn't done but I'm pretty confident it will work at this point. Closing, apologies, user error.
,
Oct 11 2016
For what it's worth, using MacPorts, the following command seems to do the trick: sudo port install ld64 +ld64_xcode |
||
►
Sign in to add a comment |
||
Comment 1 by mark@chromium.org
, Sep 24 2016