Compiling on Linux


Compiling SGeMS on Linux (Ubuntu in particular) system is easier than on windows. The Inverse Modeling and Geostatistics project at the technical University of Denmark has produced the best guide to install sgems on Linux machine. See here for the instructions.
The instructions for the qt3 version are available on bigbrovar website.

The instructions below are old and not as good as the above links.
From sudo get-apt install command or synaptic get :

  • Qt4
  • Coin (lib4coin40-dev and lib4coin40c2)
  • SoQt (libSoQt40-dev, libsoqt40-20 and libsoqt-dev-common)
  • Python2.x (with Python-dev)

Download simvoleon from the Coin svn system. The command is:
$ svn co https://svn.coin3d.org/repos/SIMVoleon/trunk SIMVoleon

The default installation path of Simvoleon is different than those of coin and soqt. It is simpler to have simvoleon build at the same location by giving the command configure the parameter --prefix=/usr:

  1. type configure --prefix=/usr
  2. type make install

The file INSTALL in the SIMVoleon folder contains more information.


Building SGeMS

Download GsTLAppli from SNV (latest)
svn co https://sgems.svn.sourceforge.net/svnroot/sgems sgems
If you want an older version of the code, it may be available on CVS:
cvs -z3 -d:pserver:anonymous@sgems.cvs.sourceforge.net:/cvsroot/sgems co -P GsTLAppli-qt4

Download GstL from CVS
cvs -z3 -d:pserver:anonymous@gstl.cvs.sourceforge.net:/cvsroot/gstl co -P GsTL

In GsTLAppli-qt4 folder

  1. Edit file .qmake.cache and modify the path variables. One common mistake when setting the paths in .qmake.cache: the top-level directory of GsTL contains a directory that is also called GsTL and contains the source files. The GSTLHOME variable must be set to the top-level directory, not to the nested GsTL directory. So GSTLHOME=/tmp/GsTL, not /tmp/GsTL/GsTL. Similarily, the top-level directory of SGeMS contains a directory called GsTLAppli. Set GSTLAPPLI_HOME=/tmp/SGeMS, not /tmp/SGeMS/GsTLAppli.

  2. If you want to compile in release mode, edit "config.qmake" and change line:
    CONFIG += debug warn_on
    to
    CONFIG += release warn_on
    (remove warn_on to decrease the number of compiler warnings)

  3. run qmake (just type qmake) to generate the top-level makefile.

  4. Finally, run make.

  5. The executable will be output to $GSTLAPPLI_HOME/bin/linux/sgems. It will probably be necessary to set LD_LIBRARY_PATH so linux can find the sgems shared libraries. These libraries are in $GSTLAPPLI_HOME/lib/linux and $GSTLAPPLI_HOME/plugins/designer:
    export LD_LIBRARY_PATH=$GSTLAPPLI_HOME/lib/linux:$GSTLAPPLI_HOME/plugins/designer
    Library $GSTLAPPLI_HOME/plugins/designer/libGsTLwidgets.so is a plug-in for Qt. If Qt can't find that plug-in, parts of the interface will be missing. You can copy libGsTLwidgets.so to $QTDIR/plugins/designer, or use qtconfig to add a new plug-ins search path.

  6. Before you run the software, define a variable called GSTLAPPLIHOME to point to the root directory of SGeMS .