Compiling GDL (gnudatalanguage)

GDL (GNU Data Language) is a free/libre open-source program that runs most IDL code. Specifically, GDL claims to be completely IDL 7.x compatible, and has many features from IDL 8. GDL is actively developed on GitHub. GDL is easily installed by:


If you choose to compile GDL from source, here’s how for Linux:

  1. Prereqs
    apt install libbz2-dev libplplot-dev libfontconfig1-dev libncurses5-dev libreadline-dev libgsl0-dev libwxgtk3.0-dev libmagick++-dev libnetcdf-dev libhdf4-alt-dev libgraphicsmagick++1-dev libhdf5-serial-dev libfftw3-dev python-dev libeigen3-dev pslib-dev libqhull-dev
  2. Download GDL source and extract

    tar xf gdl-*.gz
    cd gdl-*
  3. Compile GDL Gnu Data Language program
    mkdir release
    cd release
    cmake --build . -j -- -l 4

    If you have Anaconda Python installed, conda deactivate first to avoid library problems when building GDL.

  4. Check the install:
    cmake --build . -- check

    You will see several plots appearing and disappearing automatically during this test, which takes a few minutes. With GDL 0.9.8 on Ubuntu 18.04:

    The following tests FAILED:
     93 - (Failed)
       96 - (Failed)
     	 103 - (Failed)
      106 - (Failed)
      114 - (Failed)
      123 - (Failed)
      129 - (Failed)
      140 - (Failed)
      142 - (Failed)
      144 - (Failed)
      166 - (Failed)
      168 - (Failed)
      190 - (Failed)
  5. install (do not use sudo)
    cmake --build . --target install

    Given the cmake command of step #3, this installs under ~/.local


  • Do not build on an ExFAT / FAT32 drive, as the build will fail since symbolic links are not allowed on ExFAT / FAT32.
  • If cmake reports libeigen being too old, read below to the optional LibEigen3 section, or use -DEIGEN3=OFF
  • If you wish to use your Linux repo’s older version of IDL, just use /usr/local/bin/gdl or similar, or rename ~/.local/bin/gdl to ~/.local/bin/gdl0.98 or similar.


  • Errors on runtime search path conflicts: temporarily comment out those paths in ~/.bashrc (typically from Anaconda Python, libreadline, libhistory, libz,
  • cmake error about libeigen being too old: get a newer libeigen by downloading libeigen and extract to ~/libeigen. Then, recompile GDL with
    cmake -DEIGEN3DIR=$HOME/libeigen  (rest of your options)
    cmake --build . -j -- -l 4
    cmake --build . -- check
    cmake --build . --target install

OR you can compile as in the section below

Basic GDL Compilation

If you’re having problems with LZMA errors, you can try disabling HDF5 by adding option cmake -DHDF5=OFF ..

LibEigen (optional)

When compiling GDL, you may need a libeigen3 newer than your operating system supports – feel free to download a newer version of libeigen3 and compile:

apt install gfortran libsuperlu3-dev libmetis-dev libscotch-dev libmpfr-dev libadolc-dev qt4-qmake

cd /tmp

tar xf 3.*.tar.bz2

cd eigen* && mkdir release && cd release

cmake ..

make install

GDL missing libraries fix

ln -s /usr/lib/x86_64-linux-gnu/ /usr/local/lib/

ln -s /usr/lib/ /usr/local/lib/



Written by Michael Hirsch, Ph.D. //