Remix.run Logo
▲ rmunn 11 hours 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.

▲msdz 10 hours ago | parent | next [-]

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

[0] https://helium.computer

▲rmunn 10 hours ago | parent [-]

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.

▲shevy-java 9 hours ago | parent | prev | next [-]

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?

▲jazzypants 2 hours ago | parent | next [-]

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.

▲rmunn 8 hours ago | parent | prev | next [-]

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).

▲nh2 6 hours ago | parent [-]

> 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.

▲evgpbfhnr 4 hours ago | parent [-]

all config combinations aren't valid (because of dependencies), and when there isn't they are mostly independent (e.g. 2 builds with CONFIG_FOO=y/CONFIG_BAR=y and CONFIG_FOO=n/CONFIG_BAR=n cover 100% of the cases for unrelated FOO/BAR), so it's not that bad.

And folks do build stuff, including with the awesome "randconfig" mode which generates a.. random config, so while it's still possible for some specific config to not actually work at runtime it's actually quite unlikely for build itself to fail (for releases at least)

▲mg794613 2 hours ago | parent | prev | next [-]

How is a disfunctional optional Gentoo's fault??

▲aragilar 7 hours ago | parent | prev [-]

Then those chromium flags should not exist.

▲Mic92 10 hours ago | parent | prev | next [-]

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

▲rmunn 10 hours ago | parent [-]

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.

▲shevy-java 9 hours ago | parent [-]

> 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.

▲rmunn 8 hours ago | parent [-]

Would you say they should NOT test the options they're offering the user?

Because Gentoo has basically three options; let me know if you can think of a fourth option I'm missing.

1. Turn every optional feature from upstream into a USE flag, and test them. Which means testing all the 2^N combinations.

2. Turn every optional feature from upstream into a USE flag, but do not test them. Which means users can end up with untested combinations, some of which have proven in the past to be buggy.

3. Stop turning every optional feature from upstream into a USE flag. Which means giving up on Gentoo's distinguishing characteristics for this package.

Okay, I guess there's a fourth option:

4. Stop packaging the Chromium package at all. Which is what they've ended up doing.

▲debugnik 7 hours ago | parent | next [-]

I can tell you what Gentoo shouldn't do: blame upstream for having assigned themselves the mission to support and test 2^N combinations of options for which they don't get to curate N.

They're free to limit which options they offer, they're free to limit which combinations they support, and they're free to fork or drop the software they offer if they insist on keeping the 2^N purity (which they eventually did). But that's Gentoo's mission, not upstream's. Upstream is just giving them software for free on an as-is basis.

▲rmunn 2 hours ago | parent [-]

> Upstream is just giving them software for free on an as-is basis.

While the "we're entitled to bugfixes" attitude is definitely annoying for software maintainers to deal with, and you (as the end user) aren't entitled to anything from 99% of open-source projects... this is Chromium we're talking about. The browser engine that powers 75-95% of all Web browsing (it's very hard to pin down actual numbers, but it's huge). It is not too much to ask that the Chromium maintainers either 1) test all the combinations of optional flags they have, or 2) declare that some of those optional flags are no longer optional. In other words, to act like professionals.

(I don't use Chromium myself — switched to Firefox years ago because I tend to open a lot of tabs, which make Chromium seem to just gobble up RAM, and Firefox appears a little better at RAM management, or at least it did at the time I switched (haven't checked recently). So this isn't "the Chromium team owes me something", this is shaking my head in disappointment at what the Gentoo maintainers report that Chromium team is doing, or rather not doing. As I said, there are some projects — the Linux kernel is one, and Chromium is another — that are so widely used that a certain level of professionalism should be expected of their maintainers. I agree that that attitude of entitlement is not deserved in about 99% of open-source projects. But Chromium is part of the 1% exception, IMHO).

▲debugnik an hour ago | parent [-]

(I too use Firefox, even on Android.)

I just don't like this idea that downstream maintainers need to be saved from themselves by limiting the options upstream provides them.

Downstream are not end users, which I agree should only get tested builds. They're professionals too, and they can be trusted to pick the configurations they want to build, evaluate how much more testing they need, and cut out configurations from their support matrix if they don't have the resources to support them.

Also, this idea that a professional project wouldn't offer untested combinations of settings to other professionals is why people follow up asking about Linux. A quick search tells me it's got ~19,000 Kconfig options[1].

[1]: https://dl.acm.org/doi/fullHtml/10.1145/3646548.3676548

▲uniq7 8 hours ago | parent | prev [-]

Which option was chosen for the Linux kernel?

▲csande17 5 hours ago | parent [-]

Traditionally, the Gentoo package manager didn't actually compile the Linux kernel at all. Instead it just extracted the source code to a folder on your hard drive and you were supposed to go configure, build, and install it yourself. Gentoo Wiki pages would list out the options you had to go set in the `make menuconfig` menu to get specific software to work.

These days there is a package that builds the kernel for you, but it relies on the "savedconfig" system to just save/load the entire kernel config file instead of using USE flags. So you still have to root around in the config menu yourself to change things.

In my experience Linux is very good at correctly declaring dependencies between options, and still working with options disabled, so this isn't as much of a problem as it seems to be for Chromium.

▲octoberfranklin 10 hours ago | parent | prev [-]

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.