-
Notifications
You must be signed in to change notification settings - Fork 61
GDL on Linux
Packages Compilation script build_gdl.sh cmake
As long as a 1.0.2 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 !
- Fedora: https://src.fedoraproject.org/rpms/gdl actively maintained.
- Mageia: https://madb.mageia.org/package/show/application/0/arch/x86_64/name/gnudl 1.0.0
- Debian:
- https://packages.debian.org/stable/gnudatalanguage 0.9.9-13 (too OLD)
- https://packages.debian.org/unstable/gnudatalanguage 1.0.1-4
- https://packages.debian.org/python3-gdl 1.0.1-4 in 'unstable'
- Ubuntu:
- http://packages.ubuntu.com/gnudatalanguage 1.0.3 in kinetic
- https://packages.ubuntu.com/python3-gdl 1.0.3 in kinetic
- Gentoo:
- https://packages.gentoo.org/packages/dev-lang/gdl 1.0.0 (too old)
- Arch:
- OpenSUSE:
At the moment, you can
- download the unstable weekly build binaries from https://github.com/gnudatalanguage/gdl/releases/tag/weekly-release, also see #957
or you can compile the code.
Two mains paths :
Way 1
using the script scripts/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/scripts/build_gdl.sh several 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 configure
will run Cmake to prepare the Make file -
build_gdl.sh build
will build gdl inbuild
. -
build_gdl.sh install
. This is the simplest way to be sure the paths and the links to the libs are OK.
A summary for Ubuntu/Debian (for RH/Fedora, just change apt-get by rpm ...):
apt-get install git
apt-get install curl // December 2021 because of Qhull ...
apt-get install cmake
apt-get install g++
mkdir GDL
cd GDL
git clone --recursive https://github.com/gnudatalanguage/gdl
cd gdl
./scripts/build_gdl.sh prep <<-- need to be sudo to add set of official packages
./scripts/build_gdl.sh configure
./scripts/build_gdl.sh build
(./scripts/build_gdl.sh check)
./scripts/build_gdl.sh install
then you should be able to start GDL by : ./install/bin/gdl
This efficient and simple way was successfully tested on : Ubuntu 16.04 LTS, 18.04 LTS (may have a glitch due to Magicks libs), 20.04 LTS, 22.04 LTS; Debian 9, 10, Sid; Fedora 28
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. Sometimes the plplot drivers are not in the plplot package but in a different one, say,
plplot-driver-wxwidgets
. This is distribution-dependent, search the web. -
plplot
NEEDS to be compiled with option-DENABLE_DYNDRIVERS=ON
since GDL uses his own (patched) plplot drivers, they come with the GDL code. Hence the need for a plplot library compiled in such a way as to permit loadable drivers. Normally plplot is distributed this way under linux. -
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 --recursive 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)