Bug#616362: gcc-snapshot: link failure with gnat (/usr/bin/ld: cannot find -laddr2line)
Євгеній Мещеряков <email@example.com> writes:
> I reported that bug because I tried to compile spark-gpl.
I'm interested in that; I'm sure others are, too. Could you please
announce your effort on firstname.lastname@example.org? It must be
possible to join efforts. IIUC, the main stumbling block is, or was,
that some SPARK tools are written in Prolog and require a non-free
Prolog compiler. Do you know anything about that?
> Compilation failed with stack overflow or invalid memory access. It
> was compiled fine with gcc-snapshot, but linking failed. So I guess
> the bug with stack overflow was fixed somewhere between gcc-4.4 and
> 4.6. Or maybe it was introduced by patches...
This bug has quite a complex history. Upstream (AdaCore) supports
symbolic tracebacks through a library called libaddr2line.a, which they
produce from their own patched binutils sources. This has been so for
as long as I can remember. I patched gnat 3.15p back in 2005 to support
symbolic tracebacks without requiring this special library (doing a
fork()/exec() of addr2line instead). This patch was broken by an
upstream change in gnat-4.3 and re-fixed in gnat-4.4 (=4.4.4-4).
> 3 березня 2011 о 21:07 +0100 Ludovic Brenta написав(-ла):
>> This is because the patch ada-symbolic-tracebacks.diff has not been
>> ported to gcc-snapshot.
> I see that this patch is present in gcc-snapshot source, and it is
> even applied (at least at the beginning of the build, I do not have
> enough free time now to build it all). But installed g-trasym.adb
> really contains pragma Linker_Options ("-laddr2line");. Is it intended
> behaviour or there is something wrong here?
Yes, this is wrong. Debian has no such library as libaddr2line, so the
Linker_Options should not be there. The patch
ada-symbolic-tracebacks.diff normally removes it but, as I said, it has
not yet been ported to gcc-snapshot, so it leaves the sources in an
> BTW do you think it is worth it to submit bug reports to the gnat
> bugzilla? I see there are many reports from years ago with no
> comment. Is it used at all by upstream?
Submitting bugs in the bugzilla is always a good idea. AdaCore look at
these bugs occasionally but not systematically; they have already fixed
a majority of them (see the closed PRs). (It is only natural that they
give priority to bugs submitted by paying customers). In addition,
contributors outside AdaCore occasionally step in.
Thanks for your interest.