Re: Debian Sarge: problem with libgnat.so



Ludovic Brenta <ludovic@xxxxxxxxxxxxxxxxxx> wrote:
> Martin Klaiber <martinkl@xxxxxxxxxxxxxxxxxx> writes:

>> Is my system broken? Do you have an idea, why gnatgcc doesn't find
>> libgnat?

> Because your -L does not specify a directory name but a file name
> instead. No, your system isn't broken :)

Yes, thanks, this was the problem.

>> On the other hand, I don't want to use gnatgcc really, because there
>> are systems out without gnatgcc (SuSE IIRC). So, I think, I will
>> use the other option: ask the user if I should create
>> /usr/lib/libgnat.so if it is missing.

> If you hide libgnat from C programmers, you can use gnatgcc, adagcc
> (FreeBSD) or gcc or ld or whatever, and they don't have to know or
> care. They'll use just "gcc" and get libgnat pulled in by your
> library.

I was thinking of people who want to build the library but don't have
gnatgcc. I was trying out SuSE 8.x once, there was only gnatmake and
gcc. I don't know if it is still like that.

Anyway, to hide libgnat from C-programmers is a good idea. If I build
the library like you said, the linking of the C-testprogram works, but
when I want to run it, I get the following error:

./test_c: relocation error: /usr/local/lib/libopensteuer.so.0: undefined symbol: program_error

ldd /usr/local/lib/libopensteuer.so
libgnat-3.15p.so.1 => /usr/lib/gcc-lib/i486-linux/2.8.1/adalib/libgnat-3.15p.so.1 (0x4001a000)
libc.so.6 => /lib/libc.so.6 (0x401bb000)
libm.so.6 => /lib/libm.so.6 (0x402ef000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

ldd test_c
libopensteuer.so.0 => /usr/local/lib/libopensteuer.so.0 (0x40024000)
libc.so.6 => /lib/libc.so.6 (0x4003d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Is this only a problem with a wrong path? If yes, which one is it?
LD_LIBRARY_PATH includes the adalib-directory (/usr/lib/gcc-lib/...).

> In the next gnat, I will provide /usr/lib/libgnat.so for the specific
> purpose of making it easier to link shared libraries with libgnat.

Thanks. I think this will be a userfriendly solution if it is
permitted by the GNAE.

> But don't hold your breath for that next release; in any case it will
> not be in Sarge but only in Etch.

No problem.

As we are talking about future releases: do you know if there are
plans to include Juergen Pfeiffers AdaCurses from ncurses into one
of the next releases? In 2003 I had some mailcontact with the
ncurses-maintainer, he kept vague in his answer. Do you have any
interest or plan to have a adacurses-package?

I use them for a program I've written and compile them from source,
which is no problem. But to have a package would be also nice for
people who work a lot on the console. I've seen that Debian comes
with libtexttools, but I haven't tried it out yet. Would it be a
better alternative?

Martin
.



Relevant Pages

  • Re: Debian Sarge: problem with libgnat.so
    ... >> Your Makefile is correct, except that it calls the C compiler to link ... If you call gnatgcc instead, ... I suggest that you hide libgnat from C programmers. ... the only standard layout for Ada files is the GNU ...
    (comp.lang.ada)
  • Re: Debian Sarge: problem with libgnat.so
    ... If you hide libgnat from C programmers, you can use gnatgcc, adagcc ... If you make your library into a package, ... > But this person does not install the Ada-compiler, ... most libraries intended for use from C programs come in two ...
    (comp.lang.ada)
  • Re: Debian Sarge: problem with libgnat.so
    ... > I suggest that you hide libgnat from C programmers. ... somebody installs the libraries needed for this program (for ...
    (comp.lang.ada)