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

Problem getting Adactl to run.

85 views
Skip to first unread message

Peter C. Chapin

unread,
Nov 8, 2012, 10:39:01 AM11/8/12
to
I'm trying to run Adactl on my system but it's not working for me. I'm
getting a message such as this:

======
Unexpected exception at main level: Inconsistent versions of GNAT and ASIS
----------------
Stack traceback:
0x082EB4FE at ???
0x082BFB02 at ???
0x082C0E23 at ???
0x0834D538 at ???
0x0833F9ED at ???
0x080B5D12 adactl at adactl.adb:90
0x0804B5BD main at b~adactl.adb:1111

0x082EB4FE 0x082BFB02 0x082C0E23 0x0834D538 0x0833F9ED 0x080B5D12 0x0804B5BD

ADACTL v. 1.14r9 with ASIS 2.0.R for GNAT GPL 2012 (20120509)
======

However I'm using GNAT GPL 2012 (20120509) as evidenced here

======
GNATMAKE GPL 2012 (20120509)
Copyright (C) 1995-2012, Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
======

So I'm wondering what I'm missing. I am running on a 64 bit Linux system
(Ubuntu 12.04) and I think I'm using the 64 bit version of GNAT. Could
that have something to do with it?

Peter

Peter C. Chapin

unread,
Nov 8, 2012, 3:28:53 PM11/8/12
to
On 11/08/2012 10:39 AM, Peter C. Chapin wrote:

> I'm trying to run Adactl on my system but it's not working for me.

The problem was related to my 64 bit system. I built adactl from source
and my earlier problems go away. However, I have new problems. When I
try to launch adactl from GPS I get various errors. Most recently there
are Python errors appearing in the GPS messages view like this:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 453,
in run
parse (result)
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 87,
in parse
list.sort(sloc_cmp)
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 84,
in sloc_cmp
return cmp (int(ls[2+Offset]), int(rs[2+Offset]))
ValueError: invalid literal for int() with base 10: 'Error'

I'm not sure what this means.

Peter

J-P. Rosen

unread,
Nov 8, 2012, 4:22:22 PM11/8/12
to
Le 08/11/2012 16:39, Peter C. Chapin a écrit :
> I'm trying to run Adactl on my system but it's not working for me. I'm
> getting a message such as this:
>
> ======
> Unexpected exception at main level: Inconsistent versions of GNAT and ASIS

First, make sure you don't have .adt files around. If you have .adt
files from an older gnat, ASIS will use them, and then complain that
they are not consistent

--
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr

J-P. Rosen

unread,
Nov 8, 2012, 4:29:29 PM11/8/12
to
This happens in the routine that parses line numbers for displaying
error messages. It seems that sometimes, GPS does not retrieve the
output of the tool correctly, sometimes introducing random end of lines.
That may well bomb the the parser...

Peter C. Chapin

unread,
Nov 9, 2012, 9:08:20 AM11/9/12
to
On 11/08/2012 04:29 PM, J-P. Rosen wrote:

>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 453,
>> in run
>> parse (result)
>> File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 87,
>> in parse
>> list.sort(sloc_cmp)
>> File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 84,
>> in sloc_cmp
>> return cmp (int(ls[2+Offset]), int(rs[2+Offset]))
>> ValueError: invalid literal for int() with base 10: 'Error'
>>
> This happens in the routine that parses line numbers for displaying
> error messages. It seems that sometimes, GPS does not retrieve the
> output of the tool correctly, sometimes introducing random end of lines.
> That may well bomb the the parser...
>

Is there no solution? This is all it ever does for me. It appears to
work fine from the command line but that's not nearly as nice as having
the GPS integration.

Peter

Yannick Duchêne (Hibou57)

unread,
Nov 9, 2012, 12:08:10 PM11/9/12
to
Le Fri, 09 Nov 2012 15:08:20 +0100, Peter C. Chapin <pcc4...@gmail.com>
a écrit:
Seems not, or not an easy one. I get the same issue when I was using GPS,
tried to fix it for AdaControl too, but seems random, as Jean‑Pierre said.
Surprising, as the Python's `popen` command works fine otherwise; so
either GPS does not use it and provide its own buggy similar
functionality, or else, that's the Python library? Don't know.

Can't promise, but may have a look at it a future day (will tell here if
ever).


--
“Syntactic sugar causes cancer of the semi-colons.” [1]
“Structured Programming supports the law of the excluded muddle.” [1]
[1]: Epigrams on Programming — Alan J. — P. Yale University

J-P. Rosen

unread,
Nov 9, 2012, 12:20:04 PM11/9/12
to
Le 09/11/2012 15:08, Peter C. Chapin a �crit :
>> This happens in the routine that parses line numbers for displaying
>> error messages. It seems that sometimes, GPS does not retrieve the
>> output of the tool correctly, sometimes introducing random end of lines.
>> That may well bomb the the parser...
>>
>
> Is there no solution? This is all it ever does for me. It appears to
> work fine from the command line but that's not nearly as nice as having
> the GPS integration.
That's really a problem in GPS, so there is not much I can do on my side.

