Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

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

SOLVED
Go to Solution
Occasional Contributor

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
5 REPLIES
Honored Contributor Honored Contributor

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

Trusted Contributor Trusted Contributor

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 Acclaimed Contributor

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

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


Thanks to all for all these informations.

Regards,
--Nicolas
Highlighted
Honored Contributor Honored Contributor

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