de-gnatchop

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

de-gnatchop

Op de Coul, Manuel
Maybe someone here knows a quick routine to report a GNAT bug. Some while ago I
installed GNAT GPL 2011 on Windows but compilation ended with a bug so I went back
to the GPL 2010 version. Now people are upgrading Ubuntu to version 12.04 and
so I did too. But it comes with GCC 4.6 and the previous one had 4.4. Now GNAT crashes
again compiling my code and each time it shows an endless list of source files
to be included in a bug report. Apparently they don't accept a zip file with the code
which is easy for me to produce. Also I don't understand why after all these years
that GNAT exists it doesn't generate the required source file concatenation itself
while it is at printing the source list.
I should report a bug because otherwise perhaps I can't still compile with the next
version but how do you put a few hundred files together given a vertical list?

Thanks,
Manuel

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Ludovic Brenta-2
Manuel Op de Coul wrote:
> I should report a bug because otherwise perhaps I can't still
> compile with the next version but how do you put a few hundred files
> together given a vertical list?

You don't.  You reduce the hundreds of files to one or two files with
only the few lines of sources that trigger the bug.  And, because this
is a compiler bug, you don't involve GtkAda in the reproducer.

I realize that that's probably not the answer you wanted to hear, but
unless you have a support contract with AdaCore (which means you don't
use gcc-4.6 on Ubuntu or Windows), the probability that someone will
reduce such a big test case for you, before starting to investigate
the compiler bug, is, honestly, zero.

Sorry to be so blunt, I wanted to avoid disappointment later on :)

--
Ludovic Brenta.

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Op de Coul, Manuel
I can try that, but what if the bug is related to the source size and
cannot be reduced much? And maybe easily found looking at the bug printout?
Do people put the files together one by one by hand in an editor?

Thanks
Manuel

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ludovic Brenta
Sent: woensdag 6 juni 2012 12:12
To: [hidden email]
Subject: Re: [gtkada] de-gnatchop

Manuel Op de Coul wrote:
> I should report a bug because otherwise perhaps I can't still compile
> with the next version but how do you put a few hundred files together
> given a vertical list?

You don't.  You reduce the hundreds of files to one or two files with only the few lines of sources that trigger the bug.  And, because this is a compiler bug, you don't involve GtkAda in the reproducer.

I realize that that's probably not the answer you wanted to hear, but unless you have a support contract with AdaCore (which means you don't use gcc-4.6 on Ubuntu or Windows), the probability that someone will reduce such a big test case for you, before starting to investigate the compiler bug, is, honestly, zero.

Sorry to be so blunt, I wanted to avoid disappointment later on :)

--
Ludovic Brenta.

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Ludovic Brenta-2
Manuel Op de Coul wrote:
> I can try that, but what if the bug is related to the source size and
> cannot be reduced much?

That would be very surprising. The only limitation to the program size
I can think of is memory, in which case you'd get a segmentation fault
in the compiler at various points in your compilation run, depending on
your machine's current memory.  From what you said, you seem to always
get a bug box at the same point in your program.

> And maybe easily found looking at the bug printout?

If that's the case, you don't need a reproducer :) (maybe my definition
of "easily" is not the same as yours)

> Do people put the files together one by one by hand in an editor?

Personally, I first look at the line that triggers the bug (as reported
in the compiler's bug box) and I try to construct a test case in a
separate file.  I don't copy-paste anything because, usually, the
coding conventions and identifier names just get in the way; my
reproducer uses identifiers that are neutral or help understand the
language constructs, not the intent of the program.  It usually takes
effort to construct the reproducer, which is why you can't expect
unpaid volunteers to do that for you :)

--
Ludovic Brenta.

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Björn Persson-3
In reply to this post by Op de Coul, Manuel
Op de Coul, Manuel wrote:
> I should report a bug because otherwise perhaps I can't still compile with
> the next version but how do you put a few hundred files together given a
> vertical list?

To actually answer your question: The inverse of gnatchop is cat. To read the
list into the command line you can use another cat:

cat `cat` >concatenated_files

Paste the list into the terminal, and end it with a line break and Ctrl-D.

Ludovic is right though: You really should try to produce a minimal
reproducer, and the GTKada mailing list is hardly the right place for this
discussion.

Björn Persson

_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada

