gTybalt uses TeXmacs, Root, GiNaC and the GNU scientific library. These packages are needed before one starts to build gTybalt. TeXmacs depends on LaTeX and Guile Scheme, GiNaC on the CLN library. One therefore needs also these packages. The C++/C interpreter CINT is not needed as a separate package, since it is already included in Root.
Building gTybalt requires a ANSI-compliant C++-compiler. It is strongly recommended to use gcc. The version number of the gcc compiler can be obtained by
$ gcc -v
gTybalt 1.3.1 has been tested with the following versions for the different packages:
gcc 4.4.4,
GiNaC 1.5.6,
Root 5.28/00,
TeXmacs 1.0.7.2,
GSL 1.13,
CLN 1.3.1,
NTL 5.5.2,
nestedsums 1.4.12.
gTybalt has been tested with these versions and you are advised to use EXACTLY those. The NTL and nestedsums libraries are optional.
You can follow the steps below to build all relevant packages in the right order.
You need LaTex to be installed. You can check whether the LaTeX binaries exist in your path by
$ which latex
Usually LaTeX is already included in a standard Linux distribution.
You further need Guile Scheme to be installed. You can check by
$ which guile
If Guile is not installed, you can download it from
http://www.gnu.org/software/guile
and follow the installation instructions.
Installation of TeXmacs: Having LaTeX and Guile Scheme installed, you can build and install TeXmacs. TeXmacs can be obtained from
http://www.texmacs.org
Follow the installations instructions there.
Installation of Root: The package can be obtained from
ftp://root.cern.ch/root
Follow the installation instructions there. Note that the configuration command has a slightly different syntax as compared to the standard autotools configuration script. Further note that the Root package includes also the C++/C interpreter CINT.
Installation of the CLN library: GiNaC requires the CLN library, available from either one of the following FTP-sites:
ftp://ftp.santafe.edu/pub/gnu/
ftp://ftp.ilog.fr/pub/Users/haible/gnu/
ftp://ftpthep.physik.uni-mainz.de/pub/gnu/
Follow the installation instructions in the manual.
Installation of GiNaC: You find GiNaC at
http://www.ginac.de
Unpack the GiNaC source code and follow the installation instructions of GiNaC. There is no need to build the package ginac-cint, gTybalt uses the CINT implementation of Root and builds the necessary dictionary later.
Installation of the GNU scientific library: You find the GNU scientific library at
http://sources.redhat.com/gsl
Unpack the source code and follow the installation instructions of the GNU scientific library.
Optionally gTybalt can be compiled with support for factorization of polynomials. In this case, the NTL library has to be installed. The NTL library is available from
http://www.shoup.net/ntl
Configure the NTL library with the option "NTL_STD_CXX=on". This puts the classes of the NTL library into a namespace "NTL". This option is needed by gTybalt.
Optionally gTybalt can be compiled with support for the expansion of transcendental functions. In this case, the nestedsums library has to be installed. The nestedsums library is available from
http://wwwthep.physik.uni-mainz.de/~stefanw/nestedsums
Follow the installations instructions there.
http://wwwthep.physik.uni-mainz.de/~stefanw/gtybalt
As with any autoconfiguring GNU software, installation proceeds through the following steps:
$ ./configure
$ make
[become root if necessary]
$ make install
The "configure" script can be given a number of options to enable and disable various features. For a complete list, type:
$ ./configure --help
A few of the more important ones:
If you install the executables and the libraries in non-standard directories, you have to set the PATH and the LD_LIBRARY_PATH variables correspondingly.
Here is an example of a complete installation. We assume that LaTex is already installed and that a suitable compiler exists. We further assume that we do not have root privileges, therefore we have to install the programs in an unusual directory, which we take to be /home/username/local. We further decide to build only shared libraries (where this is possible) and we would like to set up gTybalt with support for factorization and for the expansion of transcendental functions. This requires to install the NTL library and the nestedsums library. We decide to build the NTL library in conjunction with the GMP (GNU Multi-Precision library) for enhanced performance. Furthermore we assume that we have unpacked all relevant source packages into separate directories. The commands to build a specific package are entered from the top-level directory of the specific package. For concreteness we assume that we have a Linux PC with a Bourne compatible shell.
We start with Guile:
$ ./configure --prefix=/home/username/local
$ make
$ make install
We then set the environment variables (probably in a file like .bash_profile):
export GUILE_LOAD_PATH=/home/username/local
export PATH=/home/username/local/bin:$PATH
export LD_LIBRARY_PATH=/home/username/local/lib:$LD_LIBRARY_PATH
Building TeXmacs is done in a similar way
$ ./configure --prefix=/home/username/local
$ make
$ make install
In the next step we build the Root package:
$ ./configure linux --prefix=/home/username/local
--etcdir=/home/username/local/etc
$ gmake
$ gmake install
and we set the variable ROOTSYS (probably in a file like .bash_profile):
export ROOTSYS=/home/username/local
The GMP library is build as follows:
$ ./configure --prefix=/home/username/local
$ make
$ make install
To build the NTL library we issue the commands:
$ cd src
$ ./configure PREFIX=/home/username/local NTL_STD_CXX=on
NTL_GMP_LIP=on GMP_PREFIX=/home/username/local
$ make
$ make install
Note the slight modified form how the arguments are passed to the configure script. To build the CLN-library:
$ ./configure --prefix=/home/username/local --enable-static=no
$ make
$ make install
To build GiNaC:
$ ./configure --prefix=/home/username/local --enable-static=no
$ make
$ make install
To build the GNU scientific library:
$ ./configure --prefix=/home/username/local --enable-static=no
$ make
$ make install
To build the nestedsums library:
$ ./configure --prefix=/home/username/local --enable-static=no
$ make
$ make install
And finally we build gTybalt:
$ ./configure --prefix=/home/username/local --enable-static=no
--with-nestedsums --with-ntl
--with-ntl-prefix=/home/username/local
--with-gmp-prefix=/home/username/local
$ make
$ make install
This completes the installation procedure.
This section gives some advice if the installation procedure does not work as it should.
A very common problem during compilation is that the building process for the dictionary fails, either through a segmentation fault or through excessive compilation time ( > 5 min for a 1 GHz PC). A typical print-out might look likes this:
Making all in dictionary
make[2]: Entering directory `/home/stefanw/build/gtybalt-1.0.0/dictionary'
rootcint -f gtybaltdict.cc -c ../ginac_headers/ginac.h
../gtybalt-lib/routines.h ../gtybalt-lib/print.h ../gtybalt-lib/plot.h
../gtybalt-lib/globals.h ../gtybalt-lib/integrate.h
../gtybalt-lib/eqostream.h LinkDef.h
make[2]: *** [gtybaltdict.cc] Segmentation fault
make[2]: *** Deleting file `gtybaltdict.cc'
make[2]: Leaving directory `/home/stefanw/build/gtybalt-1.0.0/dictionary'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/stefanw/build/gtybalt-1.0.0'
make: *** [all-recursive-am] Error 2
In many cases this is due to incompatibility between CINT and the compiler. The solution is to use the recommended versions of Root and gcc.
If the versions of Root and gcc are correct, read the file debug/README and follow the instructions there.
A second problem is related to libtool and manifests itself as follows:
Making all in dictionary
make[2]: Entering directory `/home/stefanw/build/gtybalt-1.1.2/dictionary'
...
mv -f .libs/gtybaltdict.lo gtybaltdict.lo
/bin/sh ../libtool --mode=link gcc -g -O2 -o libgtybaltdict.la
-version-info 0:0:0 gtybaltdict.lo ../gtybalt-lib/libgtybalt.la
libtool: link: `gtybaltdict.lo' is not a valid libtool object
make[2]: *** [libgtybaltdict.la] Error 1
make[2]: Leaving directory `/home/stefanw/build/gtybalt-1.1.2/dictionary'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/stefanw/build/gtybalt-1.1.2'
make: *** [all] Error 2
If the GNU autotools (autoconf, automake and libtool) are installed on the system a simple solution is to replace the call to configure by a call to autogen.sh, e.g. to build gTybalt as follows:
./autogen.sh
make
make install