Tuesday, January 24, 2012

Building from Source


In this blog post I am going to go though a simple example of how to build software from source. It may see like a difficult task but in reality it is very simple to do, as long as you read the documents supplied you should be fine.

For my demonstration purposes I used software from the GNU Project, there lots of different software at their website but I decided to choose these two


  • Proxyknife - This program is basically to find out open proxy ports behind users firewalls. There are many other options and functions that you can invoke while running this software that could be of use to you if you need a program like this.
  • Units - What this software does is it is a simple unit converter, I found this program to be very interesting just in the fact that it is a simple converter (KM to M, etc...) as well is is able to do simple unit calculations. Very useful tool to have if you need to do a quick conversion.


Here are the steps that I used to install this software, I followed the same procedure for both of my source software.

1) Grab the tar file from the site proxyknife-1.7.tar.gz or units-1.88.tar.gz

2) Extract the tar using "tar -xvf  proxyknife-1.7.tar.gz" or "tar -xvf units-1.88".

3) Go into the directory of the extracted folder ( It is a good idea to read the supplied documents to see if there are any other extra dev tools need).

4) Now in that same directory we are going to configure the build for are specific machine by using the command "./configure" , this will run through and usually make the "make" file to setup.

5) Then after the configure is complete type the command "make" to build the software. For my testing purposes I used the time command to see how long it took to finish the make.

[ ProxyKnife ]
$ time make
real    0m1.641s
user    0m1.260s
sys    0m0.300s

[ Units ]
$ time make
real    0m0.857s
user    0m0.790s
sys    0m0.070s

These two programs built relatively quick.

6) After the make is done type the command "make install" which will install the program.

Overall this process only took around 10mins, I did play around with the units program for a bit and it did do proper conversion, but the proxyknife need a bit more manual reading before I mess around with. The only problems that I ran into was that I was not able to install certain parts of the program unless I was root, it usually gave me a permission denied. Switching to superuser root let me install the two software's without any issues. Though it is always good idea to use your user to do things, some things do require root access just like these software.





No comments:

Post a Comment