The difference between building from a source and straight up installing the program is that, we do not download a package when we are building from source, however, we download the actual code of the program and make our way from there. This is a typical procedure that we follow when we are building program from source
1) Issue command "./configre" or "sh ./configure" in the directory that we downloaded the source code. This script creates a "make" file according to the settings of our computer. If we are missing development tools, the configure script will give an error here.
2) If everything goes well then ./configure creates a make file which we would use to actually build the program on our computer in a script form.
What do I mean by script form?
"make" does not install the program on our computer, it just builds it on the
the directory we want it to build on. Therefore we would have to give
path to the executable file of the utility. For example
If i used "make" on my current file and I want to run less, I would say
./less "filename"
"make install" would install the utility on your computer then you can just run the command from anywhere saying "less (filename)"
3) After the "make" command is executed without any errors, the program is build on the directory of you specified an option called "datadir". If not then they program/utility will be build on the current directory and can be run with this command "./utility options". If there are any libraries needed to build this specific program the error will show up here saying "so and so library missing the utility will installed without it" or sometimes, if the library is crucial then it would not install the utility without that library.
I chose to build "less" and "grep" since these are the packages I am familiar with and I thought it would be fairly easy to build.
Installing Less
I downloaded less from GNU project website and was redirected to download from a mirror in University of Waterloo.I then unzipped the packed using "gunzip" utility and extracted it using "tar -xf" command.
After that I started to follow the steps that I outlined above.
I ran into an error called "Terminal Libraries broken". I realized that I did not install the development tools outlined by Chris in the lab instructions so I installed them using yum
yum groupinstall "development tools" "development libraries"
after that I just issued the "make" command and the utility was built without any issues.
Installing grep
I followed the same step what I did for less, except that this time I did not get the error that my Terminal library is broken. The ./configure command completed this time however it gave a warning."configure: WARNING: libpcre development library was not found or not usable."
"configure: WARNING: GNU grep will be built without pcre support."
I did not want to do an incomplete job, therefore, I just installed the prce-devel,i686 package using the yum utility
"yum install prce-devel.i686" and then executed the "make" command. Grep was installed.
Installing both utilities took me about 15 minutes.
No comments:
Post a Comment