- Why I Use Gentoo Linux
- (Not) Why I Use Gentoo: Optimization
- (Not) Why I Use Gentoo: USE Flags
- (Not) Why I Use Gentoo: Learning about Linux
- Why I Use Gentoo: Rolling Releases
- Why I Use Gentoo: Simple Package Management
- Why I Use Gentoo: Unused Dependency Removal
- Why I Use Gentoo: Configuration File Management
- Why I Use Gentoo: Development Environment
- Why I Use Gentoo: Conclusion
Some of us in the computer world aren’t just users—we’re developers too. Whether we’re working on personal projects or large software packages, we find ourselves in need of various programs and data required for software development, such as compilers and library headers.
On most Linux distributions, these extra files are not installed by default. They take up space, and for most users, they will be completely useless. I’m not about to chastise any distribution for making that decision. Nonetheless, for those of us who do need these tools and data, finding a simple way to install them is paramount.
With Debian-derived distributions such as Ubuntu, you can solve part of this problem by installing the build-essential package, which ultimately has dependencies on a number of tools useful for development. However, this still leaves the matter of installing the library headers and other package-specific development files. Most distributions address this part of the problem by offering dev packages, which install the files necessary for developing against the associated package.
If you’re working on a package that’s in the repository, you can use a utility like apt-get build-dep to install all of the packages needed to build that package. However, if you’re working on a personal project, you’ll still have to manually select all the appropriate development packages. In addition, this whole process tends to wreak havoc with one’s list of manually-installed packages.
Generally, each dev package must be marked as manually-installed, or else they may be removed by the package manager as unused dependencies. This quickly leads to a more unwieldy list of packages and a greater chance for cruft in the future. Since I prefer to keep this list as small and tidy as possible to minimize the number of unused dependencies that hang around, Ubuntu’s solution seems cumbersome at best. That’s where Gentoo steps in.
Since Gentoo is a source-based distribution, packages are compiled directly on the user’s computer. This means all of the files necessary to build a package are already installed by default. In essence, a Gentoo system is always a complete system ready for software development. As I’m routinely compiling personal projects, this is incredibly beneficial to my workflow.
All that said, binary distributions could solve this problem by simply allowing the user to tell the package manager to treat all build dependencies as required, much as you already can with recommended dependencies. Sure, it probably wouldn’t be a good idea to set this option by default, since it would lead to increased disk usage and longer upgrade times, but for many developers, this option would be incredibly useful. Perhaps such an option already exists or has recently been added to distributions such as Ubuntu and Fedora.
For the moment, however, it seems as if Gentoo is the best all-around distribution for software development on Linux. That is one of the more important reasons I prefer Gentoo as my primary desktop distribution.