Brooks Patola

Building an Open Source Software Package

Today we’re going to be building an open source software package from the Free Software Foundation’s GNU Project. How exciting!! Now lets pick a package to build…

Initially I’m very surprised with the vast amount of packages that are offered to the developer. A total of 395 by my estimation, although one package in particular caught my eye as I was navigating through the list. I have been a lifelong fan and player of the game of Chess, and never really looked into the game of Go which seemed to have some similarities, yet there the package was … labelled as “gnugo”. The game caught mainstream attention this year when Google’s AlphaGo AI won three matches against the worlds best Go player.

With the selection in place, lets download the source code for the software (we will not be installing the software on the system)…

We will use wget to download the file and then use tar to compress and extract the file…

wget.png

seems like it worked, now lets look into the INSTALL file and see what is the recommended path to take for building this package…

install.png

We will need to first use the “configure” command to build this package…

configure

Now for the “make“…

make

For some deeper learning, you can read more about these commands and what they do here.

Since everything seemed to work, lets try to run a “make check” command…

make check.png

After approximately two minutes of waiting for the command to finish, its interesting to note that it goes into all the directories and reports back there “is nothing to be done”, lets continue…

We have now downloaded and built the package and it is time to do a test run to make sure we can actually use this program…

For gnugo the developers recommend running it with a graphical user interface called CGoban. However it is possible to run the game using the Ascii interface, and that is the route we will take…

After looking into the directory structure I found the executable in the interface folder…

gnugo

Sweet!! we have the game up and running on the system! Lets see what happens if we attempt to make a move…

moves.png

Now that is cool! I also am fond of the “GNU Go is thinking. . .” string to make it seem more AI based. After it has selected a move, we are now asked to make one in return. Since I do not know Go strategy at all, I will stop here and read some documentation on strategies for gameplay to have an epic encounter in the future with this program!

As a ¬†final aside, it was also very interesting to be able to go inside the games engine directory and look at all the C files…

engine.png

an example from “dragon.c“…

dragon.png

Pretty sweet! This has propelled me to become very excited for learning more about building open source software packages and hopefully contributing to some in the near future.

Leave a Comment