comp.lang.ada
 help / color / mirror / Atom feed
* gnatlink error on Debian Woody
@ 2003-11-11 11:34 Frank Piron
  2003-11-11 12:16 ` Dmitriy Anisimkov
  2003-11-11 12:25 ` Ludovic Brenta
  0 siblings, 2 replies; 12+ messages in thread
From: Frank Piron @ 2003-11-11 11:34 UTC (permalink / raw)


Hi,
if i try to link my ocitest.adb with
oracle's oci shared library on a debian
system, i get:

> gnatmake -L$ORACLE_HOME/lib ocitest.adb -largs -lclntsh
ld: cannot find -laddr2line
gnatlink: cannot call /usr/bin/gnatgcc
gnatmake: *** link failed.

On windows (with -loci of course) all works fine.
Is it a debian issue?
Frank Piron





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 11:34 gnatlink error on Debian Woody Frank Piron
@ 2003-11-11 12:16 ` Dmitriy Anisimkov
  2003-11-11 13:44   ` Frank Piron
  2003-11-11 16:00   ` Frank Piron
  2003-11-11 12:25 ` Ludovic Brenta
  1 sibling, 2 replies; 12+ messages in thread
From: Dmitriy Anisimkov @ 2003-11-11 12:16 UTC (permalink / raw)


Frank Piron wrote:

> Hi,
> if i try to link my ocitest.adb with
> oracle's oci shared library on a debian
> system, i get:
> 
>> gnatmake -L$ORACLE_HOME/lib ocitest.adb -largs -lclntsh
> 
> ld: cannot find -laddr2line
> gnatlink: cannot call /usr/bin/gnatgcc
> gnatmake: *** link failed.
> 
> On windows (with -loci of course) all works fine.
> Is it a debian issue?

Are you sure about "ld: cannot find -laddr2line" ?
Maybe it is a "ld: cannot find -lclntsh"

Looks like you are trying to link with libaddr2line.a library.

I guess you have a -laddr2line in the command line or

pragma Linker_Options("-laddr2line");

in the ocitest.adb.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 11:34 gnatlink error on Debian Woody Frank Piron
  2003-11-11 12:16 ` Dmitriy Anisimkov
@ 2003-11-11 12:25 ` Ludovic Brenta
  2003-11-11 12:48   ` Frank Piron
  1 sibling, 1 reply; 12+ messages in thread
From: Ludovic Brenta @ 2003-11-11 12:25 UTC (permalink / raw)


Frank Piron <nospam@konad.net> writes:

> Hi,
> if i try to link my ocitest.adb with
> oracle's oci shared library on a debian
> system, i get:
> 
> > gnatmake -L$ORACLE_HOME/lib ocitest.adb -largs -lclntsh
> ld: cannot find -laddr2line
> gnatlink: cannot call /usr/bin/gnatgcc
> gnatmake: *** link failed.
> 
> On windows (with -loci of course) all works fine.
> Is it a debian issue?
> Frank Piron

Is clntsh a shared library?  If so, could you run ldd on it and report
the results?  Perhaps it is linked against libaddr2line, which is not
part of Debian because it came from a very old binutils.

If libclntsh.so is indeed linked against libaddr2line, you need to
either relink libclntsh.so without libaddr2line, or use the binary
gnat distribution from ACT; it does include libaddr2line.  Then, of
course, you resulting executable will require libaddr2line and you
will need to consider any distribution issues that may arise.

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 12:25 ` Ludovic Brenta
@ 2003-11-11 12:48   ` Frank Piron
  2003-11-11 13:34     ` Preben Randhol
  0 siblings, 1 reply; 12+ messages in thread
From: Frank Piron @ 2003-11-11 12:48 UTC (permalink / raw)


Hi,
ldd results below

> Frank Piron <nospam@konad.net> writes:
>
>> Hi,
>> if i try to link my ocitest.adb with
>> oracle's oci shared library on a debian
>> system, i get:
>>
>> > gnatmake -L$ORACLE_HOME/lib ocitest.adb -largs -lclntsh
>> ld: cannot find -laddr2line
>> gnatlink: cannot call /usr/bin/gnatgcc
>> gnatmake: *** link failed.
>>
>> On windows (with -loci of course) all works fine.
>> Is it a debian issue?
>> Frank Piron
>
> Is clntsh a shared library?  If so, could you run ldd on it and report
> the results?

> ldd -v libclntsh.so
        libwtc8.so => /u01/oracle/app/oracle/product/8.1.7/lib/libwtc8.so 
