Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870085 - Compiling www-client/chromium with distcc
Summary: Compiling www-client/chromium with distcc
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-14 10:32 UTC by Dan Goodliffe
Modified: 2024-04-25 13:28 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Goodliffe 2022-09-14 10:32:02 UTC
This strictly isn't a bug or an enhancement, although it could be. It's more a description of a hole I've fallen into several times and am wondering if there's a recommended/supported way to avoid doing so easily or maybe the build could be adjusted to avoid it. So here goes...

Chromium is a big build, so I presume like many people, I use distcc (and ccache). My distcc nodes all have the same compiler commands configured, preferring the latest version(s).

Chromium comes along and (like several packages) selects a version of LLVM that is not the latest as per the max slot 14 setting, where 15 is now widely available. It then invokes it [somehow, PATH?] without a version in the command line (x86_64-pc-linux-gnu-clang++)... that gets distributed via distcc which then uses v15 to perform the compilation... which is then cached. All is basically well until the link stage, where it fails because objects compiled with v14 are rejected by the v14 linker (this might be LTO getting into the mix too)

So yes, the strictly speaking answer is build it without distcc/ccache before filing a bug, I know :) Sorry. But thinking out loud, in the case where a specific version of a toolset is selected, should/could it invoke that toolset with a version in it? Could/should `x86_64-pc-linux-gnu-clang++` be `x86_64-pc-linux-gnu-clang++-14` which on the face of it, makes the whole problem go away (maybe overly simplified)?

I appreciate people's time here, pre-emptive thank you :)
Comment 1 Maciej S. Szmigiero 2022-09-22 13:24:47 UTC
It's not www-client/chromium specific, but rather a problem with how llvm.eclass overrides the used LLVM / clang version.

Same thing happens with every package that uses that eclass to override the max LLVM slot, including www-client/firefox and mail-client/thunderbird.

As you say, instead of overriding the LLVM version by editing PATH it should change CXX to something like x86_64-pc-linux-gnu-clang++-14 instead.

CC'ing mgorny, since he's the author of llvm.eclass.
Comment 2 Maciej S. Szmigiero 2022-09-22 13:43:34 UTC
A workaround is to re-launch the build host distccd for every such package, with its PATH only containing the LLVM version matching the LLVM_MAX_SLOT defined in the package currently being built.

Obviously, this requires careful attendance for emerge -u @world.

Also, the title of this bug should be changed into something like:
"llvm.eclass: incompatible with distcc".
Comment 3 Dan Goodliffe 2022-09-27 09:16:50 UTC
Just for my own sanity, is it also the case that this from BDEPEND:

	lto? ( $(depend_clang_llvm_versions 13 14 15) )

Pulls in any version 13 to 15 of sys-devel/lld, which given LLVM_MAX_SLOT=14 and lld isn't slotted, can lead to a suitable version of lld not being found?

I've masked v15 as a workaround to this... but I've also tried removing 15 from the above list which also appears to work.
Comment 4 cJ 2024-04-23 15:22:59 UTC
I tried a build today and got 

x86_64-pc-linux-gnu-clang++: error: no such file or directory: '../../build/linux/unbundle/openh264_encoder_cfi_ignores.txt'

due to the argument 
-fsanitize-ignorelist=../../build/linux/unbundle/openh264_encoder_cfi_ignores.txt

which is not supported by distcc (or ccache).
Comment 5 Matt Jolly gentoo-dev 2024-04-25 01:58:58 UTC
The TL;DR here is that distcc is unsupported, though if there are ebuild changes that need to be made I'm willing to accept patches.

In the longer term, the chromium ebuild is binpkg ready, I just need to do some portage work to make binhost builds work, hopefully that won't take too long!
Comment 6 cJ 2024-04-25 13:28:55 UTC
One can go further with a distcc wrapper that removes the -fsanitize-ignorelist argument, only later to hit (-j128):
 ../../chrome/browser/ui/views/frame/browser_view.h:44:10: fatal error: 'components/enterprise/buildflags/buildflags.h' file not found