Compiling Open Source Software Manually

What is compiling?

• 2-phrase process
◇ Take all resource codes and convert to executables
◇ Takes all the executables and store into the proper location in your computer


Why would I need to compile?

◇ Software doesn't have packages
◇ Software doesn't distribute binaries
◇ Software has packages but they are old


What do you need to compile?

# Debian/ Ubuntu
# checkinstall: installation tracker; able to use package manager to uninstall compiled program
# cvs: concurrent version system
# subversion: advanced version control system
# mercurial: easy-to-use, scalable distributed version control system
apt install build-essential automake checkinstall cvs subversion \
git-core mercurial

yum groupinstall 'development tools'


Compile Steps

• Compiling is not a straight forward process
• Most of the software installs will have missing dependencies / libraries that you need to find

# Download the (tarballed) software and unzip into a directory
cd ~/Download
wget uri                    # download
tar -xvf filename           # extract

# Read install document (if any)
less install

# Run configure script
ls -l configure             # ensure it's executable
# or
./configure --disable-unicode

# Make file
# or
make configure
configure --prefix=/usr
make all                    # create object files (.o)
# or
sudo make -j 32 all         # compile faster

# Install
sudo make install           # tradition command
# or
sudo checkinstall           # use installation tracker

# If checkinstall is used
dpkg -l | grep package_name