Welcome to my unobtrusive blog!
By default I blog in english but there is also german content.

GPS/GNAT Programming Studio for Ada on Ubuntu Hardy amd64

October 23rd, 2008 Posted in english

Today I downloaded GPS or the GNAT Programming Studio 2.1.0 for Ada from https://libre.adacore.com/gps/ and when I started it I got the following error message:

andreas@mierda-laptop:~$ gps

Execution terminated by unhandled exception
Exception name: STORAGE_ERROR
Message: stack overflow (or erroneous memory access)
Call stack traceback locations:
0×89d8508

I then found out that Hardy himself is providing a gps package which is called “gnat-gps” but that doesn’t work either as it throws an error like this:

raised SYSTEM.ASSERTIONS.ASSERT_FAILURE : glib-graphs.ads:352

I then downloaded the source code of gnat programming studio so I can compile it manually. The file I downloaded was the following: https://libre.adacore.com/gps/gps-2.1.0-academic-src.tgz

You first have to install libgtkada-2.8 and libgtkada2-dev but what’s worse is that you can’t even install libgtkada-2.8 which you’ll need for gnat programming studio. You’ll get the following error:

The following packages have unmet dependencies:
libgtkada-2.8: Depends: libgnat-4.2 (>= 4.2.4-1ubuntu3) but 4.2.3-2ubuntu2 is to be installed
E: Broken packages

Solution:

  • add “deb http://archive.ubuntu.com/ubuntu/ hardy-proposed restricted main multiverse universe” to /etc/apt/sources.list
  • create a /etc/apt/preferences with the following content:
    • Package: *
      Pin: release a=hardy-updates
      Pin-Priority: 900

      Package: *
      Pin: release a=hardy-proposed
      Pin-Priority: 400

  • sudo apt-get update
  • sudo aptitude install libgtkada-2.8 -t hardy-proposed
  • sudo aptitude install libgtkada2-dev -t hardy-proposed
  • mkdir /home/andreas/packages/gps
  • cd /home/andreas/packages/gps
  • wget https://libre.adacore.com/gps/gps-2.1.0-academic-src.tgz
  • gzip -d gps-2.1.0-academic-src.tgz && tar -xf gps-2.1.0-academic-src.tar && rm gps-2.1.0-academic-src.tar
  • cd gps-2.1.0-academic/
  • delete everything between lines 3940 and 4086 (checks what platform you are running but fails at that) in the “configure” script
  • set the following variables…around line 3942
    • opsys=’gnu-linux’
      machine=’intel386′
  • before the they are being used here…
    • machfile=”‘\”machine/${machine}.h\”‘”
      opsysfile=”\\\”system/${opsys}.h\\\”"
  • ./configure –prefix=/usr
  • make

And after a short time you’ll get something like this:

/usr/include/gtk-2.0/gdk/gdkcolor.h:30:19: error: cairo.h: No such file or directory

And no, I don’t know how to go on from here :P…sorry…if you know any solution to this, I’m glad to hear/read it.

Kind regards,

Andreas.

//Update November 2th 2008

On Ubuntu Intrepid (8.10) you can install the gnat programming studio with “sudo apt-get install gnat-gps” and it even works :). That doesn’t mean it’s worth installing it…I tried it at work on a windows workstation and I’m not that teased…really, not worth it imho.

follow comments via rss
  1. 2 Responses to “GPS/GNAT Programming Studio for Ada on Ubuntu Hardy amd64”

  2. By Roger Mc Murtrie on Dec 21, 2008

    This bug has been reported at
    https://bugs.launchpad.net/ubuntu/+source/gnat-gps/+bug/293076
    So far, no action or other comment

  3. By Andreas Schipplock on Dec 23, 2008

    It has been silently fixed in Intrepid :).

Post a Comment