Building on MAC fails

1,068 views
Skip to first unread message

Sebastian Onofrei

unread,
Nov 12, 2023, 9:43:26 PM11/12/23
to Chromium-dev
Hello guys,

I am not working directly with chrome code 0 but with Brave Browser's fork. And I am not affiliated to Brave team.

But I have a question, since reaching the guys at Brave is ... not likely to happen.

Last time I built Brave on MAC was somewhere at version 110.
A month or so ago I tried building v115 and it failed. Yesterday I tried again with v119 and it failed again.

This is the error:

ERROR at //build/config/BUILDCONFIG.gn:272:3: Assertion failed.
assert(false, “Unsupported target_os: $target_os”)
^-----
Unsupported target_os: macos
null
null


Any idea what could be the issue?

K. Moon

unread,
Nov 13, 2023, 1:08:25 PM11/13/23
to se...@onofrei.org, Chromium-dev
Unless you can replicate your issue with the plain Chromium code, I don't think anyone here can help you; there's just too many things that could be different.

--
--
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/084f8d47-4394-4e46-a401-d90168e05fa6n%40chromium.org.

Dirk Pranke

unread,
Nov 13, 2023, 7:30:03 PM11/13/23
to se...@onofrei.org, Chromium-dev, km...@chromium.org
Well, if that error was happening on a Chromium build, that would mean that you had set `target_os="macos"` in your args.gn file. You'd probably want to use "mac" instead.

-- Dirk

Sebastian Onofrei

unread,
Nov 14, 2023, 2:10:33 PM11/14/23
to Chromium-dev, Dirk Pranke, Chromium-dev, km...@chromium.org, se...@onofrei.org
Hey guys,

I also though that could be an args.gn issue but knowing that guys at Brave are releasing MAC builds... didn't consider it would be such a "direct" issue.
Indeed, I made a small change in their args.gn generator, and now the project builds.

Many thanks!

Sebastian Onofrei

unread,
Nov 20, 2023, 10:36:16 AM11/20/23
to Chromium-dev, Sebastian Onofrei, Dirk Pranke, Chromium-dev, km...@chromium.org
Hello guys,

I have one more question.
I discovered that chrome built successfully till a point when it thrown some build errors. And after investigated, discovered that I actually need tu upgrade to MAC Ventura, to benefit from newest SDK/etc
And so I discovered that my MAC from 2016 cannot be upgraded anymore... probably I'm stuck with Monterey.

Is there any chance/trick that I can do to either upgrade to Ventura or make it so that the chrome builds with my latest SDK (13.1 i think)?

Nico Weber

unread,
Nov 26, 2023, 7:18:41 PM11/26/23
to se...@onofrei.org, Chromium-dev, Dirk Pranke, km...@chromium.org
We shouldn't use too many of the binaries in the SDK. Maybe you can get the 13.1 SDK from elsewhere and put it on your Monterey machine, and the build might work.

It's not a very tested setup, though.

Nico Weber

unread,
Dec 1, 2023, 7:58:38 AM12/1/23
to Sebastian Onofrei, Chromium-dev, Dirk Pranke, km...@chromium.org
Are you doing an is_official_build=true build? The diagnostic might be slightly less cryptic if you don't set that.

On Fri, Dec 1, 2023, 4:08 PM Sebastian Onofrei <se...@onofrei.org> wrote:
Got it to compile till almost the end, when i'm stuck with some linking error that I cannot figure out :)

> autoninja -C /Users/sebionofrei/Projects/brave/src/out/Release brave -k 1 --offline
ninja: Entering directory `/Users/sebionofrei/Projects/brave/src/out/Release'
[1/292] LINK ./v8_context_snapshot_generator
FAILED: v8_context_snapshot_generator v8_context_snapshot_generator.unstripped
TOOL_VERSION=1701280563 ../../build/toolchain/apple/linker_driver.py -Wcrl,driver,../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wcrl,strippath, [etc]
[.........]
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/base/base/spinlock.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/base/log_severity/log_severity.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/types/bad_optional_access/bad_optional_access.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/strings/strings/ascii.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/strings/strings/charconv.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)

Sebastian Onofrei

unread,
Dec 1, 2023, 5:17:13 PM12/1/23
to Chromium-dev, Nico Weber, Chromium-dev, Dirk Pranke, km...@chromium.org, se...@onofrei.org
Got it to compile till almost the end, when i'm stuck with some linking error that I cannot figure out :)

> autoninja -C /Users/sebionofrei/Projects/brave/src/out/Release brave -k 1 --offline
ninja: Entering directory `/Users/sebionofrei/Projects/brave/src/out/Release'
[1/292] LINK ./v8_context_snapshot_generator
FAILED: v8_context_snapshot_generator v8_context_snapshot_generator.unstripped
TOOL_VERSION=1701280563 ../../build/toolchain/apple/linker_driver.py -Wcrl,driver,../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wcrl,strippath, [etc]
[.........]
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/base/base/spinlock.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/base/log_severity/log_severity.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/types/bad_optional_access/bad_optional_access.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/strings/strings/ascii.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)
ld64.lld: error: linking module flags 'SDK Version': IDs have conflicting values ('[2 x i32] [i32 13, i32 1]' from obj/third_party/abseil-cpp/absl/strings/strings/charconv.o with '[2 x i32] [i32 14, i32 0]' from ld-temp.o)


On Monday, November 27, 2023 at 2:18:41 AM UTC+2 Nico Weber wrote:

Sebastian Onofrei

unread,
Dec 1, 2023, 5:17:21 PM12/1/23
to Chromium-dev, Nico Weber, Chromium-dev, Dirk Pranke, km...@chromium.org, Sebastian Onofrei
yes, it's a release build (with is_official_build set to true)

