Operating System - HP-UX
1836605 Members
2076 Online
110102 Solutions
New Discussion

Compile warning (PA 2.0 object file was detected)

 
SOLVED
Go to solution
TD Clark
Advisor

Compile warning (PA 2.0 object file was detected)

When attempting to build a new system (L2000 running 11.11) - loading the application... I'm receiving a compile warning:
"/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file was detected. The linked output may not run on a PA 1.x system." The vendor is unsure what to do and (would forcing the compiler to create a 32-bit executable work - if so, does anyone know the syntax)?
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Compile warning (PA 2.0 object file was detected)

As long as you only need to execute on boxes with PA-8XXX's then that's okay. If you still need to execute on older boxes with PA-7XXX's (e.g. A180's, KX20's and below, DX60's and below) then add the +DAportable flag. The code will then be not quite as efficient on all platforms but it will execute anywhere.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Compile warning (PA 2.0 object file was detected)

The 2nd part of your question about making it a 32-bit executable - that's not sufficient because there can be code optimized for the PA-8XXX instruction set (PA 2.0) and still be 32-bit code.
If it ain't broke, I can fix that.
TD Clark
Advisor

Re: Compile warning (PA 2.0 object file was detected)

Clay - thanks for your input..
Added -Wl,+DAportable,+DS1.1

cc -o uwe_etstart -Wl,+DAportable,+DS1.1 -L/usr/jamistc/tools/uniface uwe_etstar
t.c /usr/jamistc/tools/uniface/wrapper.o -lyrtl -lurtl

Received the following error from the linker

$ buwe_etstart
/usr/ccs/bin/ld: Unrecognized argument: +DAportable
/usr/ccs/bin/ld: Usage: /usr/ccs/bin/ld [options] [flags] files

cc -o uwe_etstart -Wl,CFLAGS=-O +DAportable,+DS1.1 -L/usr/jamistc/tools/uniface
uwe_etstart.c /usr/jamistc/tools/uniface/wrapper.o -lyrtl -lurtl

Gave this error

$ buwe_etstart
(Bundled) cc: warning 7002: Cannot open sched.models. (7002)
/usr/ccs/bin/ld: Can't open CFLAGS=-O
/usr/ccs/bin/ld: No such file or directory

-------
Does the cc look okay to you?
Paddy_1
Valued Contributor

Re: Compile warning (PA 2.0 object file was detected)

As is posted in the earlier message +DAportable will work.Alternatively If performance is important for you then run the following program to see what version of RISC are you running and then use the appropriate switch like DA1.1 or so.
Hope this helps.
------------
#include
#include
#include
#include

main()
{

struct utsname uts;

printf("\n\n");
switch ( sysconf(_SC_CPU_VERSION) )
{
case CPU_PA_RISC1_0: printf("PA-RISC Version : 1.0\n");
break;
case CPU_PA_RISC1_1: printf("PA-RISC Version : 1.1\n");
break;
case CPU_PA_RISC1_2: printf("PA-RISC Version : 1.2\n");
break;
case CPU_PA_RISC2_0: printf("PA-RISC Version : 2.0\n");
break;
default: printf("Unknown Architecture\n");
break;
}
printf("\n");
if ( uname(&uts) == -1 )
printf("Error in uname call\n"), exit(1);

printf ("System name : %s\n", uts.sysname);
printf ("Node name : %s\n", uts.nodename);
printf ("Version : %s\n", uts.version);
printf ("Release : %s\n", uts.release);
printf ("Machine : %s\n", uts.machine);
printf ("Idnumber : %s\n", uts.idnumber);
--------------------------

if ( strstr(uts.machine,"/7") == (char *) NULL)
{
if (strstr(uts.machine, "/8") == (char *) NULL)
printf("Unknown Machine type: %s\n", uts.machine);
else
printf("This is a Server\n");
}
else
printf("This is a Workstation\n");

}
The sufficiency of my merit is to know that my merit is NOT sufficient
TD Clark
Advisor

Re: Compile warning (PA 2.0 object file was detected)

Thanks paddy - I'm trying that now....
Seth Parker
Trusted Contributor

Re: Compile warning (PA 2.0 object file was detected)

Todd,

Why sweat it? Like Clay said, that's just a warning that the newly compiled program won't work on older systems. But, since you're building a new one that shouldn't be a problem, right?

That message is truly just a warning. I've been seeing that every time I compile since we swicthed from 10.2 to 11.0 and have yet to have a problem with it.

Still, it is an annoying message!

Regards,
Seth