Known problems with XCode 12.4?

400 views
Skip to first unread message

Sigurður Ásgeirsson

unread,
Feb 4, 2021, 3:10:28 PM2/4/21
to chromium-dev
Hey y'all,

I'm trying to compile Chrome on a Mac for the first time (in a long time at least). I've installed XCode 12.4 and generally followed the build instructions, but I'm getting build errors involving files such as "exc.defs"
I guess either my setup went awry somewhere, or there's a problem with the 11.1 SDK that comes with XCode 12.4?

Below is the output from find_sdk, xcode-select -p, et al:

Here's the SDK version discovered by find_sdk:
% build/mac/find_sdk.py 11.0
11.1

And here's what xcode-select tells me is the selected developer directory, and what's there:
% xcode-select -p
/Applications/Xcode.app/Contents/Developer
% ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
DriverKit20.2.sdk       MacOSX.sdk              MacOSX11.1.sdk

Here's the only place I find a file by that name in that directory:
find `xcode-select -p` -name exc.defs
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach/exc.defs 

Though the /Library/Developer directory looks more promising?
% find /Library/Developer -name exc.defs
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/mach/exc.defs

Here's the error I get:
--- cut here ---
python ../../native_client/src/trusted/service_runtime/osx/run_mig.py sdk/xcode_links/MacOSX11.1.sdk/usr/include/mach/exc.defs gen/native_client/src/trusted/service_runtime/nacl_exc.h gen/native_client/src/trusted/service_runtime/nacl_exc_server.c --sdk sdk/xcode_links/MacOSX11.1.sdk
Traceback (most recent call last):
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 111, in <module>
    Main(sys.argv[1:])
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 107, in Main
    parsed.clang_path, parsed.migcom_path)
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 43, in Generate
    fh = open(src_defs, 'r')
IOError: [Errno 2] No such file or directory: 'sdk/xcode_links/MacOSX11.1.sdk/usr/include/mach/exc.defs'
--- cut here ---

Any advice? Back off to 12.2?

Siggi

Olivier Li

unread,
Feb 4, 2021, 3:14:32 PM2/4/21
to Chromium-dev, Sigurður Ásgeirsson
I have no idea if it applies here or not but I once had some pretty weird xcode errors when I tried to run a Chromium build without having fully launched the Xcode app and answered all the prompts first.

Did you do that?

Ian Clelland

