Local compilation considered... questionable

posted on September 09, 2006

I'd been using Gentoo GNU/Linux for the past several years before recently switching (back) to Debian. I love many of Gentoo's features: portage does an excellent job of tracking dependencies, and its dependency-based init system is certainly a step in the right direction1. But is local package compilation similarly useful?2

I was chatting about it with a friend recently, myself groaning about the need to re-build many packages on my remaining Gentoo boxes due to the gcc 4.x C++ ABI change. He played Gentoo-defender and raised the following benefits of local package compilation:

  • It reduces dependencies to only those desired (as specified in Gentoo via USE flags).
  • It reduces the number of necessary package updates by ensuring that built packages are compatible all locally-installed libraries.
  • It prevents "one size fits all syndrome," allowing users greater choice in what they use.

My responses:

  • Time is more expensive than disk space. Even if featureful binary packages pull in more dependencies, I seriously doubt in most cases it takes longer to install binary versions of those dependencies than to build the bare essentials from source.
  • The library versioning scheme should prevent unnecessary incompatibilities from happening, but even in the case of broken packages I still doubt it takes more time to install new dependency binaries than to build the updated package from source.
  • Distros like Debian solve this by providing different packages for honestly variant builds; e.g., packages which provide either GTK or QT widget bindings. For on/off optional features, with Gentoo I found myself frequently recompiling packages with additional USE flags, so I see having such features on by default as a boon.

So in my estimation binary packages win out over local compilation. Thoughts?

1 Although I'm very interested to see how upstart's event-driven init-ing turns out, especially with its SystemV init compatibility features.

2 For the desktop/workstation/server. Obviously there are systems where local compilation or local production of binary packages makes sense.

Commentary most sage