(0x405
b4000)
        libdl.so.2 => /lib/libdl.so.2 (0x405bf000)
        libm.so.6 => /lib/libm.so.6 (0x405c2000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x405e3000)
        libc.so.6 => /lib/libc.so.6 (0x405f7000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

        Version information:
        ./libclntsh.so:
                libm.so.6 (GLIBC_2.0) => /lib/libm.so.6
                libdl.so.2 (GLIBC_2.1) => /lib/libdl.so.2
                libdl.so.2 (GLIBC_2.0) => /lib/libdl.so.2
                libpthread.so.0 (GLIBC_2.0) => /lib/libpthread.so.0
                libpthread.so.0 (GLIBC_2.1) => /lib/libpthread.so.0
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /u01/oracle/app/oracle/product/8.1.7/lib/libwtc8.so:
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libdl.so.2:
                libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libm.so.6:
                libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libpthread.so.0:
                libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.2) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.1.2) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.2.3) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
                libc.so.6 (GLIBC_2.1.1) => /lib/libc.so.6
        /lib/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.2.3) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.2) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 12:48   ` Frank Piron
@ 2003-11-11 13:34     ` Preben Randhol
  2003-11-11 13:48       ` Frank Piron
  2003-11-11 16:07       ` Frank Piron
  0 siblings, 2 replies; 12+ messages in thread
From: Preben Randhol @ 2003-11-11 13:34 UTC (permalink / raw)


On 2003-11-11, Frank Piron <nospam@konad.net> wrote:
> Hi,
> ldd results below

Which version of Gnat are you using? Are you using the Gnat 3.15p from:
http://www.ada-france.org/debian
?

   deb http://www.ada-france.org/debian ada main
   deb-src http://www.ada-france.org/debian ada main

Are you experiencing the add2line when compiling other programs?

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 12:16 ` Dmitriy Anisimkov
@ 2003-11-11 13:44   ` Frank Piron
  2003-11-11 16:00   ` Frank Piron
  1 sibling, 0 replies; 12+ messages in thread
From: Frank Piron @ 2003-11-11 13:44 UTC (permalink / raw)


Hi Dmitriy,
you wrote
>
> Are you sure about "ld: cannot find -laddr2line" ?
> Maybe it is a "ld: cannot find -lclntsh"

No, it is as i stated, literally (copied from terminal).
And libclntsh.so is located in $ORACLE_HOME/lib.

> Looks like you are trying to link with libaddr2line.a library.

It looks so, but i didn't. At least i didn't consciously.

> I guess you have a -laddr2line in the command line or
>
> pragma Linker_Options("-laddr2line");
> in the ocitest.adb.

I checked already for this. Further i should mention, that i
have already successfully linked with the same command on a
Suse 7.2 Linux distribution.
Thanks for comments.
Frank Piron





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 13:34     ` Preben Randhol
@ 2003-11-11 13:48       ` Frank Piron
  2003-11-11 16:07       ` Frank Piron
  1 sibling, 0 replies; 12+ messages in thread
From: Frank Piron @ 2003-11-11 13:48 UTC (permalink / raw)


Am Tue, 11 Nov 2003 13:34:39 +0000 (UTC) hat Preben Randhol 
<randhol+valid_for_reply_from_news@pvv.org> geschrieben:

> On 2003-11-11, Frank Piron <nospam@konad.net> wrote:
>> Hi,
>> ldd results below
>
> Which version of Gnat are you using? Are you using the Gnat 3.15p from:
> http://www.ada-france.org/debian
> ?

I'm using gnat 3.14-p-3_i386.deb from www.debian.org

> deb http://www.ada-france.org/debian ada main
> deb-src http://www.ada-france.org/debian ada main

Thanks, i will give this a try.

> Are you experiencing the add2line when compiling other programs?
>

No. But didn't try to link with other .so's till now.





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 12:16 ` Dmitriy Anisimkov
  2003-11-11 13:44   ` Frank Piron
@ 2003-11-11 16:00   ` Frank Piron
  2003-11-11 16:10     ` Preben Randhol
  1 sibling, 1 reply; 12+ messages in thread
From: Frank Piron @ 2003-11-11 16:00 UTC (permalink / raw)


Hi Dmitriy,


Dmitriy Anisimkov schrieb:
> 
> Frank Piron wrote:
> 
> > Hi,
> > if i try to link my ocitest.adb with
> > oracle's oci shared library on a debian
> > system, i get:
> >
> >> gnatmake -L$ORACLE_HOME/lib ocitest.adb -largs -lclntsh
> >
> > ld: cannot find -laddr2line
> > gnatlink: cannot call /usr/bin/gnatgcc
> > gnatmake: *** link failed.
> >
> > On windows (with -loci of course) all works fine.
> > Is it a debian issue?
> 
> Are you sure about "ld: cannot find -laddr2line" ?
> Maybe it is a "ld: cannot find -lclntsh"
> 
> Looks like you are trying to link with libaddr2line.a library.
> 
> I guess you have a -laddr2line in the command line or
> 
> pragma Linker_Options("-laddr2line");
> 
> in the ocitest.adb.

Finally i detected the cause of the problem.
I used - like you - the gnat.traceback.symbolic package.
This package contains the linker pragma "-laddr2line" in
file g-trasym.adb of the Debian - Gnat distribution. 

Thanks for comments,
Frank Piron



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 13:34     ` Preben Randhol
  2003-11-11 13:48       ` Frank Piron
