New issue
Advanced search Search tips

Issue 649952 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 620127



Sign in to add a comment

Can't build Chromium with Xcode 8 on macOS 10.11.6

Project Member Reported by kbr@chromium.org, Sep 24 2016

Issue description

I 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.

 

Comment 1 by mark@chromium.org, Sep 24 2016

> 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.

For that, edit /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist, and “fix” the value of MinimumSDKVersion. In Xcode 8, it’s set to 10.11. You want 10.10 or lower. I use 10.5.

> ld: unexpected token: !tapi-tbd-v2 file

Now you’re using the 10.12 SDK with what looks like a pre-Xcode 8 ld. You had probably previously installed the Xcode command-line tools. Since you’ve now installed Xcode 8, you should also install the Xcode 8 command-line tools (xcode-select --install may help, or you can pick up the installer from where you got Xcode). Also, run xcode-select -p to make sure that it points to the copy of Xcode that you think it should (Xcode 8), and if it doesn’t, fix it by running xcode-select path/to/Xcode.app.

Comment 2 by thakis@chromium.org, Sep 25 2016

Just use xcode8's normal SDK.

Comment 3 by mark@chromium.org, Sep 25 2016

He is now (see MacOSX10.12.sdk above), but his system’s toolchain (command-line tools?) is still outdated.

Comment 4 by kbr@chromium.org, Sep 25 2016

Status: WontFix (was: Untriaged)
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.

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