comp.lang.ada
 help / color / mirror / Atom feed
* Gnat 3.13p and shared libraries on HP-UX
@ 2001-07-06 11:34 Pierre Favier
  2001-07-06 13:02 ` Marc A. Criley
  2001-07-07  8:42 ` Florian Weimer
  0 siblings, 2 replies; 10+ messages in thread
From: Pierre Favier @ 2001-07-06 11:34 UTC (permalink / raw)


Hello,

I am currently porting a piece of Ada code from Linux to HP-UX.
The build process creates shared libraries from the compiled Ada units
and then a main program which links against these libraries.

Under Linux with gnat 3.13p everything works fine.

Under HP-UX, the program links but during execution it seems to enter
an infinite loop somewhere when exceptions are raised (exceptions
which are normally handled by an appropriate exception block).

Am I missing some special compiler options on HP-UX (I am compiling
with -O0 -g -gnatwu -gnatf) or is it something which is not working in
the HP-UX version ov 3.13p?

Thanks in advance



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-06 11:34 Gnat 3.13p and shared libraries on HP-UX Pierre Favier
@ 2001-07-06 13:02 ` Marc A. Criley
  2001-07-08  9:56   ` Pierre Favier
  2001-07-07  8:42 ` Florian Weimer
  1 sibling, 1 reply; 10+ messages in thread
From: Marc A. Criley @ 2001-07-06 13:02 UTC (permalink / raw)


Pierre Favier wrote:
> 
> Hello,
> 
> I am currently porting a piece of Ada code from Linux to HP-UX.
> The build process creates shared libraries from the compiled Ada units
> and then a main program which links against these libraries.
> 
> Under Linux with gnat 3.13p everything works fine.
> 
> Under HP-UX, the program links but during execution it seems to enter
> an infinite loop somewhere when exceptions are raised (exceptions
> which are normally handled by an appropriate exception block).
> 
> Am I missing some special compiler options on HP-UX (I am compiling
> with -O0 -g -gnatwu -gnatf) or is it something which is not working in
> the HP-UX version ov 3.13p?

I haven't done HP in a while, but isn't there supposed to be an -fPIC
option when compiling code that's going into shared libraries?  Check
the "Creating an Ada Library" section of the GNAT User Guide.  (I would,
though, drop the -O0 option since there's no benefit to doing that, and
-gnatf and -gnatwu have no effect on the generated code.)

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-06 11:34 Gnat 3.13p and shared libraries on HP-UX Pierre Favier
  2001-07-06 13:02 ` Marc A. Criley
@ 2001-07-07  8:42 ` Florian Weimer
  2001-07-07 21:13   ` Marc A. Criley
  1 sibling, 1 reply; 10+ messages in thread
From: Florian Weimer @ 2001-07-07  8:42 UTC (permalink / raw)


favierp@sofreavia.fr (Pierre Favier) writes:

> I am currently porting a piece of Ada code from Linux to HP-UX.
> The build process creates shared libraries from the compiled Ada units
> and then a main program which links against these libraries.

