News for hackers. Stuff that matters.
Re:Make Ubuntu packages 90% faster by rebuilding them by teitoklien on Tuesday March 18, 2025 @09:05PM (#43407235)
Gentoo linux is essentially made specifically for people like this, to be able to optimize one’s own linux rig for one’s specific usecase.

After initial setup, it’s pretty simple and easy to use, I remember making a ton of friends at matrix’s Gentoo Linux channel, was fun times.

https://www.gentoo.org/

Fun fact, initial ChromeOS was basically just custom Gentoo Linux install, I’m not sure if they still use Gentoo Linux internally.

Re:Make Ubuntu packages 90% faster by rebuilding them by donio on Tuesday March 18, 2025 @10:31PM (#43407741)
> Gentoo linux is essentially made specifically for people like this, to be able to optimize one’s own linux rig for one’s specific usecase.

That's true but worth noting that "optimize" here doesn't necessarily refer to performance.

I've been using Gentoo for 20 years and performance was never the reason. Gentoo is great if you know how you want things to work. Gentoo helps you get there.

Re:Make Ubuntu packages 90% faster by rebuilding them by kennysoona on Wednesday March 19, 2025 @01:26AM (#43408513)
If it wasn't for performance, what was gained in using it over something like Slackware and building only the packages you needed to?
Re:Make Ubuntu packages 90% faster by rebuilding them by CamouflagedKiwi on Wednesday March 19, 2025 @03:37AM (#43409156)
USE flags. You can build packages with specific features enabled or disabled, which can further reduce your dependency tree.
Re:Make Ubuntu packages 90% faster by rebuilding them by kennysoona on Wednesday March 19, 2025 @03:54AM (#43409248)
For building specific packages with particular flags, wouldn't slackbuilds have been sufficient?
Re:Make Ubuntu packages 90% faster by rebuilding them by stakhanov on Wednesday March 19, 2025 @04:27AM (#43409428)
Reducing the dependency tree gets a bit more complicated once you consider that now you have to satisfy not only runtime dependencies for all packages but also build-time dependencies. There may be ways of cleaning that up after a build, but next time you want to emerge a new package you'll just end up having to re-build the build-time dependencies, so in practice you'll just end up leaving them there. There is an ability to emerge packages to a separate part of the filesystem tree (ROOT="/my/chroot" emerge bla), so that you have one build-time system act as a kind of incubator for a runtime system that gets to be minimal. But you'll end up encountering problems that most other Gentoo users wouldn't encounter, having to do with the separation between build-time dependencies and runtime dependencies not being correctly made in the recipes. Personally, I had been relying on this feature for roughly the last 10 years, but there has been steady deterioration there over the years and I eventually gave up late last year.
Re:Make Ubuntu packages 90% faster by rebuilding them by cb321 on Wednesday March 19, 2025 @08:09AM (#43410846)
This is a good point. I've been using Gentoo since early 2004. Lately, I run into this with dev-lang/tcl only being need to build dev-db/sqlite. I actually think it's pretty weird that software intended to be as widely used as sqlite with as much of a free base of supporting devs doesn't just do the extra effort to use a Makefile.
Re:Make Ubuntu packages 90% faster by rebuilding them by xlii on Wednesday March 19, 2025 @02:00AM (#43408640)
Long time ago when I was using it I preferred Gentoo because of ergonomics and better exposition to supply chain.

Slackware was very manual and some bits were drowned in its low level and long command chains. Gentoo felt easy but highlighted dependencies with a hard cost associated with compilation times.

Being a newb back then I enjoyed user friendliness with access to the machinery beneath. Satisfaction of a 1s boot time speedu, a result of 48h+ compilation, was unparalleled, too ;)

Re:Make Ubuntu packages 90% faster by rebuilding them by 0xbadcafebee on Wednesday March 19, 2025 @03:00PM (#43416016)
> If it wasn't for performance, what was gained

A new hobby

Re:Make Ubuntu packages 90% faster by rebuilding them by kennysoona on Wednesday March 19, 2025 @04:36PM (#43417027)
That's very fair, I've certainly tinkered with stuff for the fun of it when there were easier or more suitable alternatives.
Re:Make Ubuntu packages 90% faster by rebuilding them by 6SixTy on Tuesday March 18, 2025 @09:15PM (#43407309)
Afaik the Gentoo based ChromeOS is being replaced by Android.
Re:Make Ubuntu packages 90% faster by rebuilding them by mycall on Tuesday March 18, 2025 @09:35PM (#43407445)
It will be interesting if Gentoo supported Fuchsia next.
Re:Make Ubuntu packages 90% faster by rebuilding them by surajrmal on Tuesday March 18, 2025 @11:20PM (#43407997)
What would that even mean?
Re:Make Ubuntu packages 90% faster by rebuilding them by sham1 on Wednesday March 19, 2025 @12:14AM (#43408216)
Portage on top of Fuchsia, probably. There's not all that much more to Gentoo all things considered.
Re:Make Ubuntu packages 90% faster by rebuilding them by nickysielicki on Wednesday March 19, 2025 @03:10AM (#43409014)
Zircon is miles apart from linux. It’s like saying you’d run Portage on top of Windows. You and what army?
Re:Make Ubuntu packages 90% faster by rebuilding them by chasil on Wednesday March 19, 2025 @04:27AM (#43409430)
Windows was built with a POSIX subsystem from the very beginning. WSL 1 uses something analogous.

https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem

The Zircon kernel does not support signals, so basic C is not going to work well.

"It is heavily inspired by Unix kernels, but differs greatly. For example, it does not support Unix-like signals, but incorporates event-driven programming and the observer pattern."

https://en.m.wikipedia.org/wiki/Fuchsia_(operating_system)#K...

Re:Make Ubuntu packages 90% faster by rebuilding them by 6SixTy on Wednesday March 19, 2025 @01:26PM (#43414871)
As long as there's Bash and Python support, Gentoo Prefix could as well. That's kind of the only things that are hard needed for Gentoo as Portage is written in Python and Ebuilds are Bash scripts. Bigger issue would be that the Fuchsia kernel likely isn't POSIX complete.
Re:Make Ubuntu packages 90% faster by rebuilding them by ryao on Wednesday March 19, 2025 @02:47PM (#43415869)
Gentoo Portage had support for running on top of Interix, so it did run on Windows at some point (over 15 years ago).
Re:Make Ubuntu packages 90% faster by rebuilding them by yjftsjthsd-h on Wednesday March 19, 2025 @01:11AM (#43408445)
Gentoo already has prefix support for non-Linux systems and used to have at least some interest in a full Gentoo/kFreeBSD, so it's plausible.
Re:Make Ubuntu packages 90% faster by rebuilding them by eru on Tuesday March 18, 2025 @09:29PM (#43407403)
I used Gentoo for a while, but the temptation to endlessly fiddle with everything always let me to eventually break the system. (It's not Gentoo's fault, it's mine.)

Afterwards I moved to ArchLinux, and that has been mostly fine for me.

If you are using a fairly standard processor, then Gentoo shouldn't give you that much of an advantage?

Re:Make Ubuntu packages 90% faster by rebuilding them by ryao on Tuesday March 18, 2025 @10:14PM (#43407649)
Gentoo lets you do all of the tweaks mentioned here within the system package manager, so you still get security updates for your tweaked build. You can also install Gentoo on top of another system via Gentoo Prefix for use as a userland packages manager:

https://wiki.gentoo.org/wiki/Project:Prefix

Re:Make Ubuntu packages 90% faster by rebuilding them by eru on Wednesday March 19, 2025 @02:13AM (#43408713)
> Gentoo lets you do all of the tweaks mentioned here within the system package manager, so you still get security updates for your tweaked build.

Yes, Gentoo is great. I'm just saying that for me it was too much of a temptation.

Re:Make Ubuntu packages 90% faster by rebuilding them by serbuvlad on Wednesday March 19, 2025 @12:52AM (#43408368)
I'd like to bring attention to the ALHP repos[1].

These are the Arch packages built for x86-64-v2, x86-64-v3 and x86-64-v4, which are basically names for different sets of x86-64 extensions. Selecting the highest level supported by your processor should get you most of the way to -march=native, without the hassle of compiling it yourself.

It also enables -O3 and LTO for all packages.

[1]: https://github.com/an0nfunc/ALHP

Re:Make Ubuntu packages 90% faster by rebuilding them by eru on Wednesday March 19, 2025 @02:14AM (#43408715)
Nice, I'll try them out!

LTO is great, but I have my doubts about -O3 (vs the more conservative -O2).

UPDATE: bah, ALHP repos don't support the nvidia drivers. And I don't want to muck around with setting everything up again.

Another update: I moved to nvidia-open, so now I can try the suggested repos.

Re:Make Ubuntu packages 90% faster by rebuilding them by alessandroberna on Wednesday March 19, 2025 @03:35AM (#43409143)
You should be able to use the regular arch repos as a fallback (and even repos from alhp with a lower feature level https://somegit.dev/ALHP/ALHP.GO/issues/255#issuecomment-333...)

doing this should allow you to use as many optimized packages as possible while still being able to install packages not supported by the alhp

Re:Make Ubuntu packages 90% faster by rebuilding them by darkwater on Wednesday March 19, 2025 @03:20AM (#43409066)
All in under 2 hours. You were totally nerd-sniped.
Re:Make Ubuntu packages 90% faster by rebuilding them by eru on Wednesday March 19, 2025 @05:29AM (#43409816)
Well, I moved to the new repos. But I had to change to the dkms drivers.

Seems to work so far, but nothing 'feels' faster either.

Re:Make Ubuntu packages 90% faster by rebuilding them by globular-toast on Wednesday March 19, 2025 @03:16AM (#43409043)
I've broken Arch but never broken Gentoo. I think this more due to the fact I ran Arch first and you then Gentoo first, rather than any real difference between them.

Gentoo is more stable than Arch by default, though. It's not actually a bleeding edge distro, but you can choose to run it that way if you wish. Gentoo is about choice.

Re:Make Ubuntu packages 90% faster by rebuilding them by eru on Wednesday March 19, 2025 @05:31AM (#43409824)
> I think this more due to the fact I ran Arch first and you then Gentoo first, rather than any real difference between them.

I can believe that.

> Gentoo is more stable than Arch by default, though. It's not actually a bleeding edge distro, but you can choose to run it that way if you wish. Gentoo is about choice.

I actually had way more trouble with stuff breaking with Ubuntu. That's because every six months, when I did the distro upgrade, lots of stuff broke at once and it was hard to do root cause analysis.

With a rolling distribution, it's usually only one thing breaking at a time.

Re:Make Ubuntu packages 90% faster by rebuilding them by johnisgood on Wednesday March 19, 2025 @07:23AM (#43410558)
Ubuntu et al. are notorious for breaking stuff. If you want to remove a package, it sometimes want to delete your Linux kernel. :|
Re:Make Ubuntu packages 90% faster by rebuilding them by johnisgood on Wednesday March 19, 2025 @07:22AM (#43410554)
I have used Gentoo and Arch. I still favor Arch, however. I like pacman (C), I don't like Portage (Python).

I found Arch Linux to be more stable than Gentoo, but that is just my own experience.

Re:Make Ubuntu packages 90% faster by rebuilding them by shanemhansen on Tuesday March 18, 2025 @09:09PM (#43407269)
So ChromeOS and also the OS for GKE are still basically built this way.
Re:Make Ubuntu packages 90% faster by rebuilding them by vasco on Wednesday March 19, 2025 @02:45AM (#43408879)
Never seen the HN version of the 'install gentoo' meme before, more sophisticated definitely.

> The goal of Gentoo is to have an operating system that builds all programs from source, instead of having pre-built binary packages. While this does allow for advanced speed and customizability, it means that even the most basic components such as the kernel must be compiled from source. It is known through out the Linux community as being a very complex operating system because of its daunting install process. The default Gentoo install boots straight to a command prompt, from which the user must manually partition the disk, download a package known as a "Stage 3 tarball", extract it, and build the system up by manually installing packages. New or inexperienced users will often not know what to do when they boot in to the installer to find there is no graphical display. Members of /g/ will often exaggerate the values of Gentoo, trying to trick new users in to attempting to install it.

Re:Make Ubuntu packages 90% faster by rebuilding them by toyg on Wednesday March 19, 2025 @04:00AM (#43409277)
Where does that blurb come from, chatgpt? I don't think it's true anymore, last time I checked I think Gentoo had a "normal" liveCD installation for the base system, which you could then recompile on your own if wanted.
Re:Make Ubuntu packages 90% faster by rebuilding them by Vilkku on Wednesday March 19, 2025 @05:00AM (#43409641)
Re:Make Ubuntu packages 90% faster by rebuilding them by _joel on Wednesday March 19, 2025 @05:25AM (#43409793)
GRP (Gentoo packages) existed at least 20 years ago, from my memory, as that's the last time I really used it in anger. I remeber packages being available and not having to rice everything, for sure.
Re:Make Ubuntu packages 90% faster by rebuilding them by ndesaulniers on Wednesday March 19, 2025 @03:39AM (#43409169)
They still use the build system. Woof.
Re:Make Ubuntu packages 90% faster by rebuilding them by stakhanov on Wednesday March 19, 2025 @04:05AM (#43409303)
I had had Gentoo continuously in use since 2003, and only very recently moved off of it (late 2024) when I tried Void Linux. On Void, buildability from source by end users is not a declared goal nor architectural feature, but you have a pretty decent chance of being able to make it work. You can expect one or two hiccups, but if you have decent all-round Linux experience, chances are you'll be able to jump into the build recipes, fix them, make everything work for what you need it to do, and contribute the fixes back upstream. This is what you get from a relentless focus on minimalism and avoiding overengineering of any kind. It's what I had been missing in Gentoo all those years. With Gentoo, I always ended up having to fiddle with use flags and package masks in ways that wouldn't be useful to other users. The build system is so complex that it had been just too difficult for me, over all these years, to properly learn it and learn to fix problems at the root cause level and contribute them upstream. Void should also be an ideal basis for when you don't want to build the entire system from source, but you just want to mix & match distro-provided binaries with packages you've built from source (possibly on the basis of a modified build recipe to better match your needs or your hardware).
Re:Make Ubuntu packages 90% faster by rebuilding them by boobsbr on Wednesday March 19, 2025 @11:04AM (#43412960)
Re:Make Ubuntu packages 90% faster by rebuilding them by jsight on Wednesday March 19, 2025 @11:15AM (#43413106)
I tried that once, but it is still compiling. :)

Kidding... honestly that was a pretty fun distribution to play around with ~20 years ago. The documentation was really good and it was a great way to learn how a lot of the pieces of a Linux distribution fit together.

I was never convinced that the performance difference was really noticeable, though.

Re:Make Ubuntu packages 90% faster by rebuilding them by wantless on Wednesday March 19, 2025 @03:12PM (#43416150)
Gentoo was the primary source of heating for my living quarters back in the early 2000s. My tower was highly constrained on memory, and I was on a relentless quest to pare out any modules or dependencies I wasn't actually using. Performance gains were primarily from being able to stay out of slow HDD swap space memory. I doubt there were any gains once amortizing the compilation times, but I ran my compile batches at night, and they kept me nice and warm.