Installation from Source Code

Getting the Source Code

Anonymous svn Repository Access

There are several ways to retrieve the iplt source code from our subversion repository:

Checkout Variant

By using the checkout variant, the created directory structure will include repository related data, which allows more straightforward access for all later repository operations.

svn checkout https://www.iplt.org/svn/iplt/trunk iplt

Within the newly created iplt directory, the update command may be used to retrieve the latest revision.

cd iplt
svn up

Export Variant

By using the export variant, no repository related information will be created. As a consequence, no update etc is possible within the directory structure.

svn export https://www.iplt.org/svn/iplt/trunk iplt

Prepacked snapshots

These are the latest snapshots, tar/gzipped for your convenience. After download, issue the following command to unpack:

tar -xzf iplt-REVISION.tgz

On a rpm based system you can generate rpms from the snapshot with following command (you need root privileges):

rpmbuild -ta  iplt-REVISION.tgz

iplt-rev1761.tgz
iplt-rev1760.tgz
iplt-rev1758.tgz
iplt-rev1757.tgz
iplt-rev1755.tgz

Required Tools and Libraries

  • The Boost project features a collection of peer-reviewed, portable C++ source libraries, written and tested by some of the top C++ experts in the field. Please make sure that upon compilation you build the boost.python library as well. Starting from v1.31, there is a standardized installation procedure, which results in several versions of each shared library to be installed, each containing a specific suffix to denote its particular features (such as compiler type, threading model, etc). The exact suffix to be used by IPLT must later be given to the settings file (see Building with SCons below). Please note that the header files will be installed under a version-dependent subdirectory, e.g. /usr/local/include/boost-1.31/, and this subdirectory must be also given to the IPLT building process. Please also note that due to the popularity as well as the powerful features, boost is available as a pre-compiled package for many linux distros. In that case, it may not be necessary to provide an extra include path, and it may suffice to give an empty (ie "") suffix. Required version: at least 1.33
  • Python is used for both the build system as well as later execution. Please make sure that you include all development packages as well as the shared library. Required version: at least 2.4
  • SCons is a sophisticated, platform independent, flexible build tool. Required version: at least 0.96.1
  • wxWidgets (formerly known as wxWindows prior to guess-who sending some lawyers) is a powerful, multi-platform, graphical user interface library. The standalone executable giplt, containing an embedded Python interpreter and data viewer, is implemented using this library. Required version: at least 2.6, 2.8 is prefered wxWidgets must be compiled in single-threaded mode for giplt to work properly
  • wxPython is the python frontend to wxWidgets, and very convenient when rapid prototyping or a simple GUI is required in high level giplt scripts. This must use the system wide wxWidgets libraries, and hence match the wxWidgets version exactly
  • FFTW is an open-source, very fast fast fourier transform library. Required version: at least 3.0
  • Xerces-C++ implements XML DOM bindings for use in the Info implementation. Only a few distros offer this package, so it must probably be installed by hand. Required version: at least 2.6.0
  • GSL, the Gnu Scientific Library, is used by various algorithms. Required version: at least 1.5.
  • doxygen for building the in-source documentation. Required version: at least 1.3.5

NOTE: For information on installing these libraries under one's $HOME directory, check the LocalUserSetup description.

Platform Specific Notes

Linux

Mac

Building Iplt

In the top level IPLT directory, please copy the settings.py.tmpl file to settings.py and edit it to adjust the build on your system. The individual options are:

  • EXTRA_INCLUDE_PATH: One or more space separated additional paths to search for header files during compilation
  • EXTRA_LIBRARY_PATH: One or more space separated additional paths to search for shared libraries during linking
  • EXTRA_CC_FLAGS: Additional flags to pass to the compilers (such as -Wall or -g)
  • EXTRA_LIBS: Additional libraries to link against
  • EXTRA_LINK_FLAGS: Additional flags to pass to the linker (other than libraries or library paths).
  • BOOST_LIBS_SUFFIX: The suffix to append to the generic boost library name, e.g. -gcc for gcc compiled, non-debug, single threaded boost. Depending on your boost installation, an empty suffix may be enough (ie BOOST_LIBS_SUFFIX = '').
  • PYTHON_VERSION: if given, overrides the default detection of the Python version that is present. The format of this parameter should be MAJOR.MINOR, e.g. 2.3. Usually not necessary.
  • INSTALL_PATH: Location of system-wide installation, e.g. \usr\local.Note that it is not necessary to install iplt in order to use it''
  • CC: explicit name of the C compiler, overides scons default
  • CXX: explicit name of the C++ compiler, overides scons default
  • LINK: explicit name of the linker, overides scons default

Upon running scons from the top-level directory (where SConstruct is located), you should see something like:

iplt/> scons
scons: Reading SConscript files ...
Identified linux platform
scons: done reading SConscript files.
scons: Building targets ...

[sniped lots of output ...]

scons: done building targets.

You may see some configuration attempts prior to compilation, and the build process will abort if the required components can not be found.

Setting up the Environment

The build procedure will 'stage' all header files, libraries, and executables in a special directory named stage, just in the top-level IPLT directory. This serves two purposes. First, the staged include path is available during the build, and #include statements can work in absolute mode, e.g. #include <iplt/image.hh>. Second, by including the staged bin and lib directories into the environment variables PATH resp. LD_LIBRARY_PATH, IPLT can be run from the local directory without system-wide install. This allows rapid and flexible development (see below).

The environment variable IPLT_ROOT must be set to point to either the stage directory, or the system-wide installation directory (such as /usr/local).

To automatically setup the staged execution environment, add the following lines to your startup-files (of course adjusting the line defining IPLT_ROOT to your system):

.login for (t)csh users on 32bit machines

setenv IPLT_ROOT ~/iplt/stage
setenv PATH $PATH:${IPLT_ROOT}/bin
if ($?LD_LIBRARY_PATH == 0) then
  setenv LD_LIBRARY_PATH ${IPLT_ROOT}/lib
else
  setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${IPLT_ROOT}/lib
endif

.login for (t)csh users on 64bit machines

setenv IPLT_ROOT ~/iplt/stage
setenv PATH $PATH:${IPLT_ROOT}/bin
if ($?LD_LIBRARY_PATH == 0) then
  setenv LD_LIBRARY_PATH ${IPLT_ROOT}/lib64
else
  setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${IPLT_ROOT}/lib64
endif

.bash_login or .bash_profile for bash users on 32bit machines

export IPLT_ROOT=~/iplt/stage
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPLT_ROOT/lib
export PATH=$PATH:$IPLT_ROOT/bin

.bash_login or .bash_profile for bash users on 64bit machines

export IPLT_ROOT=~/iplt/stage
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$IPLT_ROOT/lib64
export PATH=$PATH:$IPLT_ROOT/bin

Building the Documentation

Use the SCons target doc to build the in-source documentation, which will be places under stage/doc; the main entry point is stage/doc/html/index.html.

iplt/> scons doc

Windows