<< Prev Build Temporary Tools (Part II)
Next >> Core Packages
Notes to change GNU autotools
Most of the packages are using GNU autotools as build system. Unfortunately they are not suitable for qLinux. To work with qlinux it needs some changes. These changes are substantial 2 cases:
/dev/null --> /qlnx/dev/null /bin/sh --> /qlnx/bin/sh
Sometimes there are more changes like  /usr/bin/env –> /qlnx/bin/env 
or similar. Usually the build system will break with an error if some pathes are invalid. Sometimes it throws a warning like
/qlnx/bin/sh: line 1: /dev/null: No such file or directory
and continues. However, the GNU autotools are critical against changes. Not in any case it have to re-configure it self. We have to be careful. In general never change *.ac, *.am and *.m4 files. In most cases some *.in template files are critical and will cause a re-configure. The build system shall even never call the  missing 
script.
So for  /dev/null 
and  bin/sh 
the following files have to be edited:
* configure * Makefile.in * maint.mk * [build-aux/]config.guess * [build-aux/]config.rpath * po/Makefile.in.in * (tests/)testsuite
Not all files exists always, sometimes other files have to be changed. The last 2 from above are required if a  make clean 
will be invoked. Attention! Be careful by running  make distclean 
! It could remove required files1), which causes that the package couldn't be build anymore. If something went wrong start over with fresh extracted sources.
Some more points to check:
- disable autoreconf by setting all occurrences of
 autoreconf =  
(empty) - commonly in a GNUMakefile 
file - change in
 config.guess 
2 times /proc/cpuinfo –> /qlnx/prc/cpuinfo 
(optional) - configure: ldconfig
In some cases configure creates a  libtool 
file. This have /dev/null which needs to be fixed. Search in the toplevel  Makefile.in 
for a recipe  all: 
. Commonly this looks like
... all: config.h ...
If it depends on  config.h 
search for it and change the recipe similar to
config.h: $(SED) -i '/qlnx/!s|/dev/null|/qlnx/dev/null|g' $(LIBTOOL) ...
Thus the  libtool 
file will be fixed before make all-recursive. An alternative recipe is  $(am_recursive_targets) 
.
In some cases the created executables are scripts with an invalid shebang and/or includes  /dev/null 
. Such things can be fixed by adding a sed command at the end of recipe  all: 
in the toplevel  Makefile.in 
.
<< Prev Build Temporary Tools (Part II)
        
Next >> Core Packages