Thursday, October 06, 2005

buidling a software

there are a number of details that are very essential when one tries to build a software
in linux. and yeah .. those who use rug and/or jhbuild too .. beware ...
last three days i struggled due to my ignorance regarding automake .. autoconf, libtool
etc which are literally the "building" blocks to build a software ...
not that i know in and out now ... but i'm better than what i was.
typically building software from a source involves running makefiles in various directories
and subdirectories .... now .. it is not so easy to make sure everything goes fine for
your environment .. If u leave all the environment - platform checks for the user
one of this might happen :
1) he might give up installing the software and look for an alternative.
2) he might bang his head on the keyboard till his head aches.

software may involve a variety of components that need to be made platform independent..
compilation of a big program needs
1) inclusion of a hell lot of shared libraries
2) dependencies on versions of those libraries
3) number of compilation options as per the needs of the user.

many huge software sources provide a autogen.sh which takes care of generating
the necessary configuration checking script called configure (autogen.sh generally
uses a configure.in file to achieve this feat)
running configure makes sure the three points above are taken care and generates
Makefiles for various directories and subdirectories (making use of Makefile.am
and Makefile.in present in each directory)
now running a make and a make install in the main directory will install the software.
Now people might think "hey what are rpms for .. eh ?" .. yeah sure ... rpms are for
knaive users and these are tips for devel builds needed by developers of the software.
all ye developers:
1)thou shalt assureth that thy PKG_CONFIG_PATH and LD_LIBRARY_PATH be free
of any errors.
2) thou shalt do a make clean and rebuildeth the sources if it happens that location of
any of thy dependent libraries changeth,
3) thou shalt assureth thyself that multiple versions of same libraries are not used to
build the software unless absolutely essentital...

happy building software

0 Comments:

Post a Comment

<< Home