Difference between revisions of "ApCoCoALib:CompilationInstructions"

From ApCoCoAWiki
(basic layout, to be filled with more details later.)
(add section about compilers for all operating system)
Line 4: Line 4:
  
 
==Windows==
 
==Windows==
 +
 +
===Compilers===
 +
MSVC 2003, MSVC 2005, Intel C++, Cygwin
  
 
===CoCoALib===
 
===CoCoALib===
Line 18: Line 21:
  
 
==Linux==
 
==Linux==
 +
 +
===Compilers===
 +
g++ 3.3 up to 4.2
  
 
===CoCoALib===
 
===CoCoALib===
Line 32: Line 38:
  
 
==MacOSX==
 
==MacOSX==
 +
 +
===Compilers===
 +
Xcode 2.4.1 recommened
  
 
===CoCoALib===
 
===CoCoALib===
Line 48: Line 57:
  
 
==Solaris/UNIX==
 
==Solaris/UNIX==
 +
 +
===Compilers===
 +
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h
  
 
===CoCoALib===
 
===CoCoALib===

Revision as of 19:15, 14 September 2007

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

External Dependencies

Windows

Compilers

MSVC 2003, MSVC 2005, Intel C++, Cygwin

CoCoALib

Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin

GMP

Brian Gladman's build for MSVC, from source for Cygwin/MinGW.

BLAS/Lapack

ATLAS, Intel MKL, GotoBLAS

LinBox

Build from source, Cygwin only at the moment.

Linux

Compilers

g++ 3.3 up to 4.2

CoCoALib

Build from source

GMP

Distribution package, build from source

BLAS/Lapack

Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL

LinBox

build from source

MacOSX

Compilers

Xcode 2.4.1 recommened

CoCoALib

Build from source

GMP

build from source, can be tricky, need the right patch and working xcode

BLAS/Lapack

AccelerateFrameWork recommended (installed per default). Also possible: build from sources: ATLAS, netlib.org installer: IntelMKL

LinBox

build from source

Solaris/UNIX

Compilers

g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h

CoCoALib

Build from source

GMP

Distribution package, build from source

BLAS/Lapack

recommneded: SunPerfLib build from sources: ATLAS, netlib.org

LinBox

build from source

External Requirements - to be merge in the sections above

You need the following libraries:

  • 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 the sources for CoCoALib and ApCoCoALib, for example from our download page.

Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.

Build the 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/file/ FIXME: Add more details and tarballs.

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