Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Current statu of ASIS for GNAT 2012, please ?

67 views
Skip to first unread message

Yannick Duchêne (Hibou57)

unread,
Sep 28, 2011, 5:56:04 AM9/28/11
to
Eh, I would better say, “Current status of ASIS for GNAT-4.6”

I just compiled GCC-4.6 and GNAT-4.6 for Ubuntu Maverick. That could be
nice, except now I feel bothered with ASIS. The only one I could get is
for GNAT-4.0, which obviously, did not came with Ada 2012 support, so not
even worth to attempt to compile it to be used with GNAT-4.6

By the way, I was also wondering, simply, was is the overall status of
ASIS in regards to Ada 2012 ?

And for the practical matter, which is very worth too, what ASIS library
should I use with GNAT-4.6 ?


Enjoy a nice day all Ada essayists :)


--
“Syntactic sugar causes cancer of the semi-colons.” [Epigrams on
Programming — Alan J. — P. Yale University]
“Structured Programming supports the law of the excluded muddle.” [Idem]
Java: Write once, Never revisit

Yannick Duchêne (Hibou57)

unread,
Sep 28, 2011, 8:10:21 AM9/28/11
to
Le Wed, 28 Sep 2011 11:56:04 +0200, Yannick Duchêne (Hibou57)
<yannick...@yahoo.fr> a écrit:
> And for the practical matter, which is very worth too, what ASIS library
> should I use with GNAT-4.6 ?

According to this
http://www.mail-archive.com/debia...@lists.debian.org/msg00351.html
This should be available somewhere. I precisely lacks the Where.

Please Ludovic, when you say
> I have just uploaded a new version of package "gnat" which changes the
> default Ada compiler from gnat-4.4 to gnat-4.6. This marks the
> beginning of the transition of all other Ada packages to gnat-4.6. The
> first such package will be asis, which I am building now.
Where is the upload location ? I am not that much confident with it, as I
usually rely on Synaptic, which did not help.

Ludovic Brenta

unread,
Sep 28, 2011, 1:40:41 PM9/28/11
to
"Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:
> Le Wed, 28 Sep 2011 11:56:04 +0200, Yannick Duchêne (Hibou57)
> <yannick...@yahoo.fr> a écrit:
>> And for the practical matter, which is very worth too, what ASIS
>> library should I use with GNAT-4.6 ?
>
> According to this
> http://www.mail-archive.com/debia...@lists.debian.org/msg00351.html
> This should be available somewhere. I precisely lacks the Where.
>
> Please Ludovic, when you say
>> I have just uploaded a new version of package "gnat" which changes the
>> default Ada compiler from gnat-4.4 to gnat-4.6. This marks the
>> beginning of the transition of all other Ada packages to gnat-4.6. The
>> first such package will be asis, which I am building now.
> Where is the upload location ? I am not that much confident with it,
> as I usually rely on Synaptic, which did not help.

The upload location is a Debian server that accepts only packages signed
with a Developer's or a Maintainer's GPG key. After the upload, the
build daemons rebuild the package on all architectures, then install the
package in unstable, which makes them visible in aptitude or synaptic
after you update your package list.

So, if you want to use the version of asis currently in unstable (viz
2010-2), here is what you do:

- make sure you are using Debian unstable (duh) in /etc/apt/sources.list
- launch aptitude or synaptic or whatever
- update your package list
- look for asis2010-dev and install it.

Note: I cannot speak for Ubuntu. If a Debian package is not in Ubuntu,
upgrade to Debian.

--
Ludovic Brenta.

Yannick Duchêne (Hibou57)

unread,
Sep 28, 2011, 5:21:33 PM9/28/11
to
Le Wed, 28 Sep 2011 19:40:41 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:
> Note: I cannot speak for Ubuntu. If a Debian package is not in Ubuntu,
> upgrade to Debian.
Ludovic, I finally did what I should have tried first: simply use the ASIS
source from http://libre.adacore.com/libre/download/ (shame on me)
It compiled fine with this freshly compiled GCC+GNAT-4.6

Note: I faced again a trouble previously encountered on Windows, while
compiling AUnit. The Make process complains no compiler is specified (like
some months ago on Windows), and blah‑blah‑blah. Could figure the trouble
now: it invokes GPRBuild, and there was no GPRBuild with the compiled
GNAT-4.6, I mean none in /usr/local/bin, so it invokes instead, the one in
/usr/bin, which is obviously irrelevant. But I don't bother too much, as
Ada 2012 + ASIS (+ optionally SPARK) is the most important to my eyes.

