Compile GPS
How to compile the newest gps
The following description shows how to compile your very own GPS environment. It makes the following assumptions:
- You use a GNU/Linux environment with the following packages:
- * A gcc 3.4.1 with an Ada compiler included.
- * A current Gtk development package.
- You do your compilations in /work.
- You do your installations in /opt
- You do have a working Internet connection.
If you want it any other way you need, use your brain to change the commands appropriately.
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.
CVS_RSH=ssh CVSROOT=:ext:<A HREF="mailto:anoncvs@savannah.gnu.org">anoncvs@savannah.gnu.org</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.
GtkAda
GPS is based on GtkAda – so you need this last one first:
Get GtkAda
Get the newest version from the AdaCore's Libre site. (http://libre.adacore.com(approve sites) )
CVS_RSH=ssh CVSROOT=:pserver:anoncvs@libre.adacore.fr:/anoncvs mkdir --parents /work/act cd /work/act cvs -qz4 checkout -P -r gps-2_0_1 GtkAda
Configure
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.
Compile</H3>
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= make
Install
Just as easy. Don't forget to set your include paths again.
make install ADA_INCLUDE_PATH=${ADA_INCLUDE_PATH}:/opt/ada/include/gtkada
GPS
Now we are ready to compile the GNAT Programming System.
Get GPS
Again, get the newest version from the Libre site.
CVS_RSH=ssh CVSROOT=:pserver:anoncvs@libre.act-europe.fr:/anoncvs cd /work/act cvs -qz4 checkout -P -r gps-2_0_1 gps
Configure
Again nothing fancy here:
cd /work/act/gps configure –prefix=/opt/ada
Compile
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 http://ada.krischik.com/stubs.c declare -x ADA_OBJECTS_PATH= declare -x ADA_INCLUDE_PATH= make
Install
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.