comp.lang.ada
 help / color / mirror / Atom feed
* GNAT shared libraries under Linux
@ 1998-05-31  0:00 Markus Kuhn
  1998-05-31  0:00 ` Juergen Pfeifer
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Kuhn @ 1998-05-31  0:00 UTC (permalink / raw)



Is it possible to compile libada.a into a shared library with
gnat-3.10p under Linux?

At the moment, the way I use gnat, every executable I produce
is statically linked with the Ada run-time system, which causes
even 20 lines long programs to produce easily over 100 kb long
executables (even with -O2 -gnatp and "strip"ed).

Markus

-- 
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org,  home page: <http://www.cl.cam.ac.uk/~mgk25/>




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

* Re: GNAT shared libraries under Linux
  1998-05-31  0:00 GNAT shared libraries under Linux Markus Kuhn
@ 1998-05-31  0:00 ` Juergen Pfeifer
  1998-06-01  0:00   ` Markus Kuhn
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Pfeifer @ 1998-05-31  0:00 UTC (permalink / raw)



Markus Kuhn wrote:
> 
> Is it possible to compile libada.a into a shared library with
> gnat-3.10p under Linux?
> 
> At the moment, the way I use gnat, every executable I produce
> is statically linked with the Ada run-time system, which causes
> even 20 lines long programs to produce easily over 100 kb long
> executables (even with -O2 -gnatp and "strip"ed).
> 
I built it from the sources on my redhat 5.0 system (requires a tiny
patch). The important thing is to use "make gnatlib-shared" if you
build the library. Next step is to make sure, that the linker knows
about the shared library. I simply put a symlink /usr/lib/libgnat.so
to the shared library located in the gcc library subdirectory. After
the usual ldconfig it works fine with the shared runtime.

I'm actually experimenting now with glibc-2.1 und kernel 2.1.103.
This again requires some small patches that I'm currently testing,
because the glibc developers have changed the LinuxThreads a little
bit. I've it up und running now, but there are problems with tasking.
      - Every of the test programs of florist get's a CONSTRAINT_ERROR
        and I've problems to debug this because gdb gets always
        interrupted by the realtime signals the glibc now uses for
        threading.
      - Programs using tasking are not properly terminated when killed
        by a SIGINT. There are always remaining threads that have to be
        killed from the commandline.

Cheers
Juergen




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

* Re: GNAT shared libraries under Linux
  1998-05-31  0:00 ` Juergen Pfeifer
@ 1998-06-01  0:00   ` Markus Kuhn
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Kuhn @ 1998-06-01  0:00 UTC (permalink / raw)



Juergen Pfeifer wrote:
> Markus Kuhn wrote:
> > Is it possible to compile libgnat.a into a shared library with
> > gnat-3.10p under Linux?
> >
> I built it from the sources on my redhat 5.0 system (requires a tiny
> patch). The important thing is to use "make gnatlib-shared" if you
> build the library. Next step is to make sure, that the linker knows
> about the shared library. I simply put a symlink /usr/lib/libgnat.so
> to the shared library located in the gcc library subdirectory. After
> the usual ldconfig it works fine with the shared runtime.

Thanks, I'll try that.

> I'm actually experimenting now with glibc-2.1 und kernel 2.1.103.
>       - Every of the test programs of florist get's a CONSTRAINT_ERROR

I ran into exactly the same problem when I tried to install florist
under Red Hat 5. Ted Baker said he might possibly put up a new release
with better signal support this week. Let's hope he has the time to
test it on a glib2 system this time as well.

Markus
(dreaming of the day when /usr/lib/libgnat.so and /usr/lib/libflorist.so
come as commonly preinstalled with every Linux distribution as libc,
in order to ensure portability of tiny Ada executables.

-- 
Markus G. Kuhn, Security Group, Computer Lab, Cambridge University, UK
email: mkuhn at acm.org,  home page: <http://www.cl.cam.ac.uk/~mgk25/>




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

end of thread, other threads:[~1998-06-01  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-31  0:00 GNAT shared libraries under Linux Markus Kuhn
1998-05-31  0:00 ` Juergen Pfeifer
1998-06-01  0:00   ` Markus Kuhn

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