That's OK for ASIS, will have a look at the docs to know what changed, and
if extensions of Ada 2012 are accessible via this ASIS interface.

Standard or not so far ? May be Jean-Pierre could tell more :)

Note: may be an error with some file names, as some names seems to refer
to Ada 2015 (seems some files names were not updated since some ancient
times).

See you an undetermined future next time :) Have a nice time all…

Ludovic Brenta

unread,
Sep 29, 2011, 2:44:45 AM9/29/11
to
Yannick Duchêne writes on comp.lang.ada:

> Ludovic, I finally did what I should have tried first: simply use the
> ASIS source from http://libre.adacore.com/libre/download/ (shame on
> me) It compiled fine with this freshly compiled GCC+GNAT-4.6

What is your goal? If you want to learn how to compile everything from
sources then you are doing the right thing and eventually you should
consider joining the merry team of Debian Ada maintainers. But if you
only want to use GNAT, ASIS and SPARK then why don't you simply use the
existing Debian packages in unstable? (Yes, SPARK is there too!)

--
Ludovic Brenta.
The resources enable tolerably expensive pipelines.

Stephen Leake

unread,
Sep 29, 2011, 8:57:38 AM9/29/11
to
"Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:

> Note: I faced again a trouble previously encountered on Windows, while
> compiling AUnit. The Make process complains no compiler is specified
> (like some months ago on Windows), and blah‑blah‑blah. Could figure
> the trouble now: it invokes GPRBuild, and there was no GPRBuild with
> the compiled GNAT-4.6,

On Debian (and probably on Ubuntu), gprbuild is in a separate package.

gprbuild-2011-1, which is compatible with gnat-4.6, is now in Debian
unstable. It looks like it will migrate to testing soon (when the
mandatory wait period is over; see
http://qa.debian.org/developer.php?login=stephe...@stephe-leake.org#gprbuild).

--
-- Stephe

Yannick Duchêne (Hibou57)

unread,
Sep 29, 2011, 2:39:54 PM9/29/11
to
Le Thu, 29 Sep 2011 08:44:45 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:
> What is your goal? If you want to learn how to compile everything from
> sources
Not the purpose, just that 4.6 is not available with Maverick. 4.6 is the
default with Oneiric, but I can't upgrade to Oneiric for some reason.
Trying to use other repository did not work neither.

> then you are doing the right thing and eventually you should
> consider joining the merry team of Debian Ada maintainers.
If that was not a joke, that's nice of you, but I'm afraid I would be too
much episodic.

Yannick Duchêne (Hibou57)

unread,
Sep 29, 2011, 2:46:40 PM9/29/11
to
Le Thu, 29 Sep 2011 14:57:38 +0200, Stephen Leake
<stephe...@stephe-leake.org> a écrit:
> On Debian (and probably on Ubuntu), gprbuild is in a separate package.
Could finally got it to compile, AUnit too, and the sole remaining trouble
is now all compilation with dependencies to AUnit, complains about a
missing libaddr2line. I don't bother, I will just not use AUnit, although
it's convenient and nice. I saw you and Ludovic wrote some words about it
in some mailing lists.

Simon Wright

unread,
Sep 29, 2011, 5:54:53 PM9/29/11
to
"Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:

> Ludovic, I finally did what I should have tried first: simply use the
> ASIS source from http://libre.adacore.com/libre/download/ (shame on
> me) It compiled fine with this freshly compiled GCC+GNAT-4.6

Did it actually _work_?

I managed to build ASIS GPL 2010 with GCC 4.5.0, and get it to work,
without a huge amount of trouble; my notes say

ASIS for GNAT reads .adt files, which contain the binary
representation of the program. This includes numbers that correspond
to syntax elements.

These numbers are determined for a particular compiler release by
particular compiler components, Sinfo and Snames, so to make ASIS
work you need to include the appropriate files from your compiler.
Sinfo is just the source files sinfo.ads, sinfo.adb. Snames is
created from template files snames.ads-tmpl and snames-adb.tmpl.

As well as this, you'll need to copy gnatvsn.ads from your compiler,
and edit gnatvsn.adb to match (for example, GNAT GPL 2010 source
includes GNATPro as a build possibility, which isn't allowable in the
FSF sources for GCC 4.5.0).

So, to adapt ASIS GPL 2010 for use with GCC 4.5.0, in
asis-2010-src/gnat/:
* replace sinfo.ad[bs] by gcc-4.5.0/gcc/ada/sinfo.ad[bs]
* replace snames.*-tmpl by gcc-4.5.0/gcc/ada/snames.*-tmpl
* replace gnatvsn.ads by gcc-4.5.0/gcc/ada/gnatvsn.ads
* edit gnatvsn.adb to remove the 'gnatpro' choices, not in the .ads