@ 2003-11-11 16:07       ` Frank Piron
  2003-11-11 22:56         ` Simon Wright
  1 sibling, 1 reply; 12+ messages in thread
From: Frank Piron @ 2003-11-11 16:07 UTC (permalink / raw)


Hi Preben

Preben Randhol schrieb:
> 
> On 2003-11-11, Frank Piron <nospam@konad.net> wrote:
> > Hi,
> > ldd results below
> 
> Which version of Gnat are you using? Are you using the Gnat 3.15p from:
> http://www.ada-france.org/debian
> ?
> 
>    deb http://www.ada-france.org/debian ada main
>    deb-src http://www.ada-france.org/debian ada main
> 
> Are you experiencing the add2line when compiling other programs?

I tried gnat-3.15p and got the same error. Reason: there is
a linker pragma "-laddr2line" in the gnat.traceback.symbolic
package which i used successfully on win32. You have to build
the libaddr2line from the gnu binary utils. I found instructions
how to do it here: 
http://home.cogeco.ca/~ve3wwg/HPUX-11-GNAT-3.14p-BUILD.pdf
Greetings from Germany,
Frank



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 16:00   ` Frank Piron
@ 2003-11-11 16:10     ` Preben Randhol
  2003-11-11 22:41       ` Ludovic Brenta
  0 siblings, 1 reply; 12+ messages in thread
From: Preben Randhol @ 2003-11-11 16:10 UTC (permalink / raw)


On 2003-11-11, Frank Piron <frank.piron@konad.de> wrote:
>
> Finally i detected the cause of the problem.
> I used - like you - the gnat.traceback.symbolic package.
> This package contains the linker pragma "-laddr2line" in
> file g-trasym.adb of the Debian - Gnat distribution. 

Will it work if you remove the    

   pragma Linker_Options ("-laddr2line");

or will gnat.traceback.symbolic break?

Preben
-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 16:10     ` Preben Randhol
@ 2003-11-11 22:41       ` Ludovic Brenta
  0 siblings, 0 replies; 12+ messages in thread
From: Ludovic Brenta @ 2003-11-11 22:41 UTC (permalink / raw)


Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> writes:

> On 2003-11-11, Frank Piron <frank.piron@konad.de> wrote:
> >
> > Finally i detected the cause of the problem.
> > I used - like you - the gnat.traceback.symbolic package.
> > This package contains the linker pragma "-laddr2line" in
> > file g-trasym.adb of the Debian - Gnat distribution. 
> 
> Will it work if you remove the    
> 
>    pragma Linker_Options ("-laddr2line");
> 
> or will gnat.traceback.symbolic break?
> 
> Preben

It will break.

Unfortunately, symbolic tracebacks are a recurring issue with GNAT.
The binary distribution from ACT contains a libaddr2line built from an
old version of GNU binutils.  Very few GNU/Linux distributions, if
any, include libaddr2line.  This is actually not a problem with GNAT
itself but with recent versions of binutils.  I've tried GNAT for
several distributions and never found one that did support symbolic
tracabacks.  I myself had to give up on the issue when packaging GNAT
3.15p for Debian.

It is an annoyance to not have symbolic tracebacks, but not a major
loss of functionality.  You can always run addr2line manually on
non-symbolic tracebacks or run your program under GDB to achieve the
same effect.  Besides, proper Ada programs do not raise exceptions
anyway, do they? :)

As I said earlier, if the OP links their program with libaddr2line,
they must then distribute it with the resulting executable.  If the
program is non-free, this might be a problem because the GNU binutils
are under GPL, not LGPL.

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: gnatlink error on Debian Woody
  2003-11-11 16:07       ` Frank Piron
@ 2003-11-11 22:56         ` Simon Wright
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Wright @ 2003-11-11 22:56 UTC (permalink / raw)


Frank Piron <frank.piron@konad.de> writes:

> I tried gnat-3.15p and got the same error. Reason: there is
> a linker pragma "-laddr2line" in the gnat.traceback.symbolic
> package which i used successfully on win32. You have to build
> the libaddr2line from the gnu binary utils. I found instructions
> how to do it here: 
> http://home.cogeco.ca/~ve3wwg/HPUX-11-GNAT-3.14p-BUILD.pdf

An alternative is to use plain gnat.exception_traces ..

-- 
Simon Wright                               100% Ada, no bugs.



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-11-11 22:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-11 11:34 gnatlink error on Debian Woody Frank Piron
2003-11-11 12:16 ` Dmitriy Anisimkov
2003-11-11 13:44   ` Frank Piron
2003-11-11 16:00   ` Frank Piron
2003-11-11 16:10     ` Preben Randhol
2003-11-11 22:41       ` Ludovic Brenta
2003-11-11 12:25 ` Ludovic Brenta
2003-11-11 12:48   ` Frank Piron
2003-11-11 13:34     ` Preben Randhol
2003-11-11 13:48       ` Frank Piron
2003-11-11 16:07       ` Frank Piron
2003-11-11 22:56         ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox