Re: HP-UX 11.23 - Mix of 32 and 64 bits libs (375 Views)
Reply
Occasional Contributor
Serio
Posts: 3
Registered: ‎07-01-2004
Message 1 of 6 (375 Views)
Accepted Solution

HP-UX 11.23 - Mix of 32 and 64 bits libs


Hi,
I am doing a port from PA risc architecture to IA64 architecture. We are using HPUX 11.23 on IA64 and compiler version HP aC++/ANSI C B3910B A.05.50.

My question is:
As IA64 is a native 64-bits processor, can we mix 32-bits libraries with 64-bits ones for an application ?
I know there is no problem to build 32-bits libs or executables on IA64 (via acc option) but my question relates to the mix of both type of libs.

Also, can someone can give a pointer to the last patches concerning HP-UX 11.23 and the HP aC++/ANSI compiler.

Any help would be appreciated.
Thanks in advance,

--Nicolas
Honored Contributor
Robert-Jan Goossens
Posts: 7,384
Registered: ‎04-04-2000
Message 2 of 6 (375 Views)

Re: HP-UX 11.23 - Mix of 32 and 64 bits libs

Trusted Contributor
Manish Srivastava
Posts: 170
Registered: ‎05-24-2004
Message 3 of 6 (375 Views)

Re: HP-UX 11.23 - Mix of 32 and 64 bits libs

Hi Nicolas,

I do not understand your question completely. It is true that you can build both 32bit ant 64 bit applications and libraries on IA64 machine.
The application linking the to a library is either a 32bit or a 64 bit application. So, if it is a 32 app then it links with 32 bit lib and if it is a 64 bit app it links to 64 bit lib.
I think mixing of 32 bit and 64 bit libraries are not allowed.

manish
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 4 of 6 (375 Views)

Re: HP-UX 11.23 - Mix of 32 and 64 bits libs

No, 32-bit and 64-bot objects cannot be mixed in the same executable. One method of dealing with this is to have a parent 64-bit process that fork()'s and exec()'s a 32-bit child process -- or vice versa. The two processes then communicate over pipes or IPC. It's not pretty but it works. It is possible to used shared memory to comunicate between 64-bit and 32-bit processes but pay attention to the man pages because to make that work, you must play with a very tight set of rules. Pipes are probably the easist though potentially the slowest method of communication.
If it ain't broke, I can fix that.
Occasional Contributor
Serio
Posts: 3
Registered: ‎07-01-2004
Message 5 of 6 (375 Views)

Re: HP-UX 11.23 - Mix of 32 and 64 bits libs


Thanks to all for all these informations.

Regards,
--Nicolas
Honored Contributor
rick jones
Posts: 3,814
Registered: ‎12-02-1996
Message 6 of 6 (375 Views)

Re: HP-UX 11.23 - Mix of 32 and 64 bits libs

And since you are doing a port from PA, you cannot mix PA-RISC and IPF .o's either.

While IPF is a 64-bit processor, the default compilation mode for HP-UX compilers is still 32bit.
there is no rest for the wicked yet the virtuous have no pillows
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.