the process was actually quite easy, i am impressed. the issue comes with VERY LONG compile times. having to wait around a whole week for it to finish grinding code before i could begin using it was somewhat frustrating.

  • bewts [he/him,comrade/them]
    ·
    3 years ago

    What's the benefit of compiling your own OS like this? Less bloat? Better performance? Security?

    • PorkrollPosadist [he/him, they/them]
      ·
      edit-2
      3 years ago

      It mainly gives you the option of changing a lot of settings which cannot be changed at runtime. Most C/C++ programs have preprocessor macros in them which let you choose to include or exclude various bits of code before sending it to the compiler. For instance, the Transmission Bittorrent client gives you options at compile time whether to enable support for GTK, QT, or a CLI interface, daemonization, systemd, which crypto library to use, etc. Once it's compiled, you're either stuck with a GTK, QT or a CLI interface. Most distributions ship with the GTK interface, but the choice is there.

      The vast majority of non-trivial software has similar options, though they might not go as far as implementing the GUI in several toolkits. A lot of times experimental features (like native-compilation in Emacs) are made available through compile-time options which usually remain disabled by distributors. Other times you might decide you are never going to plug LibreOffice into a PostgreSQL database and can omit support for heavy features and additional dependencies with the flip of a switch.

      Distributors generally do a good job of optimization and choosing sane defaults for security, but having access to compile time options can give you additional choices in terms of reducing attack surface and dependencies needed.

      What Gentoo does is let you fiddle with most of these settings through an abstraction layer (USE flags) which automatically updates the dependency graph. For instance, Emacs will normally pull in X and GTK as dependencies, but if you compile it with the -X USE flag, all those dependencies will be eliminated from the dependency tree (at least for that package). This is a huge difference from binary distributions where software dependencies are essentially set in stone since they are pre-compiled with requirements for various dependencies. Otherwise, compiling software from source usually means you are working outside of your package manager and are responsible for manually ensuring the correct versions of the needed dependencies are installed, and cleaning up old versions which are no longer needed.

    • RussianEngineer [she/her]
      hexagon
      ·
      3 years ago

      you get to pick and choose the features that are compiled into an application via gentoo's USE flags. normal OSs that distribute pre-compiled binaries enable everything for maximum compatibility. but if you dont need a feature or extension, it only is bloat that lengthens its startup time.

      you also get to use your own compiler flags and optimizations instead of the packager's, i can tell my compiler exactly what CPU to optimize for, what size/performance ratio i get in the end, any hardening, and other various GCC things.

      and, if you are a schizophrenic like me you have the option to manually review any code before its compiled and installed, just to make sure no NSA backdoors are being added in

      since i started booting with my customized gentoo kernel, my laptop has been booting even faster then arch linux on my main PC with an nvme drive, since i can just omit any kernel features or drivers i dont need. its pretty crazy.

  • NoamChomsky [he/him]
    ·
    3 years ago

    Gentoo's a ton of fun, and super rewarding if you stick with it. In my experience, it can be a bit painful getting your system into a configured state, but once you're there it is a very powerful feeling.

    • RussianEngineer [she/her]
      hexagon
      ·
      3 years ago

      incredibly large speed increase. this gentoo laptop with a SATA 2.0 hard disk now boots faster then my main tower running arch linux on an NVMe SSD

  • Windows97 [any, any]
    ·
    3 years ago

    Damn I thought the compile times were a bit exaggerated for the memes thats insane