Thursday, 12 September 2013

Building From Source

Hello again!

Today I have conducted a lab for SBR600 in which I must build two GNU project packages from source. The two packages I have chosen to build are cpio and gettext (both of which are already on my install). These peices of software can be found at cpio and gettext. I ran the tar xfz command to extract both of these packages. The first package I will discuss is cpio.

In the extracted cpio directory, I ran the command time ./configure the result was a successful configure which took 4 minutes and 14 seconds real time. Fedora 19 is running rather sluggishly on my virtual machine so I suspect this is why this process took so long. After running time make, I received an error and do not believe that cpio was built. The make time was a little over 3 seconds but I could not find a built cpio executable. This was the error I received:

In file included from argp.h:24:0,
                 from argp-eexst.c:27:
./stdio.h:358:1: error: ‘gets’ undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
make[4]: *** [argp-eexst.o] Error 1
make[4]: Leaving directory `/home/tsbarras/Downloads/cpio-2.11/gnu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/tsbarras/Downloads/cpio-2.11/gnu'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/tsbarras/Downloads/cpio-2.11/gnu'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tsbarras/Downloads/cpio-2.11'
make: *** [all] Error 2

After googling this problem, it appears this problem could be from stdio and a patch related to it. Although the patch is for ARCH-Linux, I suspect this is the issue on Fedora as well. The configure step for cpio completed successfully.

At this point, I moved onto the gettext package. I ran the same time ./configure from inside the extract archive folder. This configure took 10 minutes and one second. No errors appear to have occurred during the configure process.

Next I ran the time make again. This operation lasted 45 seconds and appears to have resulted in another error. This error is as follows:

./libtools: line 1128: g++: command not found

I ran the command yum install gcc-c++ and installed these C++ utilities. I reran the time make command again and this time is appears to be successful... with a run time of 8 minutes and 19 seconds. This program was compiled into the gettext-runtime/src/ folder.

The gettext software I compiled is available here.
Thank you for reading.

- Taylor


Post a Comment