Operating System - HP-UX
1753441 Members
4578 Online
108794 Solutions
New Discussion юеВ

compiled program may not run on PA 1.x system.

 
SOLVED
Go to solution
Rainer von Bongartz
Honored Contributor

compiled program may not run on PA 1.x system.

When I compile programs with cc on my K460 I always
get a warning

/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (h.o) was detected. The linked output may not run on a PA 1.x system.

transfering my compiled binary to a K200 server ( PA 1.x )
I get the error message:

Execute permission denied, though the x-bit is set correctly.

Why can't I run programs compiled on K460 on K200 ???

He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
3 REPLIES 3
Stefan Farrelly
Honored Contributor
Solution

Re: compiled program may not run on PA 1.x system.


When you compile your program add either of 2 options;

1. +DAportable This means your binary will now run on and HP-UX version/cpu.

2. +DA1.1 Now it will run on older 1.1 CPU's servers.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Torsten Hell
Occasional Advisor

Re: compiled program may not run on PA 1.x system.

Hi!

You just have to re-compile your program on the PA 1.1 machine, because a system library is not compatible to older systems. It's not a bug, it's a feature ;-)). You will get this warning message everytime your program contains functions with system calls for ipc handling, tcp functions or such stuff.
Herve BRANGIER
Respected Contributor

Re: compiled program may not run on PA 1.x system.

Hi,

You compile on a 64bits system (K460 : PA800 64 bits) with PA2.0 libs (64bits also). Your
binary can't works on 32bits system (K200 :
PA7200 32 bits).

You can verify if your systems are 32 or 64
bits using "getconf KERNEL_BITS". When you
compile on a 64 bits system it produce
64bits binaries (see aCC man page
+DArchitecture option). You have to solutions :

1) 2 compilations : 32 or 64 bits
2) Compile in 32bits (if the K460 can
use 32 AND 64 bits, use "getconf HW_32_64_CAPABLE"
to verify if it's possible. You can specify to
aCC to compile a portable binary : -DAportable

HTH

Herve