Why I Use Gentoo: Development Environment

This entry is part 9 of 10 in the series Why I Use Gentoo Linux

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.

Series NavigationWhy I Use Gentoo: Configuration File ManagementWhy I Use Gentoo: Conclusion

3 thoughts on “Why I Use Gentoo: Development Environment

  1. Pingback: Links 3/2/2011: Enea Joins Linux Foundation, GNOME 3 in Headlines | Techrights

  2. Dan Kegel

    I use both Gentoo and Ubuntu. My impression is:
    if you base your app’s build system on any particular distro’s build system,
    you’re in for a world of hurt. Better to make a portable build
    system for your app so you can build it on any version of Linux.

  3. Sándor

    Gentoo is my main enviroment, but not for everyone.
    Since I like to use the bleading edge, and sometimes I break it, when I upgrade all the libraries, I think, it is a good idea to have a separate home/opt directory to also install Sabayon(It is Gentoo based) on another partition and mounting on it the same directories.
    This way I always have a workable system.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>