Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

From the 2.22.0 version,  Magics will be using CMake for its compilation and installation. This is a first step towards an homogenisation of the installation procedures for all ECMWF packages. 

As configure, CMake  will run some tests on the customer's system to find out if required third-party software libraries are available and notes their locations (paths). Based on this information it will produces the Makefiles needed to compile and install Magics.

CMake is a cross-platform free software program for managing the build process of software using a compiler-independent method.

Binary versions

Binary versions

Before you install from source code you might want to check that already compiled binary versions are available to you. Magics and third-party dependent software packages might also be available as binary packages for you platform in form of RPMs or Debian packages. You might find them by going to the software search services, such as for OpenSuSE and SLES at http://software.opensuse.org/search (select "Search options" - "Include users' home projects"). Ubuntu maintains a Magics version in their system default repository.

Static versus shared library

Magics can be built as a static library and as a shared library. Using Magics as a shared library has an impact on how it is used. With a shared library it is not only necessary that the library is accessible at the time of compilation but also at run-time. Changes to the system, such as the removal of an old shared library might cause programs linked with this library to fail. For more information about the use of the shared library please read section “User setup” below.

...

Excerpt Include
SUP:CMake installation instructions
SUP:CMake installation instructions
nopaneltrue

Requirements

The following table lists the dependency Magics requires to be build from source. Please note, if you install these package from source you also might have to install the respective "-devel" packages. 

...

At ECMWF, OpenSuSE 10.3/11.3 Linux systems (32 and 64bit) were used for testing. Any C++ Compiler which supports features required for the ANSI C++ standard from 1998 (STL, namespaces, templates) should work. At ECMWF we tested GCC’s g++ 4.x successfully. A Fortran compiler is not required for the compilation of Magics, but is needed if you want to use the Fortran interface or compile a dependent Fortran library (Emoslib).

Compilation and installation

During a build with CMake there are three different directories involved: The home dir, the build dir and the install dir.

...

)

...

The home dir is where the project's resources are stored. In This the directory to which you extract  the project's resource archive.The home dir contains the files used by cmake to build the library, but also subdirectories with the sources, config files, etc...

Build directory: (Ex: /tmp/.../build/magics)

This directory is where all compiler outputs are stored, which includes both object files as well as final executables and libraries. CMake also stores several files of its own here, including its cache. The location of the build dir is entirely up to you.

Install director: (Ex: /usr/local/magics)

...

.

Generating the Makefiles with CMake

...