Operating System - Linux
1748198 Members
2559 Online
108759 Solutions
New Discussion юеВ

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

 
SOLVED
Go to solution
H.Merijn Brand (procura
Honored Contributor

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

99.5% of the circumstances where I saw that message are from non-relocatable objects.

You probably need to add -fPIC to all your CCFLAGS (or whatever your makefiles use to pass the flags to gcc/g++)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Stephen Keane
Honored Contributor

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

Thnaks for the tip, but I'm actually trying to build a shared library (linking in libstdc++) so I already have -fPIC and -shared in the flags.

I can compile this on 11.11 with the same version of gcc, but on 11.00 I can't and on 11.00 I don't have libstdc++.sl either, only the archive version. Could this be related?
H.Merijn Brand (procura
Honored Contributor

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

I think so. The objects in that static .a file are most likely not compiled with -fPIC.

I just checked my libstdc++.a, and the objects do not tell you how they are compiled.

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Stephen Keane
Honored Contributor

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

I gave up and regressed to gcc 3.2.3 from the HP archive. This is a depot and installed and ran fine. The only slight naus was that the stdio.h header file had a mistake in it (arguments for snprintf were wrong - didn't agree with man page either) but editing stdio.h fixed that. My code compiles fine and runs OK.
Stephen Keane
Honored Contributor

Re: HP-UX 11.11 compiled binaries running on HP-UX 11.00

As previous comment.