(retour page principale), (IDL et GDL), (Tutoriel GDL).

Alain Coulais
3 Mars 2015, major upgrade in February 2017 (after 0.9.7 release). SVN in January 2018. correcting CMake > 3.2 detection in April 2018 (after 0.9.8 release). Update August 2018 (Git master + OpenMP flag + plplot issue on OSX)

[francais]Autres documents d'aide la compilation de GDL: sous OSX (OSX 10.5.6, OSX 10.6.3, OSX 10.9x ou 10.10x), sous CentOS (5.4/5.5 ou 5.7), sous Ubuntu 12.04, sous [anglais] MS-windows avec MinGW

A shell Script for Minimal Compilation of GDL with mandatory dependencies

Since SourceForge removed CVS support, the script was updated on Jan. 18, 2018 to use the SVN depot.

The script was updated on Feb. 6, 2017 to use Readline, GSL, Cmake if they are already available. When Cmake is found and below 2.8, CMake 2.8.11 is locally compiled, Plplot 5.9.11 is used. When Cmake is >= 3.2, Plplot 5.11.1 must be used. (Plplot 5.11.1 required Cmake >= 3.2.3 on OSX, 3.0.2 on Linux, please read the Plplot release policy ( policy 5.9, policy 5.11.1)

The script below was update on Nov. 6, 2015 to manage a change in the way to download CMake. I added the capacity to restart jumping quietly over the steps already done (e.g. $ ./minimum_script4gdl.sh 2 will go directly to CMake, over Readline and the GSL.

Since two years, this script can be found in the official CVS depository of GDL on SourceForge, in the script/ sub-directory. The previous versions of this script are still available here.

[anglais]Please find here a minimal shell script to compile the current CVS version of GDL and the mandatory dependencies : Readline, the GSL, cmake, plplot. Obviously, the target system is supposed to be prepared for compilations : having one C++ compiler, having some devel packages installed, e.g. libX11-devel (RH/CT/Fedora) or libx11-dev (Debian/U). This very basic script was tested with success on various OS :

You are surprised to see in this list very old systems ? GDL is used for scientific computations on HPC with tens or hundreds nodes and 8 up to 64 cores per node ... For those systems, it's frequent to have old stable kernels but tuned by resellers (Dell, Hp, IBM ...) Obviously for such usages, full install within OpenMP and Eigen3 is highly recommended !

Notes for OSX : OSX major versions (e.g. 10.9/10/11 and sub version 10.10.2/3/4) have each details and tricks, and for a same version (e.g. 10.10.4) the overhall behavior might change ! Today during the Miri tests at GSFC, I installed GDL on two 10.10.4. for one I need to de-sactivate the support for Qt in plplot (first time I did it) for the second one we had to change one line in /usr/include/dispatch/object.h related to dispatch_block_t. That is tricky !

Thanks to a GDL contributor (message posted in the [gnudatalanguage-devel] mailing list, this script was tested on MSwin, and is OK with limited changes (e.g. desactivating Readline and Ncurse) within MSYS2 and mingw-w64 on Windows 7

[Warning] This script is just to help to quickly compile from the sources a GDL version. Since Eigen3, OpenMP and FFTw are not activated here, don't expect to have good performances for computation. If you succeed to compiling with this script, you should be able to recompile with more options. See tutorials in links above.

You don't need to be root but you need to have:

And that's all !!

Adding useful packages

On a system used without -devel- usage at all, it is mandatory to add few extra packages: libncurses-dev and zlib1g-dev. It is not mandatory but it avoids to cascade in desactivating various nice options ... If the X11 devel environnement is not available you may have extra troubles. You can try : cmake [the other options] -DPNGLIB=OFF -DX11=OFF.

On Debian or Ubuntu systems:
$ sudo apt-get install libncurses-dev zlib1g-dev libpng-dev xorg-dev

On CentOS, RH, SL systems:
$ sudo yum install ncurses-devel zlib-devel libpng-devel libX11-devel

On OSX, within Brew:
$ brew install gsl cmake

(If you do that after you got complains during GDL compilation, dont' forgot to remove the build directory in GDL part, e.g. \rm -R)

Running the Script !

$ mkdir -p My/Custom/Temporary/Path/
$ cd My/Custom/Temporary/Path/
$ curl http://aramis.obspm.fr/~coulais/IDL_et_GDL/minimum_script4gdl.sh -O
$ wget http://aramis.obspm.fr/~coulais/IDL_et_GDL/minimum_script4gdl.sh
$ ./minimum_script4gdl.sh (it should detect it is a bash script)

Depending of the hardware and the number of cores, wait between 10 minutes up to 1 hour. Very slow on OSX due to compilation of GDLTreeParser.cpp
Then you can go in the GDL sub-directory and start it:

$ cd gdl-0.9.6cvs16MMDD (to be check, MM: month, DD: day)
$ sh ./quick_start_GDL.sh

Regressions tests ?

$ cd gdl-0.9.6cvs16MMDD/build
$ make check

Please remember it is just a subset of GDL capabilities and performances: Maybe OpenMp is not ON, Eigen3 is OFF here, many useful third party dependencies are not take into account. It just to show that it is very easy to have it and you can play with the basic commands !


If you succeed to get GDL using this script, don't hesitate to send me a brief email ;-)

Feedback on problems, issues, errors, mistakes are welcome. Improvement suggestions are welcome, but please keep in mind I would to keep minimalist this script (KISS). If you want to go further, please install all the devel packages provided by your distros.