The same process didn't work for ASIS GPL 2010 or 2011 vs GCC 4.6.0,
because of Tree_Format_Error exceptions; not surprising for 2011,
because Tree_IO.ASIS_Version_Number is 26 for 2011 and 23 for 4.6.0, but
unexpected for 2010 whose ASIS_Version_Number is also 23.

If I need to do ASIS things, it's easiest to use the matching GNAT GPL!

Ludovic Brenta

unread,
Sep 30, 2011, 2:11:45 AM9/30/11
to
Simon Wright writes on comp.lang.ada:
Debian solves that problem by introducing libgnatvsn, a library compiled
from GCC sources and containing gnatvsn.ads, sinfo.ad[bs], snames.ad[bs]
and everything they depend on. libasis is compiled against libgnatvsn.
AFAICT, asis 2010 works with gnat-4.6 on Debian but I'd like to have a
good test case. Simon, could you explain how you got the
Tree_Format_Error exceptionss so I can try the same thing that you did?

--
Ludovic Brenta.

Stephen Leake

unread,
Sep 30, 2011, 6:10:37 AM9/30/11
to
"Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:

> Le Thu, 29 Sep 2011 14:57:38 +0200, Stephen Leake
> <stephe...@stephe-leake.org> a écrit:
>> On Debian (and probably on Ubuntu), gprbuild is in a separate package.
> Could finally got it to compile, AUnit too, and the sole remaining
> trouble is now all compilation with dependencies to AUnit, complains
> about a missing libaddr2line.

That's why you need to use a consistent set of packages from one source.

Either use only stuff from GNAT Libre, or only stuff from Ubuntu.

If neither of those works for you, upgrade to Debian.

> I don't bother, I will just not use AUnit,

I hope that doesn't mean you wont do testing at all. Testing is an
essential part of software development.

I'm not clear which I'd choose if forced to choose between gprbuild and
aunit. Fortunately, with Debian, I don't need to :).

--
-- Stephe

Ludovic Brenta

unread,
Sep 30, 2011, 9:23:51 AM9/30/11
to
Yannick Duchêne wrote on comp.lang.ada:
> 4.6 is not available with Maverick. 4.6 is the default with Oneiric

BTW, please double-check this, i.e. what is the version number of the
package "gnat" on Oneiric? I do mean "gnat", not "gnat-4.6". If 4.6
is indeed the default in Oneiric, then the Ada support in Oneiric is
completely broken because it contains some packages meant for
gnat-4.4, some others meant for gnat-4.6, and a general impossibility
to mix them. Even now, the Ada support in Debian unstable is broken
for the same reason (Debian testing and Debian stable are, of course,
fine).

--
Ludovic Brenta.
Our measures interactively incentivise the enabler.

Ludovic Brenta

unread,
Sep 30, 2011, 9:29:41 AM9/30/11
to
Yannick Duchêne wrote on comp.lang.ada:
> Could finally got it to compile, AUnit too, and the sole remaining trouble  
> is now all compilation with dependencies to AUnit, complains about a  
> missing libaddr2line.

This is a well-known and very old problem that I solved for Debian
circa 2003. The Debian compiler (be it gnat-4.4 or gnat-4.6) does not
have this problem.

--
Ludovic Brenta.
We must activate the cube to 200% conversate.

Yannick Duchêne (Hibou57)

unread,
Sep 30, 2011, 6:11:56 PM9/30/11
to
Le Fri, 30 Sep 2011 15:23:51 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:
> Even now, the Ada support in Debian unstable is broken
> for the same reason (Debian testing and Debian stable are, of course,
> fine).
Ok, but there is no ASIS 2010 in Wheezy, only Sid provide it. Is this
possible to use ASIS from Sid and GCC/GNAT from Wheezy ? (well, to be
honest, this is what I will try, so I will get a reply to this soon).

Simon Wright

unread,
Oct 1, 2011, 2:39:15 AM10/1/11
to
Ludovic Brenta <lud...@ludovic-brenta.org> writes:

> Debian solves that problem by introducing libgnatvsn, a library
> compiled from GCC sources and containing gnatvsn.ads, sinfo.ad[bs],
> snames.ad[bs] and everything they depend on. libasis is compiled
> against libgnatvsn. AFAICT, asis 2010 works with gnat-4.6 on Debian
> but I'd like to have a good test case. Simon, could you explain how
> you got the Tree_Format_Error exceptionss so I can try the same thing
> that you did?

This turned out to be my mistake; as Ludovic implies, you need to
replace the whole of the asis-2010 gnat/ directory by the corresponding
files from the compiler you're actually using.

I still think that if the tree format version number hasn't changed you
shouldn't get Tree_Format_Error exceptions! but everyone's human, after
all.

There are a couple of things in the ASIS code that aren't supported by
GCC 4.6; "Name_Implemented_By_Entry" and "Is_Overriding_Operation". Not
sure how these will affect users, though.

I'll be writing this up properly soon.

Ludovic Brenta

unread,
Oct 1, 2011, 5:01:44 AM10/1/11
to
Simon Wright <si...@pushface.org> writes:
> I still think that if the tree format version number hasn't changed you
> shouldn't get Tree_Format_Error exceptions! but everyone's human, after
> all.

I agree.

> There are a couple of things in the ASIS code that aren't supported by
> GCC 4.6; "Name_Implemented_By_Entry" and "Is_Overriding_Operation". Not
> sure how these will affect users, though.

Yes, we patched ASIS 2010 for Debian to make it source-compatible with
the libgnatvsn of GCC 4.6.

--
Ludovic Brenta.

Ludovic Brenta

unread,
Oct 1, 2011, 5:11:35 AM10/1/11
to
Yannick Duchêne writes on comp.lang.ada:
> Le Fri, 30 Sep 2011 15:23:51 +0200, Ludovic Brenta > a écrit:
>> Even now, the Ada support in Debian unstable is broken for the same
>> reason (Debian testing and Debian stable are, of course, fine).
> Ok, but there is no ASIS 2010 in Wheezy, only Sid provide it. Is this
> possible to use ASIS from Sid and GCC/GNAT from Wheezy ? (well, to be
> honest, this is what I will try, so I will get a reply to this soon).

Why do you keep resisting so much? Why do you keep looking for trouble?
Just upgrade to Debian unstable be done with it.

As I explained, ASIS and GNAT are tightly coupled, more so than any
other Ada packages. Therefore libasis2010-dev will not work with
gnat-4.4, even if you recompile both. If you upgrade to Debian sid now,
you get gnat-4.6, libasis2010-dev, spark 2011 and gprbuild 2011 all
seamlessly working together. The other libraries like AWS and GtkAda
have not yet migrated to the new compiler, but you can still use
e.g. gnat-gps to compile with gnat-4.6.

If you are reluctant to upgrade your entire operating system to Debian
unstable, you can still use the unstable packages in a chroot; see
http://lists.debian.org/debian-ada/2010/02/msg00003.html.

Again, why do you keep trying to find other, more difficult solutions to
your problem?

--
Ludovic Brenta.

Yannick Duchêne (Hibou57)

unread,
Oct 1, 2011, 10:17:28 AM10/1/11
to
Le Sat, 01 Oct 2011 11:11:35 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:
> Again, why do you keep trying to find other, more difficult solutions to
> your problem?
I may have to give a summary of the history so far: as pointed in this
thread, every thing was fine, except for AUnit, which could be compiled,
but which gave me errors as soon as I wanted to build an AUnit
application. I did not want a more difficult solution, I just wanted AUnit
working.

I tried, as you suggested, to install a Debian Sid within a chroot
environement, which was not better: there is either libaunit3, which does
not come with required AUnit files such as aunit.gpr, or either
libaunit1-dev, which provides a aunit.gpr among others required files, but
which unfortunately depends on GNAT 4.4... and bahm, conflict.

As this thread seems to drive you a bit nervous (a guess from your
wordings), I will not tell more here, about future evolution of the story,
to help keep the climate here, peaceful.

Except just a last side note: I've submitted today a bug report to Debian,
about some wrong things with a GCC source package from Debian Testing. I
straight away get a reply asserting I did not applied the required patches
(but I did), and the report was invalidated (did they really tested ?).
Interestingly, a similar report was submitted to FSF too, by someone else,
few months ago, the exact same. Was rejected too and not taken into
account for some other excuses (that's probably why the bug is still there
months after), pretending the bug does not exist (while multiple people on
the web have testified of the same bug). If really the Open Source world
want people to submit bug reports, one good idea may be to acknowledge bug
reports, may be as long time pending bug if there is no other way. Always
the same stories, either excuses to not take the bug into account, either
excuse like "it's not a bug, it's a feature", and so on. Finished with bug
reports for me. As that seems to serve nothing in any places, I will not
bother any more now. Just saying this here as I know you are a Debian
maintainer, if ever that can help you and your colleagues understand why
many people don't bother submitting bug reports.

Ludovic Brenta

unread,
Oct 1, 2011, 12:12:50 PM10/1/11
to
"Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:
> Le Sat, 01 Oct 2011 11:11:35 +0200, Ludovic Brenta
> <lud...@ludovic-brenta.org> a écrit:
>> Again, why do you keep trying to find other, more difficult solutions to
>> your problem?
> I may have to give a summary of the history so far: as pointed in this
> thread, every thing was fine, except for AUnit, which could be
> compiled, but which gave me errors as soon as I wanted to build an
> AUnit application. I did not want a more difficult solution, I just
> wanted AUnit working.

Ah, you said "just". This is the sure sign of a problem. No, you don't
"just" want AUnit, you want GCC 4.6 plus ASIS 2010 plus SPARK plus AUnit
working together. Good news: Debian unstable provides the first three
today. Bad news: AUnit has not yet migrated to gnat-4.6 in the same
Debian unstable. Conclusion: the easiest solution to your problem is to
install Debian unstable and recompile AUnit (an only AUnit) with
gnat-4.6. You do not need to recompile GCC, ASIS or SPARK.

> I tried, as you suggested, to install a Debian Sid within a chroot
> environement, which was not better: there is either libaunit3, which
> does not come with required AUnit files such as aunit.gpr, or either
> libaunit1-dev, which provides a aunit.gpr among others required files,
> but which unfortunately depends on GNAT 4.4... and bahm, conflict.
>
> As this thread seems to drive you a bit nervous (a guess from your
> wordings), I will not tell more here, about future evolution of the
> story, to help keep the climate here, peaceful.

My words may be a bit strong. This is because you do not seem to be
accepting the solutions I propose for your problem. Instead, you invent
new problems like "how do I recompile GCC 4.6".

> Except just a last side note: I've submitted today a bug report to
> Debian, about some wrong things with a GCC source package from Debian
> Testing. I straight away get a reply asserting I did not applied the
> required patches (but I did), and the report was invalidated (did they
> really tested ?). Interestingly, a similar report was submitted to
> FSF too, by someone else, few months ago, the exact same. Was rejected
> too and not taken into account for some other excuses (that's probably
> why the bug is still there months after), pretending the bug does not
> exist (while multiple people on the web have testified of the same
> bug). If really the Open Source world want people to submit bug
> reports, one good idea may be to acknowledge bug reports, may be as
> long time pending bug if there is no other way. Always the same
> stories, either excuses to not take the bug into account, either
> excuse like "it's not a bug, it's a feature", and so on. Finished with
> bug reports for me. As that seems to serve nothing in any places, I
> will not bother any more now. Just saying this here as I know you are
> a Debian maintainer, if ever that can help you and your colleagues
> understand why many people don't bother submitting bug reports.

The goal of Debian is not to get more bug reports. It is not my
personal goal either to get more bug reports.

Also, if you think you have found a bug, the burden of proof is on you,
the bug submitter. You must prove the existence of the bug by showing
evidence that you did everything correctly and followed all the
instructions. Just saying "I followed the instructions" is not enough;
you must prove you did so by showing the exact commands you ran and the
exact output you got. Furthermore, you have to state your expectations
explicitly and prove they were reasonable, because sometimes the bug is
in your expectations and not in the software. Only then can you file a
valid bug report. A lot of people are "driven" away from free software
simply because they do not accept this burden of proof. I am not
worried about the "loss" of bug reports from such people.

There is a funny tutorial about how properly to report bugs here:

http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

--
Ludovic Brenta.

Ludovic Brenta

unread,
Oct 1, 2011, 12:34:22 PM10/1/11
to
Ludovic Brenta <lud...@ludovic-brenta.org> writes:
> "Yannick Duchêne (Hibou57)" <yannick...@yahoo.fr> writes:
>> Le Sat, 01 Oct 2011 11:11:35 +0200, Ludovic Brenta
>> <lud...@ludovic-brenta.org> a écrit:
>>> Again, why do you keep trying to find other, more difficult solutions to
>>> your problem?
>> I may have to give a summary of the history so far: as pointed in
>> this thread, every thing was fine, except for AUnit, which could be
>> compiled, but which gave me errors as soon as I wanted to build an
>> AUnit application. I did not want a more difficult solution, I just
>> wanted AUnit working.
>
> Ah, you said "just". This is the sure sign of a problem. No, you
> don't "just" want AUnit, you want GCC 4.6 plus ASIS 2010 plus SPARK
> plus AUnit working together. Good news: Debian unstable provides the
> first three today. Bad news: AUnit has not yet migrated to gnat-4.6
> in the same Debian unstable. Conclusion: the easiest solution to your
> problem is to install Debian unstable and recompile AUnit (an only
> AUnit) with gnat-4.6. You do not need to recompile GCC, ASIS or
> SPARK.

