Software Installation – Difference Between Building from Source and Using Install Package

compilingsoftware installationsource

I was wondering: when installing something, there's an easy way of double clicking an install executable file, and on the other hand, there is a way of building it from source.

The latter one, downloading a source bundle, is really cumbersome.

But what is the fundamental difference between these two methods?

Best Answer

All software are programs, which are also called source packages. So all source packages need to be built first, to run on your system.

The binary packages are one that are already build from source by someone with general features and parameters provided in the software so that a large number of users can install and use it.

Binary packages are easy to install.
But may not have all options from the upstream package.

So for installing from source, you need to build the source code yourself. That means you need to take care of the dependencies yourself. Also you need to be aware of all the features of the package so that you can build it accordingly.

Advantages of installing from source:

  • You can install the latest version and can always stay updated, whether it be a security patch or a new feature.
  • Allows you to trim down the features while installing so as to suit your needs.
  • Similarly you can add some features which may not be provided in the binary.
  • Install it in a location you wish.
  • In case of some software you may provide your hardware specific info for a suitable installation.

In short installing from source gives you heavy customization option at the same time it takes a lot of effort, while installation from binary is easier but you may not be able to customize as you wish.

Update: Adding the argument related to security in the comments below. Yes it is true that while installing from binary you don't have the integrity of the source code. But then it depends as to where you have got the binary from. There are lots of trusted sources from where you can get the binary of any new project, the only negative is the time. It may take some time for the binary of the updates or even a new project to appear in our trusted repositories.

And above all things, about software security, I'd like to highlight this hilarious page at bell-labs provided by Joe in the below comments.

Related Question