Installing IRAM GILDAS on Ubuntu

    Figure: Screenshot of GILDAS MAPPIN in action viewing an imported FITS spectral cube.

Fore information on IRAM GILDAS, see

NOTE: Updated for Ubuntu 16.04 Xenial Xerus and above.
Nowadays the readme file on the IRAM webpage gives pretty good instructions for Linux as well:

First download the source code from
named “gildas-src-mmmyya.tar.gz” where “mmm” is month e.g. Oct, and “yy” is year e.g. 16 and “a” is some letter which signifies the release number, starting with a.

Unpack and enter the directory (it will be installed in the same directory as the unpacked directory, but with “exe” instead of “src” in the name):

tar -xvzf gildas-src-mmmyya.tar
cd gildas-src-mmmyya

For the new GNOME3 framework, we still need to download libgtk2.0. Hence the dependencies are (including optional dependencies):

sudo apt install gfortran g++ libgtk2.0-dev python-dev python-numpy libblas-dev liblapack-dev libfftw3-dev libcfitsio3-dev

export GAG_SEARCH_PATH=”/usr/lib:/usr/lib/x86_64-linux-gnu”
export gagexedir=/home/magnusp/applications/gildas-current

Then configure environment variables and similar with the bash script:

source admin/ -s /usr/lib:/usr/lib/x86_64-linux-gnu

Note: the -s flag with “/usr/lib:/usr/lib/x86_64-linux-gnu” is to add more search paths so that it find CFITSIO and PNG libraries

Here you probably get one warning, something related to some ALMA holography thing, no worries you wont need it. If you do get some other warnings, resolve those dependencies first. After this just run 

this takes a couple of minutes. Then run
make install

to finally install GILDAS. This will install it in another directory, with “exe” instead. You can move this directory some place else if you want.

Now, to set the environment variables you get a message when the “make install” script finishes, you get a message of what to add, e.g.,:

export GAG_ROOT_DIR=/path-to-gildas/gildas-exe-MMMYYa
export GAG_EXEC_SYSTEM=x86_64-ubuntu13.10-gfortran
source $GAG_ROOT_DIR/etc/bash_profile
NB: The part that says “x86_64-ubuntuXX.YY-gfortran” will be specific for your system, e.g. for the latest Ubuntu this should be “x86_64-ubuntu16.04-gfortran”.
Just add the statement printed out last in in make install to the end of your .bashrc or .bashrc_profile file (e.g., “nano ~/.bashrc” or “nano ~/.bash_profile“).

To remove the start-up message i.e. the one that says something like this,
Selecting GILDAS version: mmYYa (21jun16 09:46 cest), executable tree, x86_64-ubuntu16.04-gfortran

every time you start a terminal you have to comment out the following lines in the file /path-to-gildas/gildas-exe-MMMYYa/etc/bash_profile :
if [ -n “$PS1” ]; then
    echo “Selecting GILDAS version: mmYYa (21jun16 09:46 cest), executable tree, ${GAG_EXEC_SYSTEM}”

that is, put hash-tags (#) in front of all the lines. 
Done! Now to run a GILDAS program just fire up the terminal and run whatever GILDAS program you want: mapping, class, astro, clic.

8 thoughts on “Installing IRAM GILDAS on Ubuntu

  1. This is great, works on my 64-bit 13.04! Thanks a bunch, the last time I've tried it, I ended up in a dependency hell I couldn't resolve.
    Also, you probably need to replace
    "comment out the following lines in the file /home/username/apps/gildas-exe-MMMYYa/etc/bash_profile"
    with something more generic like:


  2. Hi! Thanks for the post and hints. I've tried to install GILDAS under /usr/local/bin so that several users from my institute could run it from a server. Unfortunately, the make command issues an error message saying it cannot create a directory under /usr/local/bin. I've tried to run it as superuser, but it still cannot create the directory during the installation. Have you seen this problem before? Regards!

  3. Hi Helio Jaques Rocha. I don't think that installing GILDAS directly under /usr/local/bin is a good idea. Just install it in a common directory (say '/common/gildas-current'), make that directory readable by all users (chmod +r /common/gildas-current), and then make sure all users have the export and source lines in their .bashrc/.bash_profile file. i.e.

    export GAG_ROOT_DIR=/common/gildas-current
    export GAG_EXEC_SYSTEM=pc-debianwheezy-gfortran <– IF this is your system!
    source $GAG_ROOT_DIR/etc/bash_profile

    Then all users that log on to the server should be able to run the program (and use the GUI given that they have X11 forwarding activated).

    Hope it works out!

  4. Hi!
    Thanks for this guide, the full dependencies fixed a problem I had at the make stage with gtk.

    However the make now fails when trying to link to the libraris libgio and libgobject, many errors such as:

    /usr/lib/x86_64-linux-gnu/ undefined reference to `g_variant_dict_end'

    Do you possibly have any suggestions here?

    Many thanks!

  5. Yep! It appears to be installed using both apt-get and ldconfig, and is in the directory make thinks it is (as in, /usr/lib/x86_64-linux-gnu/ is real, present and version 2.40.2).

    Thank you anyway :-).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Raspberry Pi baby monitor – Hardware, part 1

Raspberry Pi baby monitor In this first of a multi-part post I will show my build of a Raspberry Pi…

Sync FitBit with Google Fit

Finally: sync FitBit and Google Fit at high time resolution! I have been trying to figure out a way to…

Monitor dependent setup in i3wm

Multiple configurations for different monitor setups in i3wm General Figure 1:¬†Anyone that recognize this image might find this "guide" useful!…

Screen brightness in i3wm on Thinkpad X260

Screen brightness using Fn keys in i3wm I got a new laptop for work, Lenovo Thinkpad X260. Installed Ubuntu 16.04…

%d bloggers like this: