What is the source of the "compile it yourself" mentality in linux

Very simply, for much of the history of *nix, there was no other choice. Programs were distributed as source tarballs and the only way you had of using them was to compile from source. So it isn't so much a mentality as a necessary evil.

That said, there are very good reasons to compile stuff yourself since they will then be compiled specifically for your hardware, you can choose what options to enable or not and you can therefore end up with a fine tuned executable, just the way you like it. That, however, is obviously only something that makes sense for expert users and not for people who just want a working machine to read their emails on.

Now, in the Linux world, the main distributions have all moved away from this many years ago. You very, very rarely need to compile anything yourself these days unless you are using a distribution that is specifically designed for people who like to do this like Gentoo. For the vast majority of distributions, however, your average user will never need to compile anything since pretty much everything they'll ever need is present and compiled in their distribution's repositories.

So this CIY mentality as you call it has essentially disappeared. It may well still be alive and kicking in the UNIX world, I have no experience there, but in Linux, if you're using a popular distribution with a decent repository, you will almost never need to compile anything yourself.


There are a few causes for that mentality, from end users, distribution maintainers, and code suppliers/developers/project groups, and each and every one of them is perfectly valid.

The Open Source aspect

There are some who enjoy knowing they are using Free software, and validate that by choosing to compile from source. This is where things like the Linux From Scratch project/howto/guide/book come in.

The optimization and options aspect

Want to compile stuff with specific optimizations for your particular CPU architecture? Perhaps there is a compile time option (or patch to create one) to enable or disable a particular feature that you need. Examples of this could be patching postfix to have the ability to manage quotas, or using a distribution like Gentoo where you can opt to not use systemd, or you opt specifically to support ogg/theora/vorbis/whatever and NOT mp3 due to licensing issues or whatever.

The CPU Architecture aspect

Does your workplace use high end non-x86/amd64 machines? The package you need/want may not be available pre-compiled for your CPU architecture, much less whatever distribution you are running. Granted, most places running this kind of hardware are also on support from IBM, etc. and don't go installing/compiling stuff willy-nilly. But what if you pick up one from a surplus sale, dig out an old iMac w/PPC processor, etc?

The Distribution aspect

Distribution "families" - ie, Debian w/ Ubuntu, Mint, et al and RedHat with CentOS, Whitebox, Fedora, et al - all use different package formats. And each version ships with different library versions, etc. Even for a simple single file shell script setting up a proper Debian .deb file takes time and effort. If you wrote some software to scratch some itch, and wanted to make it Free and post it on gitlab, your own webserver, whatever, would you rather just post a generic .tar.gz file of source with instructions on building or would you rather package up versions for 2 versions of Debian (stable and testing, maybe oldstable), multiple versions of Redhat and Fedora as RPMs, a TGZ for Slackware, an ebuild profile for Gentoo, etc. etc. etc.


As @terdon says, nowadays the need to compile things are pretty much slim, especially for home users.

In the past, in the Unix world, I was highly dependent on compiling sources, for instance, as I was managing Solaris, AIX, Ultrix, Digital Ultrix and HP/UX systems which sometimes were no longer maintained by the vendor, or which implementations of common services were far behind what was commonly used by others Unixes, including Linux.

There are still genuine needs for compiling things in the present, either to get some more obscure or obsolete piece of software that is not in the repositories, or use a more recent version of a package for which you do not have compatible binaries, or when you want to add extra functionality or rarely, if you are able to write a patch or module for it.

I also had to compile software by hand when doing reengineering of systems for porting to Debian and/or new versions of Debian that had a framework which was no longer supported by the OS.

For instance, in the past I had to compile by hand DHCP daemons to have the support for (by then recent) Windows changes to the protocol, or to support specific patches for provisioning in the Telecom world.

I still keep in my local repository debs for FreeRadius versions compiled by myself from the dev git repo, as there were a string of stable versions that had (serious) bugs in Debian, and usually the corresponding .debs for Debian/Ubuntu have not been adequate for our needs.

And it goes without saying that often in a while we also have to run/or compile stuff written by ourselves.

Installing the dependencies nowadays is not as hard as in the past, and some software even have customised rule files for some common Linux distributions that name the dependencies to compile and do the heavy work of creating the package file with the list of dependencies built in. Installing such a package from a local repository is not much different from installing the same package from the official repositories.

Tags:

Linux

History