Comment by rmunn

3 days ago

Also worth noting https://lwn.net/Articles/1097760/ - Gentoo has given up on building Chromium from source, because upstream "do not test their builds with any of their allegedly 'optional' features disabled" and "[i]n the case of Chromium, keeping all the toggle switches working (despite chronic neglect from upstream) is a monumental, nigh-insurmountable task." One maintainer said he could not possibly test all the combinations of USE flags in the Gentoo build, since his laptop took 15-16 hours to compile Chromium (I presume for just one build, which would have to be repeated 2^N times to test all possible flag combinations).

Much more in the LWN article, I'm not going to quote everything.

upstream "do not test their builds with any of their allegedly 'optional' features disabled"

I've noticed this too and it's really annoying. Their CI doesn't even run `gn` for the use-flag permutations, which would take a trivial amount of compute. They could easily compile-but-not-link for every combination of flags in CI too at only a modest compute expenditure. At least that way people who break the #ifdef maze would be forced to fix it.

To be fair though: that's a gentoo fault. They want to be able to be as customizable as possible, which is fine, but if you support all flag-combinations, you are going to either test them all, or forego testing them. It's also a bit awkward that they don't mention this with regards to the linux kernel. Are the use flags that limited to begin with?

  • I'm betting the Linux kernel actually tests their config combinations. The complaint is that Chromium doesn't test turning off their allegedly-optional features, so when one of those features turns out not to be as optional as it claims to be, it's Gentoo maintainers who bear the brunt of discovering that (or users end up finding it out if it's not tested).

    I can't tell you what Gentoo does with the Linux kernel in terms of USE flags; it's been over a decade since I last tried Gentoo and I don't want to spend the time looking it up since I doubt anyone truly cares. (If someone does care enough and looks it up, I care just enough to be curious to know what you find).

    • > I'm betting the Linux kernel actually tests their config combinations.

      What makes you bet that?

      As far as I know, the kernel doesn't have any official CI. People test as they feel like it. Some people/companies build some CI initiatives, others don't use them.

      https://lwn.net/Articles/972713/

      Also the kernel has > 10000 Kconfig options. Somebody told me that 2^64 is a lot, and that 2^10000 is a lot more.

      1 reply →

  • How is it their fault when they're just trying to hold the Chromium team to their word about those flags being optional. If they're truly optional, then it shouldn't matter how they are combined.

  • Then those chromium flags should not exist.

    • It's fine for them to exist, and probably better -- you can land incomplete things behind a feature flag and avoid some amount of rebase/merge hell.

      But they should be marked experimental in that case, not optional. Optional flags ought to work together, or at least it should be considered a bug worth quickly fixing if they don't. Combining experimental flags otoh is Buyer Beware.

I wonder how the Helium [0] project solves this, since they also work off of an opinionated-ish Chromium base.

[0] https://helium.computer

  • I only glanced at Helium's site, but I suspect from what I saw that they pick a status (enabled/disabled) for all those optional features, meaning they just have to test one (or maybe two or four) combinations of `--enable-foo` / `--enable-bar` flags. Whereas Gentoo tried to allow users to set whatever combination they wanted, and that wasn't working so well when upstream wasn't helping.

Well. Maybe they should just not have so many flags than?

  • What you're saying is "maybe they should stop being Gentoo". The whole point of Gentoo is customization of your built-from-source packages. (As I recall, but it's been over a decade since I tried it so I might be remembering things wrong). Every optional feature in a piece of software, that would be controlled by some `--with-foo` option to `configure`, gets turned into a USE flag in Gentoo. Packages that have `--with-foo`, `--with-bar`, `--with-baz`, and `--with-quux` then have four USE flags, with 16 possible combinations of enabled or disabled. And the Gentoo maintainers team tries to make sure that all those combinations work, except for ones that obviously contradict each other.

    So it's not Gentoo's decision to have so many flags, it's upstream's decision. I bet the Gentoo maintainers would love it if upstream acknowledged "okay, this 'optional' feature isn't really optional any longer". But they don't, and they continue to have dozens of flags, which Gentoo (due to their build philosophy) dutifully copied and tried to test — an overwhelming task.

    • > So it's not Gentoo's decision to have so many flags, it's upstream's decision.

      That's a weird statement to make though. I would say that it was Gentoo's decision to test for all functionality.

      But, even ignoring this for the moment: how does this apply to the linux kernel? Because the config file has TONS of options. Does Gentoo support all of these via use flags? If not, why not? Because that distinction to me would be totally arbitrary.

      6 replies →