To see if it is really the problem, look into the "messages" window (not
"location"). If you see lines that are cut at odd places, that's it.

But it doesn't happen that often, and since it seems to be connected to
timing, it often disappears if you run it one more time.

Now, if what I describe does not look like your problem, there might be
something else...

Peter C. Chapin

unread,
Nov 9, 2012, 1:54:22 PM11/9/12
to
On 11/09/2012 12:20 PM, J-P. Rosen wrote:

> To see if it is really the problem, look into the "messages" window (not
> "location"). If you see lines that are cut at odd places, that's it.
>
> But it doesn't happen that often, and since it seems to be connected to
> timing, it often disappears if you run it one more time.
>
> Now, if what I describe does not look like your problem, there might be
> something else...
>

What I see in the Messages window is the Python traceback that I showed
my earlier posts. I don't see anything that looks like Adactl output.

It probably is the same thing, though. I just tried it numerous times on
several files and it did work once. Based on my complete unscientific
analysis I'd say it's working about 5% of the time for me. So it's not
very usable, unfortunately.

I guess I'll have to stick to the command line.

Peter

J-P. Rosen

unread,
Nov 9, 2012, 4:57:57 PM11/9/12
to
Le 09/11/2012 19:54, Peter C. Chapin a �crit :
> On 11/09/2012 12:20 PM, J-P. Rosen wrote:
>
> What I see in the Messages window is the Python traceback that I showed
> my earlier posts. I don't see anything that looks like Adactl output.
They should be before the Python traceback

> It probably is the same thing, though. I just tried it numerous times on
> several files and it did work once. Based on my complete unscientific
> analysis I'd say it's working about 5% of the time for me. So it's not
> very usable, unfortunately.
Strange... I would say it fails 5% of the time for me... Hard to debug
by telepathy, though.

> I guess I'll have to stick to the command line.
>
You can run AdaControl on a command line (in Gnat format), save the
output to a file, and then load the file in GPS. You will still enjoy
the interactive display of errors.

Stephen Leake

unread,
Nov 10, 2012, 7:33:42 AM11/10/12
to
"Peter C. Chapin" <pcc4...@gmail.com> writes:

(discussing problem with GPS running AdaControl)
>
> I guess I'll have to stick to the command line.

Or switch to Emacs.

I have not tried Adactl in quite a while; if it needs more work to
integrate in Emacs Ada mode, now is the time to bring it up, since I'm
rewriting Emacs Ada mode.

So far, the indentation engine is in very good shape; it handles all of
my Ada code that I've tested so far (about half).
--
-- Stephe

Peter C. Chapin

unread,
Nov 10, 2012, 8:16:51 AM11/10/12
to
On 11/10/2012 07:33 AM, Stephen Leake wrote:

> I have not tried Adactl in quite a while; if it needs more work to
> integrate in Emacs Ada mode, now is the time to bring it up, since I'm
> rewriting Emacs Ada mode.
>
> So far, the indentation engine is in very good shape; it handles all of
> my Ada code that I've tested so far (about half).
>

I could see myself trying it out. Where can I get your latest Ada mode
for Emacs?

Peter

Peter C. Chapin

unread,
Nov 10, 2012, 8:20:18 AM11/10/12
to
On 11/09/2012 04:57 PM, J-P. Rosen wrote:

>> What I see in the Messages window is the Python traceback that I showed
>> my earlier posts. I don't see anything that looks like Adactl output.
> They should be before the Python traceback

There is nothing before the traceback. To be precise this is what I see
in the Messages window after starting GPS and then trying to run Adactl
on one of my open files:

======
Welcome to GPS 5.1.1 (20111220) hosted on x86_64-pc-linux-gnu
the GNAT Programming Studio

This is the GPS GPL Edition.

For professional needs, use the GPS version supplied with GNAT Pro.
For details contact us at sa...@adacore.com
(c) 2001-2011 AdaCore

Auto-VCS: using Subversion
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 453,
in run
parse (result)
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 87,
in parse
list.sort(sloc_cmp)
File "/home/peter/local/gnat/share/gps/plug-ins/adactl.py", line 84,
in sloc_cmp
return cmp (int(ls[2+Offset]), int(rs[2+Offset]))
ValueError: invalid literal for int() with base 10: 'Error'
======

Not sure if that information is useful at all.

> You can run AdaControl on a command line (in Gnat format), save the
> output to a file, and then load the file in GPS. You will still enjoy
> the interactive display of errors.

Thanks for the tip. I'll check it out!

Peter

Stephen Leake

unread,
Nov 11, 2012, 5:46:19 PM11/11/12
to
"Peter C. Chapin" <pcc4...@gmail.com> writes:

http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html

The ada-france mtn version is more up-to-date; time to post another
snapshot.

However, be aware that Ada mode 5.0 is _not_ a fully functional mode; at
the moment, it _only_ supports indentation, not everything else Ada mode
4.0 does.

I'm now ready to start adding all the other stuff back in, in a more
structured way, taking advantage of the new indentation engine where I
can.

--
-- Stephe
0 new messages