Avi Drissman

unread,
Dec 1, 2023, 5:37:16 PM12/1/23
to se...@onofrei.org, Chromium-dev, Nico Weber, Dirk Pranke, km...@chromium.org
It looks like you built some files with the 13.1 SDK and some with the 14.0 SDK and the linker isn't happy. You may want to build all your files with the same SDK.

Avi Drissman

unread,
Dec 2, 2023, 7:20:17 PM12/2/23
to Sebastian Onofrei, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
Again, precisely describe what happens, including logs. “It failed to run” provides no info. 

On Sat, Dec 2, 2023 at 2:08 PM Sebastian Onofrei <se...@onofrei.org> wrote:
Hello guys,

Building worked, thanks all for your feedback. 
However, despite it being successfully built, it failed to run on a Mac Sonoma (14.1.2)
Any advice on this?

Sebastian Onofrei

unread,
Dec 2, 2023, 10:16:27 PM12/2/23
to Chromium-dev, Avi Drissman, Chromium-dev, Nico Weber, Dirk Pranke, km...@chromium.org, se...@onofrei.org
Thanks all, did a wipe of src/out directory and rebuild and now it worked.

On Saturday, December 2, 2023 at 12:37:16 AM UTC+2 Avi Drissman wrote:

Sebastian Onofrei

unread,
Dec 2, 2023, 10:16:36 PM12/2/23
to Chromium-dev, Avi Drissman, Chromium-dev, Nico Weber, Dirk Pranke, km...@chromium.org, se...@onofrei.org
Hello guys,

Building worked, thanks all for your feedback. 
However, despite it being successfully built, it failed to run on a Mac Sonoma (14.1.2)
Any advice on this?


On Saturday, December 2, 2023 at 12:37:16 AM UTC+2 Avi Drissman wrote:

Avi Drissman

unread,
Dec 4, 2023, 11:31:05 AM12/4/23
to Sebastian Onofrei, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
If you run it from the commandline, what happens?

If errors are displayed, please copy and paste those errors into an email reply; do not paraphrase them or describe them.

On Sat, Dec 2, 2023 at 11:46 PM Sebastian Onofrei <se...@onofrei.org> wrote:
Hey Avi. Yes, sorry for the evasive reply.

The error states that the app is not supported on that MAC os version (and it's logo in the dmg package has a "denied" overlay. 

Avi Drissman

unread,
Dec 4, 2023, 2:20:17 PM12/4/23
to Sebastian Onofrei, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
  kLSExecutableIncorrectFormat  = -10661, /* No compatible executable was found*/

Are you building for Arm but trying to run on x86 or something like that?

On Mon, Dec 4, 2023 at 12:23 PM Sebastian Onofrei <se...@onofrei.org> wrote:
livia@Livias-MacBook-Pro /Applications % open Brave\ Browser.app
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10661 "(null)" UserInfo={_LSLine=4141, _LSFunction=_LSOpenStuffCallLocal}

That is the only text in terminal when running it.

Avi Drissman

unread,
Dec 4, 2023, 3:20:23 PM12/4/23
to Sebastian Onofrei, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
While copying those tools over might work, it's unsupported. Our suggestion was that it might work and to give it a try, but if it's failing in a weird way then it'd be up to you to diagnose.

On Mon, Dec 4, 2023 at 3:04 PM Sebastian Onofrei <se...@onofrei.org> wrote:
Absolutely not.

Built it on an outdated mac ( stuck with Monterey, it's a 2015 mac) but with 14.1 SDK copied-over so latest code compiled according to suggestions from Nico Weber (received here in this discussions thread).
The same binary works ok on my Monterey, but fails with the above error code on Sonoma (didn't tested on Ventura though, didn't had the chance to)

Sebastian Onofrei

unread,
Dec 4, 2023, 4:41:33 PM12/4/23
to Avi Drissman, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
Hey Avi. Yes, sorry for the evasive reply.

The error states that the app is not supported on that MAC os version (and it's logo in the dmg package has a "denied" overlay. 


On Sun, Dec 3, 2023, 02:18 Avi Drissman <a...@chromium.org> wrote:

Sebastian Onofrei

unread,
Dec 4, 2023, 4:41:54 PM12/4/23
to Chromium-dev, Avi Drissman, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org, Sebastian Onofrei
Absolutely not.

Built it on an outdated mac ( stuck with Monterey, it's a 2015 mac) but with 14.1 SDK copied-over so latest code compiled according to suggestions from Nico Weber (received here in this discussions thread).
The same binary works ok on my Monterey, but fails with the above error code on Sonoma (didn't tested on Ventura though, didn't had the chance to)

Sebastian Onofrei

unread,
Dec 4, 2023, 4:42:06 PM12/4/23
to Chromium-dev, Avi Drissman, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org, Sebastian Onofrei
livia@Livias-MacBook-Pro /Applications % open Brave\ Browser.app
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10661 "(null)" UserInfo={_LSLine=4141, _LSFunction=_LSOpenStuffCallLocal}

That is the only text in terminal when running it.

On Monday, December 4, 2023 at 6:31:05 PM UTC+2 Avi Drissman wrote:

Sebastian Onofrei

unread,
Dec 6, 2023, 1:20:09 PM12/6/23
to Avi Drissman, Chromium-dev, Dirk Pranke, Nico Weber, km...@chromium.org
I understand very well,
Thanks very much Avi (and the others) for all the time spent on advising, it's really appreciated. Keep up the amazing work you guys do!


Kind regards,
Sebastian Onofrei
http://ro.linkedin.com/in/theselby
Cell: +40-745-337579

Reply all
Reply to author
Forward
0 new messages