Difference between revisions of "ApCoCoALib:CompilationInstructions"

From CoCoAWiki
(→‎External Requirements: add some info about LinBox)
(→‎Step by Step build instructions: add LinBox support basic info)
Line 24: Line 24:
 
  # empty NUMLIBS
 
  # empty NUMLIBS
 
  NUMLIBS=
 
  NUMLIBS=
 +
LINBOXFLAGS=
  
 
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/ FIXME: Add more details and tarballs.
 
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/ FIXME: Add more details and tarballs.
Line 44: Line 45:
  
 
In case of problems please complain in the forum.
 
In case of problems please complain in the forum.
 +
 +
You can optionally compile with LinBox support. You should check out 1.1.3svn, the 1.1.3 release does not work. To compile LinBox support set the following:
 +
 +
LINBOXFLAGS=-DUSELinBox

Revision as of 09:00, 6 September 2007

This page describes how to compile the ApCoCoALib as of 0.99.08.

External Requirements

You need the following libraries:

  • CoCoALib 0.98.2 (or later), we use 0.99.07 at the moment
  • GMP 4.2.1 is recommended, you need at least release 4.1.4 due to bugs in earlier releases. CoCoALib will not work correctly with 4.1.3 or earlier

Optional:

  • BLAS and Lapack: Those libraries are needed for ABM and the numerical functions.
  • LinBox: LinBox requires BLAS and Lapack as well as the C++ GMP wrapper library

Step by Step build instructions

Get a copy of CoCoALib and build it. You should consult the CoCoALib documentation in case of problems.

Get a copy of ApCoCoALib. Unpack the tarball in the same directory as CoCoALib. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing the Makefiles. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. Now run configure:

[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure
ERROR: Specified config file is not a readable file: ""
Please specify a config file for the external numerical libraries via --with-libconfig

You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to create a file called lib.config and add the following text:

# we don't want to compile in any numerical libraries
NUMFLAGS=-DUSENoLapack 
# empty NUMLIBS
NUMLIBS=
LINBOXFLAGS=

With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/ FIXME: Add more details and tarballs.

With with a working set of libraries we rerun configure and get:

[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure  --with-libconfig=../NumLibs/lib.config.USEF77Lapack
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" 
Configuration process complete: info saved in configuration/autoconf.mk
-----------------------------------------------------------------------

Everything is fine now. Just enter

 make

and the ApCoCoAServer as well as the ApCoCoALib should be build.

In case of problems please complain in the forum.

You can optionally compile with LinBox support. You should check out 1.1.3svn, the 1.1.3 release does not work. To compile LinBox support set the following:

LINBOXFLAGS=-DUSELinBox