Today’s assignment was to do a simple assignment in our open source online book. Appearances can be deceiving however. For this assignment we had to build a program called freeciv from source code using a step by step guide. Now there were two apparent problems when I first looked at the guide. For one the guide is two years old so a lot could of changed with freeciv and its dependencies since then. Also the guide is a loose guide in that it only accounts for major problems not small ones. Instead the author encourages you to just google answers instead of providing advice on them himself.
So I downloaded the files using subversion to my machine with no problems. I opened the install file and read the requirements for the program. So I started to go through these requirements one by one while looking at the author’s instructions. I check for the gcc package using rpm and it says no package found. Well that is no problem I can just use yum to install it. I type in the yum install command and it says there is no such package as well… how peculiar. After that I double check my commands and authority to make sure I am root. I then start searching the net for the issue. Unfortunately no one seemed to have this problem. I then saw that there is a way to verify ‘make’ being in your packages. Using ‘make -v’ I see I have make. I try to duplicate the command with gcc: ‘gcc -v’. Presto! There is a version of gcc on my system, but why didn’t yum or rpm see it? I decide to ignore it and keep going for now. As I try to fulfill more requirements I keep getting the no package found error. Yum could not find anything.
At this point the frustration kicks in. I scour the internet for problems with yum and find nothing relating to my problem. After two hours of searching, I review the instructions and think back to what I noticed on the various forums I visited: red hat and fedora. Don’t tell me… wait for it…. Yep! I did not realize yum is for fedora users only while I am on an Ubuntu system. So that whole time I should have been using apt-get to install all my necessary packages not yum. Time to try again. I start succeeding with a few packages (autoconf and gettext) but then I see some are not found again! Knowing I am in a different system I start looking up these packages for Ubuntu. They are under different names of course! So with haste I start looking up each missing package and installing.
Finally I have all the packages. Time to to use autogen.sh. Success for the first few minutes. It is finally building! After a few minutes I sigh dejectedly as I see another failure. The author even mentions the problem, gtk2 needs to have its dependencies installed using a develop version. Back to Google. In the following few minutes I found the package I needed and restarted my autogen.sh. This time to my elation there were no failures. I finally saw the “type make” line. I slowly key in make in anticipation. After hours of work the source code is finally built. I push the enter key. The make begins and with this step I had completed the assignment.
I am confident the lessons learned in this assignment will assist me in building our team’s project code this weekend.