Previous Page Parent Page Next Page TOC
Intranet | Development Resources | Build Environment

Build Environment

Table of Contents


LibSBML 5

To install libsbml5 with layout and render extension:
  • Download: llibSBML-5.8.0-Source
  • Unpack: tar -xvf libSBML-5.8.0-Source.tar.gz
  • Create a new build directory: mkdir build
  • change into it build directory: cd build
  • Assure that cmake is available in the system and in the path
  • Execute: cmake [-DCMAKE_INSTALL_PREFIX:PATH=< install directory >] -DENABLE_LAYOUT=ON -DENABLE_RENDER=ON -DENABLE-COMP=ON -DWITH_EXPAT=ON -DWITH_LIBXML=OFF -DWITH_BZIP2=OFF -DWITH_ZLIB=OFF < libsbml-5.8.0 directory >
  • Execute: make (or nmake)
  • Execute: make install (or nmake install)
This will install a static and a dynamic version of libSBML, currently the static one is called libsbml-static.a. If you want to link against the static version you need to rename it to libsbml.a.

The Windows binaries for VC 9.0 can be found here.

More information about the Cmake libSBML build: http://sbml.org/Software/libSBML/docs/cpp-api/libsbml-installation.html#unix-cmake
General information about additional cmake generators and options: http://www.cmake.org/cmake/help/cmake-2-8-docs.html

Qwt Plotting Library

To install qwt follow the following steps:
  • Download qwt-5.2.0-20091022.zip
  • Unzip qwt-5.2.0-20091022.zip to a directory of your choice.
  • Change to the newly created qwt-5.2.0 directory.
  • Assure that the QTDIR environment variable is properly set.
  • Execute: qmake or qmake prefix=<installation path>
  • Execute: make (or nmake)
  • Execute: make install (or nmake install)

Qwt 3D Plotting Library

To install qwtplot3d follow the following steps:
  • Download qwtplot3d-0.2.7-20110513.zip
  • Unzip qwtplot3d-0.2.7-20110513.zip to a directory of your choice.
  • Change to the newly created qwtplot3d-0.2.7 directory.
  • Assure that the QTDIR environment variable is properly set.
  • Execute: qmake or qmake prefix=<installation path>
  • Execute: make (or nmake)
  • Execute: make install (or nmake install)

Qt MML Widget Library

To install qtmmlwidget-2.4.1 follow these steps:
  • Download qtmmlwidget-2.4.1-20120223.zip
  • Unzip qtmmlwidget-2.4.1-20120223.zip to a directory of your choice.
  • Change to the newly created qtmmlwidget-2.4.1-20120223 directory.
  • Assure that the QTDIR environment variable is properly set.
  • Execute: qmake or qmake prefix=<installation path>
  • Execute: make (or nmake)
  • Execute: make install (or nmake install)

SBW  Integration Library

To install the SBW integration library follow the following steps:
  • Download sbw-2.7.10-20110525.tar.gz
  • Untar sbw-2.7.10-20110525.tar.gz to a directory of your choice.
  • Change to the newly created sbw-2.7.10-20110525 directory.
  • Execute: qmake or qmake prefix=<installation path>
  • Execute: make (or nmake)
  • Execute: make install (or nmake install)

Command Line Parsing

The parser for COPASI's command line arguments is automatically created from an xml specification. Since clo++ is no longer maintained we provide copies of the source code and the documentation:

Language Bindings


In order to build the Java and/or Python language bindings for COPASI, you have to more or less follow the same procedure as for compiling COPASI.
You will need the same libraries that are needed for CopasiSE (non-GUI version) and in addition to those, you need the header files and libraries of the languages you want to build the bindings for.
The bindings use the SWIG software to create the language specific files from COPASI header files and additional SWIG interface files. Any relatively new version of SWIG should do. For Microsot windows there is a special precompiled version of SWIG that you should use, for all other operating systems you can either compile it yourself, or if your distribution/package manager provides a relatively new version, you can install that.

The configure script to prepare COPASIs build system understands some additional options that tell COPASI what language bindings you want to compile and where the headers and libraries for the languages can be found:

  --with-swig=PATH path to the swig install directory
  --with-python[=PATH] build python bindings and optionally specify the directory where python is installed
  --with-python-includes=PATH specify the path to the python header files
  --with-python-libs=PATH specify path to python library directory
  --with-java[=PATH] build java bindings and optionally specify where java is installed
  --with-java-includes=PATH path to java header files
  --with-java-libs=PATH path to Java libraries


When you specify the path to the swig installation, COPASI expects to find the SWIG binary in PATH/bin/. Likewise if you specify a path to a python or Java installation, COPASI expects the headers for that language to be located under PATH/include/ and the libraries under PATH/lib/. Optionally you can specify directly where COPASI finds the headers and the libraries for a certain language.

Sometimes COPASI can not find out against which libraries it should link the bindings, especially if you have several versions of python on your system and/or if the libraries don't have standard names like libpython.so. In that case you might have to make slight modifications to the project files in copasi/bindings/java/java.pro or copasi/bindings/python/python.pro for the Java and Python bindings respectively.

The language bindings should be linked statically against the libraries the COPASI libraries and other libraries like libSBML, otherwise you might run into problems if you use several different versions of those libraries on your system.

After configuring the build system, you can build the language bindings as you would build COPASI which is described in more detail in the build instructions for the different platforms.

For the windows platform the configuration process is a bit different since you have to specify certain shell variables to the configure.bat script instead of commandline options.
The names of the variables are:


SWIG_PATH
ENABLE_PYTHON
PYTHON_PATH
PYTHON_INCLUDE_PATH
PYTHON_LIB_PATH
ENABLE_JAVA
JAVA_PATH
JAVA_INCLUDE_PATH
JAVA_LIB_PATH



They are passed to configure.bat in the same way as described in the COPASI build instructions for windows. And the meaning of the variables can be guessed by looking at the names of the commandline options described above.