Operating System - HP-UX
1832617 Members
2538 Online
110043 Solutions
New Discussion

Execute Permission Denied

 
SOLVED
Go to solution
Ron Levy
Advisor

Execute Permission Denied

Machine '1' is a D-390. It runs an executable called 'good'.

I took an Ignite tape backup of vg00 and replicated vg00 onto an A-180c machine, called '2'. I then copied over the 'good' program from machine 1 to machine 2. I have set all relevant permissions that I can find so far to 777 just in case.

It runs on machine 1 but does not run on machine 2.

If I do a 'file good' I get: PA-RISC2.0 shared executable dynamically linked -not stripped on both machine 1 and machine 2.

If I do a 'file /stand/vmunix' I get: PA-RISC1.1 executable -not stripped on both machine1 and machine2.

How can 'good' possibly run on machine 1 but not run on machine 2?

Thanks,
-Ron
7 REPLIES 7
John Dvorchak
Honored Contributor

Re: Execute Permission Denied

Very simply you have answered you own question. The file/program "good" was compiled on a PA-RISC2.0 machine and the A-180 is a PA-RISC1.1 machine. Kinda like taking an executable from a Intel I386 and trying to run it on an Apple Mac.
If it has wheels or a skirt, you can't afford it.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Execute Permission Denied

Because the A180c has a PA-73XX processor which understands PA-RISC1.1 instructions and the D-390 runs a PA-8000 which understands PA-RISC2.0 instructions which are a superset of the 1.1 instructions. Had you compiled with +DAportable on the D box then your code would have worked OR if you had compiled on the A180 the code would have worked in the other direction.

One other trap you can fall into is compiling/linking 64-bit code on thge D390 which will not have a prayer of running on the 32-bit only A-180c.
If it ain't broke, I can fix that.
Michael Schulte zur Sur
Honored Contributor

Re: Execute Permission Denied

Hi,

what os are you running on both machines?

greetings,

Michael
Sridhar Bhaskarla
Honored Contributor

Re: Execute Permission Denied

Hi Ron,

What did you get when you run

get_conf KERNEL_BITS
getconf HW_CPU_SUPP_BITS

Just wanted to make sure we didn't overlook anything. 1 and 2 should give you an answer.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Patrick Wallek
Honored Contributor

Re: Execute Permission Denied

A D390 is in fact a PA-RISC 2.0 machine. If you go into SAM, go to Performance Monitors, and then go to System Properties, you will see that your D is a "2.0 PA8000" CPU. That is why your executable runs on the D, but not the A.

Your A180C is almost surely a PA7?00 PA-RISC 1.1 machine.

You can't really go by the 'file /stand/vmunix' as my D390 shows the same thing. This is probably due to having the 32-bit version of HP-UX 11.X installed rather than the 64-bit version.

Basically, if you want your executable to run on the A180C you are going to have to recompile it as a PA-RISC 1.1 executable.
A. Clay Stephenson
Acclaimed Contributor

Re: Execute Permission Denied

I suppose that I should add one other "gotcha" thouh it almost certainly doesn't apply in your case. Code compiled on HP-UX 10.20 will run under 10.20,11.0, and 11.11; code compiled under HP-UX 11.0 will run under 11.0 and 11.11; code compiled under HP-UX 11.11 will only run under 11.11. It's designed to be upwardly compatible but not downwardly.
If it ain't broke, I can fix that.
Ron Levy
Advisor

Re: Execute Permission Denied

Oddly, when I go into SAM's performance monitors and system properties, both machine 1 and machine2 show CPU version 1.0 PA7000.

But I have no doubt that the problem is something like what we have discussed.