Actually, I'm wrong; this is not the easiest solution, only the second
easiest. The easiest solution is to wait a few days for a new
libaunit*-dev in Debian unstable.

--
Ludovic Brenta.

Georg Bauhaus

unread,
Oct 2, 2011, 6:29:52 AM10/2/11
to
On 01.10.11 16:17, Yannick Duchêne (Hibou57) wrote:

> I tried, as you suggested, to install a Debian Sid within a chroot environement, which was not better: there is either libaunit3, which does not come with required AUnit files such as aunit.gpr, or either libaunit1-dev, which provides a aunit.gpr among others required files, but which unfortunately depends on GNAT 4.4... and bahm, conflict.

Somewhere on this long line you mentioned libaunit1-dev
depending on GNAT 4.4; the package says it depends on
ada-compiler. Actually, AUnit v.1 indeed only needs an
Ada compiler, no fancy configuration, Ada 95 should do.

Debian Sid says, ada-compiler is provided by either gnat-4.4,
or by gnat-4.6. Is any of these installed? It might be
useful to install them if only to keep the Debian
package system consistent, even when a different GCC
should be used for compiling. That seems wasteful, but
is an easy way to deal with the necessarily complex
bureaucracy.

If ada-compiler in Debian will typically mean GNAT,
and there is a matching installation of GCC 4.x of yours,
but then there are complaints about missing gnat-4.4 or gnat-4.6,
you may be working with Debian packages but outside Debian's
package dependency system.

With AUnit in particular, there are easy ways to handle
the situation.

IIRC, the original v.1 of AUnit was modelled such when
v.2 was out, many asked for the original model, hence v.3.
So, for worldly needs, v.1 might be the thing you want anyway.

v.1 of AUnit is portable, pure Ada. For use with GNAT,
it has been sufficient in the past to put a GNAT project
file in some convenient place, or use one's own directories,
or not use a project file at all! Just make the files
accessible to the compiler. (AUnit v.1 came when there
was no project configuration description language yet.)

Producing a package system compatible translation framework
is more work.

Ludovic Brenta

unread,
Oct 2, 2011, 12:38:51 PM10/2/11
to
Georg Bauhaus writes:
> On 01.10.11 16:17, Yannick Duchêne (Hibou57) wrote:
>> I tried, as you suggested, to install a Debian Sid within a chroot
>> environement, which was not better: there is either libaunit3, which
>> does not come with required AUnit files such as aunit.gpr, or either
>> libaunit1-dev, which provides a aunit.gpr among others required
>> files, but which unfortunately depends on GNAT 4.4... and bahm,
>> conflict.
>
> Somewhere on this long line you mentioned libaunit1-dev depending on
> GNAT 4.4; the package says it depends on ada-compiler. Actually,
> AUnit v.1 indeed only needs an Ada compiler, no fancy configuration,
> Ada 95 should do.

No. Debian is a binary distribution and respects the Ada Reference
Manual regarding consistency of binary executables, in particular clause
10.1.4(5). Debian does this by stating and enforcing dependencies
between binary packages. In this case:

- libaunit3 (the binary shared library package) depends on libgnat-4.4
- libaunit1-dev (the development package) depends on all of
ada-compiler, gnat and gnat-4.4. This is because the -dev package
contains .ali files that encode dependencies to the .ali files in the
gnat-4.4 run-time library.

Furthermore:

- gnat-4.4 and gnat-4.6 conflict with each other because they both
provide /usr/bin/gnatmake et al.

Therefore, it is impossible to install both libaunit1-dev and
libasis2010-dev, because libaunit1-dev depends on gnat-4.4 while
libasis2010-dev depends on gnat-4.6. This impossibility is intentional
and by design; it only reflects the fact that the .ali files in the -dev
packages are incompatible with each other.

It is these package dependencies, rendered necessary by the binary
nature of Debian, that cause problems for Yannick.

BTW, I uploaded libaunit2-dev, which depends on gnat-4.6, yesterday
evening. It should reach Debian unstable in a few days at most.
Yannick, patience is your ally :)

> v.1 of AUnit is portable, pure Ada. For use with GNAT, it has been
> sufficient in the past to put a GNAT project file in some convenient
> place, or use one's own directories, or not use a project file at all!
> Just make the files accessible to the compiler. (AUnit v.1 came when
> there was no project configuration description language yet.)

