ApCoCoALib:Install

From ApCoCoAWiki
Revision as of 16:02, 13 December 2007 by Dheldt (talk | contribs) (first corrections. more to come.)

This is a copy of ApCoCoALib's INSTALL file: To see a more detailed guide to built ApCoCoALib, please consult ApCoCoALib:CompilationInstructions.

INSTALLATION guide for the ApCoCoALib
===================================

Currently these instructions are for Unix/Linux and MacOSX machines.

This library is supplied as source code in C++, and must be compiled
before you can use it -- instructions on how to do this are below.


Prerequisites
-------------

Before compilation you must ensure that you have available:-

 * a "make" program (any version should suffice);

 * a C++ compiler together with the standard C++ libraries
   (we use extensively g++ (versions 3.4.n and 4.0.n))

 * an installation of GMP (version 4.1.4 or later) -- see http://www.swox.com/gmp/
   [GMP 4.1.3 contains a critical bug affecting CoCoA::RingFloat]

* an installation of CoCoALib (version 0.9.10 or later) -- see http://cocoa.dima.unige.it/
 
Optionally you can include the following software

* a Blas / Lapack installation (for example Atlas, or Apple's acceleration framework)
 
* an installation of Linbox

* an installaion of Bertini

These optional libraries / software packages enhance ApCoCoALib's functionality.

If you need to install g++ or GMP, please refer to their distributions
for the appropriate instructions.



Compilation of ApCoCoALib
-----------------------

Short instructions:  just run these commands from the ApCoCoALib root directory
  ./configure
  make
  make examples   # if you want to compile the examples


To be able to use the ApCoCoA library you must first compile it.  Currently
the library has been built and tested only on Linux/Unix platforms and on
MacOSX.  The instructions below refer to these platforms only.

(1) The (interactive) configure script attempts to find a C++ compiler, and
    the GMP library and header files.  If it has trouble, it will print out
    a message telling you.

(2) If you are confident about choosing the compiler and its compilation flags
    then run   "./configure --help"   for information about specifying these.

(3) Execute "make" -- this will compile the library and run the tests.
    Ideally you should check through the output produced to ensure that
    no errors were found.  The presence of a few compiler warnings may
    safely be ignored.  The compiled library is placed in lib/libapcocoa.a.
    The command "make install" does not yet work.

    The command "make library" will compile the library but not run the tests.
    The command "make check" will run the tests -- the tests are in src/tests/.

(4) Have a look at the examples in the subdirectory examples/ and enjoy
    ApCoCoALib.  We look forward to hearing from you.



Trouble?
--------

If you encounter problems while trying to compile ApCoCoALib, try writing on
the (Ap-) CoCoA Forum:
    http://apcocoa.org/forum/
In your message you should state the platform and compiler you are
using; also the version of GMP should be mentioned.