Ada Programming $WikiTagline

How to compile the newest gps

The following description shows how to compile your very own GPS environment. It makes the following assumptions:

  1. You use a GNU/Linux environment with the following packages:
  2. * A gcc 3.4.1 with an Ada compiler included.
  3. * A current Gtk development package.
  4. You do your compilations in /work.
  5. You do your installations in /opt
  6. You do have a working Internet connection.

If you want it any other way you need, use your brain to change the commands appropriately.

Important: Neither GPS nor GtkAda has been developed by me. For all questions but typing mistakes on my side you should join the appropriate mailing list and ask your questions there (monitor gps-devel):
Please note that it took me more than half a dozen tries and just as many mails on the gps-devel mailing list.
'''Only try it if you are an experienced developer! If you are not: just download the pre-compiled old version!

The Compiler

For GPS you need the sources of the gcc 3.5 – not 3.4.2. But it is enough to download it, you don't need to compile and install a stable development version.

Get the Compiler

First you need the get the compiler.

 CVSROOT=:ext:<A HREF=""></A>:/cvsroot/gcc 
 mkdir --parents /work/gnu_3.5 
 cd /work/gnu_3.5 
 cvs -qz4 checkout -P gcc/gcc/ada  

Now you have the newest sources in “/work/gnu_3.5/gcc”. You may cut your Internet connection now.


GPS is based on GtkAda – so you need this last one first:

Get GtkAda

Get the newest version from the AdaCore's Libre site. ( sites) )

 mkdir --parents /work/act 
 cd /work/act 
 cvs -qz4 checkout -P -r gps-2_0_1 GtkAda


There is no fancy “configure” needed here:

 cd /work/act/GtkAda
 configure –prefix=/opt/ada  

The configure script might tell you about a version mismatch with your Gtk+ version. Well it worked for me to just remove the check, but it's also a good option to try to get a correct version.

How to remove the GTK+ Version check

Open configure with a text editor, at about line 2833 starts a C program. Look for the “return 1” command and replace it with “return 0”. Call configure again.


Like with most AdaCore Libraries you need to reset the include paths. Apart from that quite easy:

 declare -x ADA_OBJECTS_PATH=
 declare -x ADA_INCLUDE_PATH= 


Just as easy. Don't forget to set your include paths again.

 make install


Now we are ready to compile the GNAT Programming System.


Again, get the newest version from the Libre site.

 cd /work/act 
 cvs -qz4 checkout -P -r gps-2_0_1 gps  


Again nothing fancy here:

 cd /work/act/gps
 configure –prefix=/opt/ada  


GPS grasps some of the original GNAT sources to implement the project manager support for which a symbolic is needed. Also, for gcc 3.4.1 you need a special patch. If you have wget installed the following commands will do:

 cd /work/act/gps
 ln -s ../../gnu_3.4/gcc/gcc/ada gnat_src 
 wget --output-file=common/src/stubs.c 
 declare -x ADA_OBJECTS_PATH= 
 declare -x ADA_INCLUDE_PATH= 


If you are lucky, and it did compile, then install is easy again.

 make install

© 2005,2006 Martin Krischik, Content is available under GNU Free Documentation License.