Yes, it is quite easy to copy the sources of aunit in a directory
outside of Debian's package-controlled files (i.e. anywhere under
$HOME), add a simple project file, and compile AUnit into any program.

--
Ludovic Brenta.

Georg Bauhaus

unread,
Oct 2, 2011, 1:44:24 PM10/2/11
to
On 02.10.11 18:38, Ludovic Brenta wrote:

>> Somewhere on this long line you mentioned libaunit1-dev depending on
>> GNAT 4.4; the package says it depends on ada-compiler. Actually,
>> AUnit v.1 indeed only needs an Ada compiler, no fancy configuration,
>> Ada 95 should do.
>
> No. Debian is a binary distribution and respects the Ada Reference
> Manual regarding consistency of binary executables, in particular clause
> 10.1.4(5).

The consistency is cool as ever, but I don't think LRM 10.1.4(5)
justifies anything ;-) After all, if we put GCC x.y.z in /where/ever,
there is no problem regarding the LRM. I will assume that it means
much more work to have a switch for system compilers, and there
might be little incentive to have two versions.

> Debian does this by stating and enforcing dependencies
> between binary packages.

> - gnat-4.4 and gnat-4.6 conflict with each other because they both
> provide /usr/bin/gnatmake et al.

Ah, well, I have become used to switching between different
versions of compilers and interpreters.

Ludovic Brenta

unread,
Oct 2, 2011, 2:28:40 PM10/2/11
to
Georg Bauhaus <rm.dash...@futureapps.de> writes:
> On 02.10.11 18:38, Ludovic Brenta wrote:
>
>>> Somewhere on this long line you mentioned libaunit1-dev depending on
>>> GNAT 4.4; the package says it depends on ada-compiler. Actually,
>>> AUnit v.1 indeed only needs an Ada compiler, no fancy configuration,
>>> Ada 95 should do.
>>
>> No. Debian is a binary distribution and respects the Ada Reference
>> Manual regarding consistency of binary executables, in particular clause
>> 10.1.4(5).
>
> The consistency is cool as ever, but I don't think LRM 10.1.4(5)
> justifies anything ;-) After all, if we put GCC x.y.z in /where/ever,
> there is no problem regarding the LRM. I will assume that it means
> much more work to have a switch for system compilers, and there might
> be little incentive to have two versions.

LRM 10.1.4(5) does not affect the sources, it affects the binaries
produced from (different versions of) the sources. Debian is a binary
distribution, therefore it must obey 10.1.4(5) and this justifies the
Debian Policy for Ada regarding dependencies between binary packages.
Note that the .ali files in -dev packages are considered "binary" for
the purposes of this discussion, because they are the way GNAT uses to
obey LRM 10.1.4(5).

>> Debian does this by stating and enforcing dependencies between
>> binary packages.
>
>> - gnat-4.4 and gnat-4.6 conflict with each other because they both
>> provide /usr/bin/gnatmake et al.
>
> Ah, well, I have become used to switching between different versions
> of compilers and interpreters.

Yes. It should be possible for Debian to provide several versions of
GNAT in parallel but I decided, long ago, that this would go against one
of my design goals, which is to make it possible to compile an Ada
program against all of the installed Ada libraries. The consistency
rule implies that a program cannot be linked, directly or indirectly,
against two different versions of the GNAT run-time library.

You are entirely correct in the context of a source distribution such as
Gentoo or GNAT GPL Edition, however. In a source distribution, you can
have as many compilers as you want; the price to pay for this is that
you must recompile everything each time you switch compilers, taking
into account that some versions of some libraries might be incompatible
with some versions of the compiler (see ASIS for one example).

--
Ludovic Brenta.

Yannick Duchêne (Hibou57)

unread,
Oct 2, 2011, 2:41:32 PM10/2/11
to
Le Sat, 01 Oct 2011 18:12:50 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:

> Bad news: AUnit has not yet migrated to gnat-4.6 in the same
> Debian unstable.

I could finally get all yesterday. Using FSF GCC 4.6.1 (not the Debian
one), using XMLAda 3.2 and ASIS 2010 from Debian and GPRBuild 2011 and
AUnit 2011 from AdaCore Libre. I also had to use a libaddr2line (see
below) which I found on the web. This was a bit tricky in some parts, but
it all works and won't do it again before long. I had to partially patch
GPRBuild, using a subset of the patch used by Debian.

I did not used GPRBuild from Debian, because it invariably stopped at
startup with a runtime error (something erroneous with a pointer).

As this was a bit tricky in some parts, I won't bother people here with
the details. If some one interested, drop me a mail. I may also provide an
archive of compiled source for i386, but its hug for my hosting, 90M. So I
wont unless it is really of interest to someone.