unread,
Feb 4, 2021, 3:26:43 PM2/4/21
to Sigurður Ásgeirsson, Chromium-dev, oliv...@chromium.org
I just updated Xcode for sheriffing, having not compiled locally for a couple of months, and ended up installing 12.3 (12.2 doesn't have the SDK version we currently require,) launching the Xcode app to install the "additional components", installing the command line tools, and then finally running build/mac_toolchain.py.

The last step prompts you to accept the Xcode licence agreement, which is necessary in order for ninja to use the command line tools.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/d84a878b-37eb-431f-a30f-b56cb3437cfdn%40chromium.org.

Nico Weber

unread,
Feb 4, 2021, 3:32:25 PM2/4/21
to Ian Clelland, Sigurður Ásgeirsson, Chromium-dev, oliv...@chromium.org
build/mac_toolchain.py downloads a hermetic toolchain (if you have read access to the bucket, which you do if you auth with @google creds). If you do that, you don't need to do any of the other stuff, in that case the build doesn't use system Xcode or command line tools.

But not using build/mac_toolchain.py with system Xcode etc should work as well. (I haven't tried recently.)

Mark Mentovai

unread,
Feb 4, 2021, 3:47:13 PM2/4/21
to Nico Weber, Ian Clelland, Sigurður Ásgeirsson, Chromium-dev, oliv...@chromium.org
The fact that the SDK is named 11.0 (Xcode 12.1, 12.2) and 11.1 (12.3 and 12.4) rather than just 11 may be causing a problem that we'll need to work around.

Mark Mentovai

unread,
Feb 4, 2021, 3:54:22 PM2/4/21
to Sigurður Ásgeirsson, chromium-dev
On Thu, Feb 4, 2021 at 3:10 PM Sigurður Ásgeirsson <si...@chromium.org> wrote:
Hey y'all,

I'm trying to compile Chrome on a Mac for the first time (in a long time at least). I've installed XCode 12.4 and generally followed the build instructions, but I'm getting build errors involving files such as "exc.defs"
I guess either my setup went awry somewhere, or there's a problem with the 11.1 SDK that comes with XCode 12.4?

Below is the output from find_sdk, xcode-select -p, et al:

Here's the SDK version discovered by find_sdk:
% build/mac/find_sdk.py 11.0
11.1

And here's what xcode-select tells me is the selected developer directory, and what's there:
% xcode-select -p
/Applications/Xcode.app/Contents/Developer
% ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
DriverKit20.2.sdk       MacOSX.sdk              MacOSX11.1.sdk

Here's the only place I find a file by that name in that directory:
find `xcode-select -p` -name exc.defs
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach/exc.defs 

That’s weird.

mark@sweet16 zsh% xcodebuild -version
Xcode 12.4
Build version 12D4e
mark@sweet16 zsh% ls -l $(xcrun --show-sdk-path)/usr/include/mach/exc.defs
-rw-r--r--  1 root  wheel  4020 Nov 30 03:56 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/exc.defs
 

This came from Xcode_12.4.xip, SHA256 cc8d10155258f9ddaa5e422ab8f50e6058758c95208e58e59b5db1db033ce2ff. Did you get Xcode from there, from the App Store, or from v1ru5-4-u.com?

Though the /Library/Developer directory looks more promising?
% find /Library/Developer -name exc.defs
/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/mach/exc.defs

Here's the error I get:
--- cut here ---
python ../../native_client/src/trusted/service_runtime/osx/run_mig.py sdk/xcode_links/MacOSX11.1.sdk/usr/include/mach/exc.defs gen/native_client/src/trusted/service_runtime/nacl_exc.h gen/native_client/src/trusted/service_runtime/nacl_exc_server.c --sdk sdk/xcode_links/MacOSX11.1.sdk
Traceback (most recent call last):
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 111, in <module>
    Main(sys.argv[1:])
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 107, in Main
    parsed.clang_path, parsed.migcom_path)
  File "../../native_client/src/trusted/service_runtime/osx/run_mig.py", line 43, in Generate
    fh = open(src_defs, 'r')
IOError: [Errno 2] No such file or directory: 'sdk/xcode_links/MacOSX11.1.sdk/usr/include/mach/exc.defs'
--- cut here ---

Any advice? Back off to 12.2?

Siggi

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Sigurður Ásgeirsson

unread,
Feb 4, 2021, 4:02:09 PM2/4/21
to Chromium-dev, Mark Mentovai, chromium-dev, Sigurður Ásgeirsson
On Thursday, February 4, 2021 at 3:54:22 PM UTC-5 Mark Mentovai wrote:
On Thu, Feb 4, 2021 at 3:10 PM Sigurður Ásgeirsson <si...@chromium.org> wrote:
Hey y'all,

I'm trying to compile Chrome on a Mac for the first time (in a long time at least). I've installed XCode 12.4 and generally followed the build instructions, but I'm getting build errors involving files such as "exc.defs"
I guess either my setup went awry somewhere, or there's a problem with the 11.1 SDK that comes with XCode 12.4?

Below is the output from find_sdk, xcode-select -p, et al:

Here's the SDK version discovered by find_sdk:
% build/mac/find_sdk.py 11.0
11.1

And here's what xcode-select tells me is the selected developer directory, and what's there:
% xcode-select -p
/Applications/Xcode.app/Contents/Developer
% ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
DriverKit20.2.sdk       MacOSX.sdk              MacOSX11.1.sdk

Here's the only place I find a file by that name in that directory:
find `xcode-select -p` -name exc.defs
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach/exc.defs 

That’s weird.

mark@sweet16 zsh% xcodebuild -version
Xcode 12.4
Build version 12D4e
mark@sweet16 zsh% ls -l $(xcrun --show-sdk-path)/usr/include/mach/exc.defs
-rw-r--r--  1 root  wheel  4020 Nov 30 03:56 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/exc.defs
 

This came from Xcode_12.4.xip, SHA256 cc8d10155258f9ddaa5e422ab8f50e6058758c95208e58e59b5db1db033ce2ff. Did you get Xcode from there, from the App Store, or from v1ru5-4-u.com?

Yeah, weird. I downloaded from developers.apple.com, as I was stubbornly trying to avoid creating an Apple ID (it's futile).

Looks like the include dir was only missing a couple of files (that we use), as the following got around the build errors. Weirdness... I guess in the morning I'll turf this XCode and either start again or just use mac_toolchain.py...

  102  cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/notify.defs /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/
  103  autoninja -C out/Default chrome
  104  cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_exc.defs /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/ 

Mark Mentovai

unread,
Feb 4, 2021, 4:50:37 PM2/4/21
to Sigurður Ásgeirsson, Chromium-dev
Sigurður Ásgeirsson wrote:
For the future: as a Googler, you’re welcome to grab what you need from go/xcode. The .xips are archived there.

There are two ways to download things from developer.apple.com: you can skip past all of the glitzy giant icons to the tiny “More”, which takes you to all downloads, including Xcode .xips. Or, you can fall for their trap and follow the big glitzy Xcode icon, which takes you into the App Store.

Looks like the include dir was only missing a couple of files (that we use), as the following got around the build errors. Weirdness... I guess in the morning I'll turf this XCode and either start again or just use mac_toolchain.py...

  102  cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/notify.defs /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/
  103  autoninja -C out/Default chrome
  104  cp /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/mach/mach_exc.defs /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/ 

Maybe the App Store version of Xcode 12.4 is missing the .defs files that belong in the SDK. Oops?

/Library/Developer/CommandLineTools may not have been at the same version as /Applications/Xcode.app, so you may now have an SDK that’s not internally consistent. May not cause any problems, but no promises.

Sigurður Ásgeirsson

unread,
Feb 4, 2021, 5:00:14 PM2/4/21
to Nico Weber, Ian Clelland, Chromium-dev, oliv...@chromium.org
On Thu, Feb 4, 2021 at 3:31 PM Nico Weber <tha...@chromium.org> wrote:
build/mac_toolchain.py downloads a hermetic toolchain (if you have read access to the bucket, which you do if you auth with @google creds). If you do that, you don't need to do any of the other stuff, in that case the build doesn't use system Xcode or command line tools.

Looks like it bails out if the computer is off-corp, I may yet force it :).

Sigurður Ásgeirsson

unread,
Feb 4, 2021, 5:57:56 PM2/4/21
to Chromium-dev, Mark Mentovai, Chromium-dev, Sigurður Ásgeirsson
On Thursday, February 4, 2021 at 4:50:37 PM UTC-5 Mark Mentovai wrote:
Maybe the App Store version of Xcode 12.4 is missing the .defs files that belong in the SDK. Oops?

/Library/Developer/CommandLineTools may not have been at the same version as /Applications/Xcode.app, so you may now have an SDK that’s not internally consistent. May not cause any problems, but no promises.

I turfed the Xcode I downloaded from developers.apple.com and installed the store version. The compile completed without a hitch - weirdness. Maybe I was holding it wrong somehow :). 

Sigurður Ásgeirsson

unread,
Feb 4, 2021, 7:55:39 PM2/4/21
to Chromium-dev, Olivier Li, Sigurður Ásgeirsson
On Thursday, February 4, 2021 at 3:14:32 PM UTC-5 Olivier Li wrote:
I have no idea if it applies here or not but I once had some pretty weird xcode errors when I tried to run a Chromium build without having fully launched the Xcode app and answered all the prompts first.

Did you do that?

I did launch it before building, but clearly something derailed at some point - IDK...
Reply all
Reply to author
Forward
0 new messages