For this lab I will download and build two pieces of open source software, one from the GNU Project and one from another license. I will be installing them on a virtual machine running fedora.
The first piece of software I decided to install was VIM from the Free Software Foundation’s GNU Project.Typing VI in terminal will bring up the pre-installed version. Typing VIM into the terminal does not launch anything as of yet. To start off the install I downloaded the tar ball in for VIM version 8.0 in terminal using wget “ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2”. After obtaining the tar ball I extracted it using the tar command and -xvf flags. Moving into the extracted directory showed a configure file and two makefile templates, this tells us to run ./configure to configure the install for your machine. I ran ./configure and it started to check the machine for local variables, system variables and project dependencies. The configure command ran into an error when it checked for a dependency called ncurses saying it could not be found. Running ‘sudo yum install ncurses’ to install the dependency resulted in another error saying it was already installed. This means my machine needs the header files for ncurses. Figuring out the header files for ncurses was ncurses-devel I ran the command ‘sudo yum install ncurses-devel’ and the dependency started installing. I then ran ./configure again and this time it completed without fail. Seeing that a makefile was produced I read it and decideds to run make followed by make install. When I ran the command make it seemed to have compiled vim into my current directory. I then ran sudo make install which moved executables to my /usr/local/bin folder. After that command finished I could then launch vim by simply typing vim or typing /usr/local/bin/vim. This confirmed that the install was a success.
The second piece of software I installed was nled which is a command line text editor produced by Seneca. The procedure was mostly the same. It came preconfigured so I only had to run make. Running make install did not produce anything and running the command nled did not work. I noticed that the nled executable was in my current directory so I moved it to /usr/local/bin. I could then start nled from any directory using the command nled.
From this blog I learned a lot about make and makefiles and how crucial they are for bigger projects. As I was doing this lab I practiced building a few of the programs from the GNU Project and it was fascinating to see that most of the time you would run ./configure -> make -> make install and then you could run the program unless of course dependencies needed to be installed.