Note to people: be aware of differences between AUnit from AdaCore and
AUnit from Debian, both are really not the same. This may be worth to have
a look at the one from AdaCore too, to get an idea of the differences.

For people with trouble with a missing libaddr2line:
http://libaddr2line.git.sourceforge.net/git/gitweb.cgi?p=libaddr2line/libaddr2line;a=tree;
Compile and copy in /usr/lib
After compiling, you will find a test program, named raiseit, in the test
directory to be sure it works for you.
Explicitly written to be used with GNAT. Limitation: 64 bits not supported
so far, as said in the TODO file.

Yannick Duchêne (Hibou57)

unread,
Oct 2, 2011, 2:58:38 PM10/2/11
to
Le Sat, 01 Oct 2011 18:12:50 +0200, Ludovic Brenta
<lud...@ludovic-brenta.org> a écrit:

> you want GCC 4.6 plus ASIS 2010 plus SPARK plus AUnit
> working together.
SPARK is a rather independent piece, except from the last GPRBuild point
of view, which seems to have support for SPARK (which?), but this support
for SPARK is dropped from a GPRBuild to be used with FSF GCC any way.

Ludovic Brenta

unread,
Oct 3, 2011, 3:07:11 AM10/3/11
to
Yannick Duchêne wrote on comp.lang.ada:
> I could finally get all yesterday.

Glad to hear that.

> Note to people: be aware of differences between AUnit from AdaCore and  
> AUnit from Debian, both are really not the same. This may be worth to have  
> a look at the one from AdaCore too, to get an idea of the differences.

Georg hinted at this in this thread before. The AUnit in Debian is
still version 1.03 whereas AdaCore published versions 2 and then 3,
which break source compatibility with 1.03. The people responsible
for AUnit in Debian prefer the simplicity of 1.03, so kept that.

> For people with trouble with a missing libaddr2line:http://libaddr2line.git.sourceforge.net/git/gitweb.cgi?p=libaddr2line...
> Compile and copy in /usr/lib

This is a mistake. If you really insist on making your library
available system-wide (as opposed to only your user account), you
should copy to /usr/local/lib, which is designed for this purpose.
Every single file under /usr/lib should belong to a package; if not,
you are interfering with the package manager and asking for future
trouble.

Apart from that, congratulations on your success.

--
Ludovic Brenta.

Lucretia

unread,
Oct 14, 2011, 10:21:14 PM10/14/11
to
On Sep 28, 10:56 am, Yannick Duchêne (Hibou57)
<yannick_duch...@yahoo.fr> wrote:
> Eh, I would better say, “Current status of ASIS for GNAT-4.6”
>
> I just compiled GCC-4.6 and GNAT-4.6 for Ubuntu Maverick. That could be  
> nice, except now I feel bothered with ASIS. The only one I could get is  
> for GNAT-4.0, which obviously, did not came with Ada 2012 support, so not  
> even worth to attempt to compile it to be used with GNAT-4.6
>
> By the way, I was also wondering, simply, was is the overall status of  
> ASIS in regards to Ada 2012 ?
>
> And for the practical matter, which is very worth too, what ASIS library  
> should I use with GNAT-4.6 ?
>
> Enjoy a nice day all Ada essayists :)


What about the ASIS from Tendra?

although tendra.org and ten15.org are now down.

Luke.

Simon Wright

unread,
Oct 15, 2011, 9:50:54 AM10/15/11
to

Ludovic Brenta

unread,
Oct 15, 2011, 10:05:45 AM10/15/11
to
Simon Wright <si...@pushface.org> writes:
> http://forward-in-code.blogspot.com/2011/10/building-asis.html.

Nice writeup :) but I wanted to clarify this:

Debian provides both static and shared versions of all libraries, per
general Debian Policy (not specific to Ada). The shared libraries are
in their own packages. The static libraries are in the corresponding
development packages along with the source files necessary to build and
link programs against both the static and shared libraries.

Thus, the Debian package libgnatvsn4.x-dev contains all the *.ads,
*.adb, *.ali files, a *.gpr project file, *and* the static library
libgnatvsn.a. This library also contains version.o resulting from
building GCC with all the necessary C preprocessor macros, and thus
version.o is guaranteed consistent with GCC.

--
Ludovic Brenta.

Simon Wright

unread,
Oct 15, 2011, 10:36:20 AM10/15/11
to
Good point. I was clearly trying to say the wrong thing; now it just
reads "There's an alternative to creating a libgnatvsn.a or .dylib which
merely depends on your having a compiler build tree around!"
0 new messages