signature.asc (197 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Gautier de Montmollin
In reply to this post by Op de Coul, Manuel

Is it really a compiler crash (the famous box) ?
Or is it a circular elaboration issue - typically the output I would expect with many units displayed...
______________________________________________________________________________

Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada


     
_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop

Op de Coul, Manuel
Thanks all for the answers. Yes the box, I don't have it at hand at the moment.
Probably a problem in the back-end, at least that's always the kind that I run into.

Manuel

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Gautier de Montmollin
Sent: woensdag 6 juni 2012 17:23
To: [hidden email]
Subject: Re: [gtkada] de-gnatchop


Is it really a compiler crash (the famous box) ?
Or is it a circular elaboration issue - typically the output I would expect with many units displayed...
______________________________________________________________________________

Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada


     
_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop and GtkAda 2.24

Op de Coul, Manuel
In reply to this post by Ludovic Brenta-2
Ludovic Brenta wrote:
> Personally, I first look at the line that triggers the bug (as reported in the compiler's bug box) and I try to construct a test case in a separate file.  
> I don't copy-paste anything because, usually, the coding conventions and identifier names just get in the way; my reproducer uses identifiers that are neutral or help
> understand the language constructs, not the intent of the program.  It usually takes effort to construct the reproducer, which is why you can't expect unpaid volunteers to
> do that for you :)

The source line that triggers the bug is the end statement of a long generic procedure.

+===========================GNAT BUG DETECTED==============================+
| 4.6.3 (i686-pc-linux-gnu) in compensate_edge, at reg-stack.c:2781        |
| Error detected around scale_functions-show_data.adb:1415:8               |

And the source list contains 348 files. I wouldn't know where to begin with a reproducer.
The bug as it turns out is not gnat bug but a gcc bug that's already 7 years old and keeps
coming back:
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01823.html

Anyway I can continue compilation if I compile one package without optimisation (-O0).
So that's the tip if anyone else encounters this.

After upgrading Ubuntu I of course also needed to recompile GtkAda. Because synaptic found
two new libgtkada packages with version 2.24 I installed those. It has some incompatibilities
with 2.18 which I want to work on but I can't find it at http://libre.adacore.com/download/.
The highest versions are still 2.18. I would to download the Windows and the complete source
packages. Are they going to be available soon?

Thanks,

Manuel


_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop and GtkAda 2.24

Ludovic Brenta-2
"Op de Coul, Manuel" <[hidden email]> writes:

> The source line that triggers the bug is the end statement of a long
> generic procedure.
>
> +===========================GNAT BUG DETECTED==============================+
> | 4.6.3 (i686-pc-linux-gnu) in compensate_edge, at reg-stack.c:2781        |
> | Error detected around scale_functions-show_data.adb:1415:8               |
>
> And the source list contains 348 files. I wouldn't know where to begin
> with a reproducer.  The bug as it turns out is not gnat bug but a gcc
> bug that's already 7 years old and keeps coming back:
> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01823.html

OK, nice that it is fixed at last in GCC 4.8; when I start packaging
gnat-4.7 for Debian I'll try to remember that I should backport the fix.

> Anyway I can continue compilation if I compile one package without
> optimisation (-O0).  So that's the tip if anyone else encounters this.

I'm not surprised.  It is possible to work around most GCC backend bugs
with -O0 and around most front-end bugs by omitting -gnatVa; these are
the first things I try, besides trying to isolate the bug in a small
reproducer.

> After upgrading Ubuntu I of course also needed to recompile
> GtkAda. Because synaptic found two new libgtkada packages with version
> 2.24 I installed those. It has some incompatibilities with 2.18 which
> I want to work on but I can't find it at
> http://libre.adacore.com/download/.  The highest versions are still
> 2.18. I would to download the Windows and the complete source
> packages. Are they going to be available soon?

I'm not sure what your question really is.  The version of GtkAda that
Debian includes comes straight from AdaCore's Subversion public source
repository, see the changelog of the package for the exact revision
used.  AdaCore has not yet released 2.24.1 in a GPL Edition for Windows
and I think they will probably release 2.24.2 instead, or possibly even
a version 3 which they're currently working on.  If you want the same
revision in Debian and on Windows, you should use either the sources
from Subversion or a GPL Edition.

--
Ludovic Brenta.
_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada
Reply | Threaded
Open this post in threaded view
|

Re: de-gnatchop and GtkAda 2.24

Op de Coul, Manuel
Ludovic Brenta wrote:
>AdaCore has not yet released 2.24.1 in a GPL Edition for Windows and I think they will probably release 2.24.2 instead, or possibly even a version 3 which they're currently working on.
> If you want the same revision in Debian and on Windows, you should use either the sources from Subversion or a GPL Edition.

Ok thanks, I will stick with GPL 2.18 then. Would be more handy if releases for both platforms happened at the same time but I realise that it involves work.

Manuel


_______________________________________________
gtkada mailing list
[hidden email]
http://lists.adacore.com/mailman/listinfo/gtkada