Skip to content

GDL on Linux

Alain edited this page Jul 20, 2021 · 27 revisions

Packages Compilation script build_gdl.sh cmake

packages:

Warning : we try hard to deliver a 1.0.0 version, the code is actively changed, a lot of small or important bugs have been corrected in rc1, rc2, rc3 and in the current Git version ... As long as a 1.0.0 version is not delivered, please consider that most packages don't really reflect the current status of the code. It would be better to use the weekly unstable releases !

SO THESE VERSIONS ARE (MOSTLY) OBSOLETE. This warning will disappear when the above distributions will be in sync.

At the moment, you can

Compilation:

or you can compile the code

Two mains paths :

script:

Way 1 using the script .ci/build_gdl.sh (assuming you can be sudo)

  • Assuming you already have a c++ compiler , Cmake (version > 3.2), curl or wget, git
  • Download the gdl code, and run gdl/.ci/build_gdl.sh 2 times:
  • build_gdl.sh prep will install the required libraries. (If you are not sudoer you will get a list of libs. your admin. will installed for you.)
  • build_gdl.sh build will build gdl in build and install it in install. This is the simplest way.

A summary for Ubuntu/Debian (for RH/Fedora, just change apt-get by rpm ...):

apt-get install git
apt-get install cmake
apt-get install g++
mkdir GDL
cd GDL
git clone https://github.com/gnudatalanguage/gdl
cd gdl
bash .ci/build_gdl.sh prep   <<-- need to be sudo to add set of official packages
bash .ci/build_gdl.sh build

This efficient and simple way was successfully tested on : Ubuntu 16.04 LTS, 18.04 LTS, 20.04 LTS; Debian 9, 10, Sid; Fedora 28

### cmake:

or, traditional way,Way 2 using CMake :

  • GDL is written in such a way you can compile it fully in user space, without being root, as long as all the mandatory packages (-dev/-devel) are around. If some packages are missing or outdated (e.g. Eigen3), yes, you can use a version in your user space, giving the path as a parameter to CMake (e.g. -DEIGEN3DIR=/path/to/local/Eigen3)

  • GDL can be compiled with : GCC (GNU C Compiler), Clang (LLVM), icc (Intel C compiler)

  • GDL now requests CMake 3+. On some old systems (Debian 9, U 14.04) you have access to CMake 3+ with package cmake3 or equivalent module (on HPC with module)

  • You will NEED the wxWidgets library and the plplot drivers for wxWidgets Eventually, you could build gdl with the option "-DINTERACTIVE_GRAPHICS=OFF' to enable compilation without warnings related to the absence of the adequate plplot driver, but GDL may be unable to open a graphic windows. Sometimes, plplot drivers for wxWindows or Xwin (X11) may be in a separate package, say, plplot-driver-wxwidgets . We appreciate returns to update this documentation.

  • When compiling the first time, you may be blocked because one package is missing. After installing it, it is mandatory to clean the cache before running again cmake (rm -f CMakeCache.txt)

  • Compilation. Once all the packages are around, it is quite fast on multi-cores :)

git clone https://github.com/gnudatalanguage/gdl
cd gdl
mkdir build
cd build
cmake ..
make -j N  (N depending the number of cores you have)
make test

(on my old laptop with N=4, less than 5 minutes)

Clone this wiki locally