![]() |
![]() |
![]() |
![]() |
Compiling and InstallingInstallation — Instructions for compilation and installation |
Prerequisites
The NumCosmo library depends on several other libraries, most of them are commonly found on most modern linux distributions. Their description are here: Library Dependencies.
For Debian like systems (including Ubuntu) it is necessary to install the following prerequisite packages:
-
For most systems the following packages can be found in the main repositories: gobject-introspection, gir1.2-glib-2.0, libgirepository1.0-dev, gcc, pkg-config, libglib2.0-dev, libgmp3-dev, libmpfr-dev, libgsl0-dev, libfftw3-dev.
If you want to build from the repository you also need: autotools-dev, libtool, gtk-doc-tools.
-
The other packages are usually not found on the official repositories.
- For atlas support on Debian see: http://wiki.debian.org/DebianScience/LinearAlgebraLibraries.
-
For atlas support on Ubuntu you need something similar to: libatlas-base-dev, liblapack-dev.
They also have versions optimized to some processors, however, ideally you should compile these packages locally to take full advantage of you system.
-
The other packages sometimes can be found with the following package names: libnlopt-dev, libsundials-dev, libcfitsio3-dev.
The packages above also support the usual: configure; make; make install (however, see NumCosmo compilation)
For RPM based distributions (including Fedora, OpenSuse, etc) it is necessary to install the following prerequisite packages:
-
For most systems the following packages can be found in the main repositories: pkg-config, gobject-introspection-devel, glib2-devel, gsl-devel, gmp-devel, mpfr-devel, fftw3-devel.
If you want to build from the repository you also need: autoconf, automake, libtool, gtk-doc.
-
The other packages are usually not found on the official repositories.
-
The other packages sometimes can be found with the following package names: nlopt-devel, sundials-devel, libcfitsio-devel, lapack-devel, atlas-devel, lapack-devel.
Most of the packages above also support the usual: configure; make; make install (however, see NumCosmo compilation)
-
The other packages sometimes can be found with the following package names: nlopt-devel, sundials-devel, libcfitsio-devel, lapack-devel, atlas-devel, lapack-devel.
NumCosmo compilation
The sources can be downloaded from http://download.savannah.gnu.org/releases/numcosmo/.
You can also obtain the sources directly from the git repository, for example the command:
1 |
git clone git://git.sv.gnu.org/numcosmo.git |
For the version cloned from the repository, it is necessary to first build the configure script. For this, execute:
1 |
NOCONFIGURE=yes ./autogen.sh |
To prepare the project for compilation one can run from the sources directory
1 |
./configure --prefix=/usr --libdir=/usr/lib |
Note also that for some 64 bits system the library directory is /usr/lib64 and, therefore, in this case the command above must be properly modified. In the default directory organization the bindings typelibs stay in /usr/lib/girepository-1.0/ and the bindings xml in /usr/share/gir-1.0/. You can look for these directories to check where the system bindings are located to determine the correct directories to pass to the configure script.
For additional options run
1 |
./configure --help |
After running successfully the configure script the library can be compile by running
1 |
make -j4 |
To check if everything went ok, run
1 |
make check |
1 |
make install |