It might be possible that under HP-UX, GNAT does not support shared
libraries at all.  At least the README suggests that GNAT 3.13p does
not support a shared run-time library on HP-UX. :-(



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-07  8:42 ` Florian Weimer
@ 2001-07-07 21:13   ` Marc A. Criley
  2001-07-09  2:21     ` Robert Dewar
  0 siblings, 1 reply; 10+ messages in thread
From: Marc A. Criley @ 2001-07-07 21:13 UTC (permalink / raw)


Florian Weimer wrote:
> 
> favierp@sofreavia.fr (Pierre Favier) writes:
> 
> > I am currently porting a piece of Ada code from Linux to HP-UX.
> > The build process creates shared libraries from the compiled Ada units
> > and then a main program which links against these libraries.
> 
> It might be possible that under HP-UX, GNAT does not support shared
> libraries at all.  At least the README suggests that GNAT 3.13p does
> not support a shared run-time library on HP-UX. :-(

Oh, GNAT certainly does support shared libraries on HP-UX, I built them
myself with 3.13b1 and 3.13b2 (prior to the release of 3.13p).

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-06 13:02 ` Marc A. Criley
@ 2001-07-08  9:56   ` Pierre Favier
  2001-07-08 21:30     ` Marc A. Criley
  0 siblings, 1 reply; 10+ messages in thread
From: Pierre Favier @ 2001-07-08  9:56 UTC (permalink / raw)


"Marc A. Criley" wrote:
> I haven't done HP in a while, but isn't there supposed to be an -fPIC
> option when compiling code that's going into shared libraries?  Check
> the "Creating an Ada Library" section of the GNAT User Guide.  (I would,
> though, drop the -O0 option since there's no benefit to doing that, and
> -gnatf and -gnatwu have no effect on the generated code.)
> 

It was a mistake on my part: I did compile with -fPIC. I also tried
with -O2 with the same result.

For further clarification, it is not the runtime I am trying to
dynamically link in my program but libraries of code belonging to my
application.



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-08  9:56   ` Pierre Favier
@ 2001-07-08 21:30     ` Marc A. Criley
  0 siblings, 0 replies; 10+ messages in thread
From: Marc A. Criley @ 2001-07-08 21:30 UTC (permalink / raw)


Pierre Favier wrote:
> 
> "Marc A. Criley" wrote:
> > I haven't done HP in a while, but isn't there supposed to be an -fPIC
> > option when compiling code that's going into shared libraries?  Check
> > the "Creating an Ada Library" section of the GNAT User Guide.  (I would,
> > though, drop the -O0 option since there's no benefit to doing that, and
> > -gnatf and -gnatwu have no effect on the generated code.)
> >
> 
> It was a mistake on my part: I did compile with -fPIC. I also tried
> with -O2 with the same result.
>
> For further clarification, it is not the runtime I am trying to
> dynamically link in my program but libraries of code belonging to my
> application.

Yes, that's what I understood.  Did you call adainit and adafinal? 
(Just asking the obvious here...based on personal past experience :-) 
Can you successfully build a small, test library to make sure that
works?

Marc



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-07 21:13   ` Marc A. Criley
@ 2001-07-09  2:21     ` Robert Dewar
  2001-07-09 12:31       ` Marc A. Criley
  2001-07-10  5:59       ` Pierre Favier
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Dewar @ 2001-07-09  2:21 UTC (permalink / raw)


"Marc A. Criley" <mcqada@earthlink.net> wrote in message news:<3B476EEB.EE2113C7@earthlink.net>...
> Oh, GNAT certainly does support shared libraries on HP-UX, I built 
> them myself with 3.13b1 and 3.13b2 (prior to the release of 3.13p).
> 
> Marc A. Criley
> Senior Staff Engineer
> Quadrus Corporation
> www.quadruscorp.com

Be careful, the fact that you can build libraries that appear to work
(but without systematic testing) does not mean that they are fully
supported (it took quite an effort to get shared libraries fully
working on some targets)



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-09  2:21     ` Robert Dewar
@ 2001-07-09 12:31       ` Marc A. Criley
  2001-07-10  5:59       ` Pierre Favier
  1 sibling, 0 replies; 10+ messages in thread
From: Marc A. Criley @ 2001-07-09 12:31 UTC (permalink / raw)


Robert Dewar wrote:
> 
> "Marc A. Criley" <mcqada@earthlink.net> wrote in message news:<3B476EEB.EE2113C7@earthlink.net>...
> > Oh, GNAT certainly does support shared libraries on HP-UX, I built
> > them myself with 3.13b1 and 3.13b2 (prior to the release of 3.13p).
> >
> 
> Be careful, the fact that you can build libraries that appear to work
> (but without systematic testing) does not mean that they are fully
> supported (it took quite an effort to get shared libraries fully
> working on some targets)

They definitely worked, this was on a production contract that had ACT
support.

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-09  2:21     ` Robert Dewar
  2001-07-09 12:31       ` Marc A. Criley
@ 2001-07-10  5:59       ` Pierre Favier
  2001-07-10 13:13         ` Marc A. Criley
  1 sibling, 1 reply; 10+ messages in thread
From: Pierre Favier @ 2001-07-10  5:59 UTC (permalink / raw)


dewar@gnat.com (Robert Dewar) wrote in message news:<5ee5b646.0107081821.5f10525d@posting.google.com>...
> "Marc A. Criley" <mcqada@earthlink.net> wrote in message news:<3B476EEB.EE2113C7@earthlink.net>...
> > Oh, GNAT certainly does support shared libraries on HP-UX, I built 
> > them myself with 3.13b1 and 3.13b2 (prior to the release of 3.13p).
> > 
> > Marc A. Criley
> > Senior Staff Engineer
> > Quadrus Corporation
> > www.quadruscorp.com
> 
> Be careful, the fact that you can build libraries that appear to work
> (but without systematic testing) does not mean that they are fully
> supported (it took quite an effort to get shared libraries fully
> working on some targets)

I am still unsure from Robert Dewar's posting whether they should be
working or not on HP-UX.



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

* Re: Gnat 3.13p and shared libraries on HP-UX
  2001-07-10  5:59       ` Pierre Favier
@ 2001-07-10 13:13         ` Marc A. Criley
  0 siblings, 0 replies; 10+ messages in thread
From: Marc A. Criley @ 2001-07-10 13:13 UTC (permalink / raw)


Pierre Favier wrote:
> 
> dewar@gnat.com (Robert Dewar) wrote in message news:<5ee5b646.0107081821.5f10525d@posting.google.com>...
> > "Marc A. Criley" <mcqada@earthlink.net> wrote in message news:<3B476EEB.EE2113C7@earthlink.net>...
> > > Oh, GNAT certainly does support shared libraries on HP-UX, I built
> > > them myself with 3.13b1 and 3.13b2 (prior to the release of 3.13p).
> >
> > Be careful, the fact that you can build libraries that appear to work
> > (but without systematic testing) does not mean that they are fully
> > supported (it took quite an effort to get shared libraries fully
> > working on some targets)
> 
> I am still unsure from Robert Dewar's posting whether they should be
> working or not on HP-UX.

In 1999 and 2000, I personally successfully built shared libraries on
HP-UX 10.20 using GNAT 3.13b1 and GNAT 3.13b2.  The 3.13b series was
then the version of GNAT available to ACT supported customers (3.12p was
the public version).  This compiler led to the version that was
subsequently made publically available as 3.13p.  The shared libraries
that were built were tested and delivered to a customer.

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com



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

end of thread, other threads:[~2001-07-10 13:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-06 11:34 Gnat 3.13p and shared libraries on HP-UX Pierre Favier
2001-07-06 13:02 ` Marc A. Criley
2001-07-08  9:56   ` Pierre Favier
2001-07-08 21:30     ` Marc A. Criley
2001-07-07  8:42 ` Florian Weimer
2001-07-07 21:13   ` Marc A. Criley
2001-07-09  2:21     ` Robert Dewar
2001-07-09 12:31       ` Marc A. Criley
2001-07-10  5:59       ` Pierre Favier
2001-07-10 13:13         ` Marc A. Criley

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