Score:1

Building Chromium -- too long and the building args

lr flag

A Chromium that I'm currently building, has been taking too long - around 12 hours already, it's still around 2/3 from completion at best:

......
[37717/51410] CXX obj/content/browser/browser/navigation_loader_interceptor.o
[37718/51410] CXX obj/content/browser/browser/navigation_url_loader_delegate.o
[37719/51410] CXX obj/content/browser/browser/navigation_url_loader.o
[37720/51410] CXX obj/content/browser/browser/prefetch_url_loader.o
[37721/51410] CXX obj/content/browser/browser/prefetch_url_loader_service.o

I followed the official instructions - https://chromium.googlesource.com/chromium/src/+/main/docs/linux/build_instructions.md - and well as the recommendations of how to speed the compilation up. Here's my building flags for NG

$ EDITOR=vim gn args out/my_build1
===>

is_debug = false
symbol_level = 0

dcheck_always_on = false
is_official_build = true
enable_nacl = false

blink_symbol_level = 0
v8_symbol_level = 0
chrome_pgo_phase = 0

Perhpahs, they haven't been applied given that it's taken too long already? How would I verify whether or not?

Also, in the instruction the order isn't described:

  • whether one has to call gn gen out/Default first and then gn args out/Default
  • or gn args out/Default first and then gn gen out/Default
  • or gn args out/Default alone and then start to build it.

Which one? I might've messed up with the order.


FF would take around 3 hours to get compiled.

us flag
Fond memories. Building X11 from source in 1992 could take 2-3 days. :)
Score:0
tv flag

Chromium is huge, don't underestimate that. It took an ARM Launchpad builder 100 h to build it once, though in x86 it is usually done in about 8 h. With that context, 12 h isn't absurd (and note some particular steps may take really long that you may think it's stuck), but you haven't disclosed your machine hardware. I for one wouldn't dare building it on my computer.

And be warned, the final linking requires an enormous amount of memory. You don't want to sit through that only to have it OOM-killed in the step 51409/51410. I'd make sure to have either 32 GB of memory or to limit the parallel jobs (c.f. this patch, copy and paste the link if it asks you for registration, this is a Firefox bug).

I might've messed up with the order.

That might be. Remember, GN stands for "Generate Ninja", so you should first have gn args out/Default and then gn gen out/Default.

From gn gen --help:

Generates ninja files from the current tree

whereas gn args --help:

Open the arguments for the given build directory in an editor. If the given build directory doesn't exist, it will be created and an empty args file will be opened in the editor.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.