Build failure on chrome with 10.14 SDK
Reported by
eugene70...@gmail.com,
Sep 20
|
|||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Steps to reproduce the problem:
1. Install latest xcode from AppStore
2. Build the chromium on OSX
ninja -C out/Defualt chrome
3. Error occured!
../../chrome/browser/app_controller_mac.mm:1641:46: error: conflicting parameter types in implementation of 'application:continueUserActivity:restorationHandler:': 'void (^ _Nonnull)(NSArray<id<NSUserActivityRestoring>> * _Nonnull)' vs 'void (^ _Nonnull)(NSArray *)' [-Werror,-Wmismatched-parameter-types]
restorationHandler:(void (^)(NSArray*))restorationHandler
~~~~~~~~~~~~~~~~~~ ^
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:405:187: note: previous definition is here
- (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<NSUserActivityRestoring>> *restorableObjects))restorationHandler NS_AVAILABLE_MAC(10_10);
~~~~~~ ^
1 error generated.
What is the expected behavior?
What went wrong?
It seems like that the source code of OSX SDK was changed.
I try to build again after changing the source of xcode sdk.
And than succeeded in build.
BEFORE:
- (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray<id<NSUserActivityRestoring>> *restorableObjects)) restorationHandler NS_AVAILABLE_MAC(10_10);
AFTER:
- (BOOL)application:(NSApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray *restorableObjects)) restorationHandler NS_AVAILABLE_MAC(10_10);
Did this work before? N/A
Chrome version: 69.0.3497.100 Channel: n/a
OS Version: OS X 10.13.6
Flash Version:
,
Sep 20
,
Sep 20
Can you paste the compile command that fails too? ninja should print that as well. I'm guessing the issue is the, uh...10.14 sdk?
,
Sep 20
Oh, says 10.14 sdk in the note.
,
Sep 20
Hm, according to issue 849689 building with the 10.14 sdk should generally work. Maybe xcode 10 ships a different sdk that's also called 10.14?
,
Sep 20
Options: 1. Try making our version always use the generics syntax and see how that does with the older SDKs 2. pragma out -Wmismatched-parameter-types in that block
,
Sep 20
"Maybe xcode 10 ships a different sdk that's also called 10.14?" FYI Apple does this. A lot. There is no "*the* 10.nn SDK".
,
Sep 21
,
Sep 21
,
Sep 21
I'm seeing this when running `gn gen`:
../../buildtools/mac/gn --root=../.. -q gen .
********************************************************************************
WARNING: The Mac OS X SDK is incompatible with the version of Xcode. To fix,
either upgrade Xcode to the latest version or install the Mac OS X
10.12 SDK. For more information, see https://crbug.com/620127 .
Current SDK Version: 10.14
Current Xcode Version: 0100 (10A255)
********************************************************************************
ERROR at //build/config/mac/mac_sdk.gni:111:3: Assertion failed.
assert(false, "SDK is incompatible with Xcode")
^-----
SDK is incompatible with Xcode
See //device/BUILD.gn:15:3: whence it was imported.
import("//build/config/mac/mac_sdk.gni")
^--------------------------------------
See //BUILD.gn:202:7: which caused the file to be included.
"//device:device_unittests",
^--------------------------
It looks like the recent Xcode bumped the SDK to macOS 10.14. Here's the output of sdk_info.py on my machine:
$ python build/config/mac/sdk_info.py macosx
machine_os_build="17G65"
sdk_build="10.14"
sdk_path="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"
sdk_platform_path="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform"
sdk_version="10.14"
xcode_build="10A255"
xcode_version="0100"
xcode_version_int=100
,
Sep 21
Oops, meant to post ^ as this account :)
,
Sep 21
That looks unrelated to what comment 0 is about. That's because https://cs.chromium.org/chromium/src/build/config/mac/mac_sdk.gni?q=mac_sdk.gni&sq=package:chromium&dr&l=89 tries to check if Xcode is older than 7.3, but xcode 10 has xcode_version 0100 which to that checks looks like 1.0 instead of 10.0. We should probably just remove that check.
,
Sep 24
,
Sep 26
Ran into this yesterday on a Mojave machine, fix incoming
,
Sep 26
,
Sep 26
jeremya posted a fix here: https://chromium-review.googlesource.com/c/chromium/src/+/1239366 but we were wondering why the xcode_version is not 1000 instead of 0100.
,
Sep 26
Sorry, I meant the original issue, not c#10
,
Sep 26
The bug is a bit confusing since it contains two distinct issues: the report from comment 0, and then one in comment 10. jeremya's fix is for comment 10, but I think he's seeing that because he's on a branch that doesn't have a 4-month old Xcode 10 fix. lgrey is probably seeing comment 0.
,
Sep 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc00f886da3c86052ab12465c168c46849ade9c2 commit bc00f886da3c86052ab12465c168c46849ade9c2 Author: Leonard Grey <lgrey@chromium.org> Date: Wed Sep 26 17:24:22 2018 Mac: Fix 10.14 build failure macOS 10.14 changed the method signature of a block parameter to application:continueUserActivity:restorationHandler: by introducing a lightweight generic. Since the parameter is unused and the protocol specified by the new generic is 10.14+, this change ignores the mismatched parameter. Bug: 887214 Change-Id: I4a111cdb69ac4fcc22a78448b3efb5bc7c0536e9 Reviewed-on: https://chromium-review.googlesource.com/1246322 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Leonard Grey <lgrey@chromium.org> Cr-Commit-Position: refs/heads/master@{#594365} [modify] https://crrev.com/bc00f886da3c86052ab12465c168c46849ade9c2/chrome/browser/app_controller_mac.mm
,
Oct 1
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by eugene70...@gmail.com
, Sep 20