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

about #pragma HP_ALIGN

SOLVED
Go to Solution
Frequent Advisor

about #pragma HP_ALIGN

Hi, I'm compiling a very old program in an Integrity mode. This program was made for the 9000 architecture, and when I execute the Makefile to install I have the following error:


"cgPonerBPR.c", line 1: error #4205-D: HP_ALIGN pragma is no longer supported; u
se the "pack" and/or "unalign" pragmas instead
#pragma HP_ALIGN HPUX_NATURAL

I have been looking on the web and I have found that this pragma refers to the aligment mode which is refered to the architecture.
HPUX_NATURAL is refered to the 9000 architecture, but I'm not compiling in a 9000 architecture. There is other tipes of pragmas such as:

HPUX_WORD

This is the Series 300/400 default alignment mode.

HPUX_NATURAL_S500

This is the Series 500 default alignment mode.

HPUX_NATURAL

This is the HP 9000 workstations and servers and HP 3000 Series 900 systems default alignment mode.

NATURAL

This mode provides a consistent alignment scheme across HP architectures.

DOMAIN_WORD

This is the default word alignment mode on HP Apollo architecture.

DOMAIN_NATURAL

This is the default natural alignment mode on HP Apollo architecture.

or NOPADDING.

It's obious thath I don't need HPUX_ NATURAL_S500.

But I don't know what should I have to use, in order to my program compiles and works.

Thanks!
1 ACCEPTED SOLUTIONS
Acclaimed Contributor Acclaimed Contributor

Re: about #pragma HP_ALIGN

>error #4205-D: HP_ALIGN pragma is no longer supported
>#pragma HP_ALIGN HPUX_NATURAL

If that's the only HP_ALIGN pragma, you should remove it, it's the default.
6 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: about #pragma HP_ALIGN

>error #4205-D: HP_ALIGN pragma is no longer supported
>#pragma HP_ALIGN HPUX_NATURAL

If that's the only HP_ALIGN pragma, you should remove it, it's the default.
Frequent Advisor

Re: about #pragma HP_ALIGN

I remove the #pragma HP_ALIGN ... and I can compile the file, and I get to a succesfull compilation. But now returns warnings like these.

"cgPonerBPR.c", line 2: warning #2161-D: unrecognized #pragma
#pragma WIDTH 100
^
and the same warning with this #pragma declarations.

#pragma WIDTH 100
#pragma LINES 80
#pragma PAGE
#pragma LIST OFF

#pragma LIST ON.

However I have had a succesfull compilation, but now I have the following problem and i don't Know if it's related to those warnigns or related to the fact of have been removed the #pragma HP_ALIGN HPUX_NATURAL
The error apears when the Makefile starts linking the .o with the libraries.

cc -L /usr/lib/X11R6 -o ../../bin/ivibuild ivibuild.o cgPonerBPR.o ../..
/lib/libIVIbuild.a \
../../lib/libZtddServ.a ../../lib/libZt.a \
/obras/master/IHM/VI/lib/libcgInterface.a \
../../lib/libXwnlio.a ../../lib/libXw.a ../../lib/libXtR2.a -lX1
1 -lm
ld: Mismatched ABI (not an ELF file) for /obras/master/IHM/VI/lib/libcgInterface
.a
Fatal error.
*** Error exit code 1

I think I'm a bit lost with it, because I don't undestrand well the problem but i think it's related with te compilation mode and with the architecture, maybe somewhere I have something compiled under /opt/XPADE or maybe other architectured options.

Thanks!


Acclaimed Contributor Acclaimed Contributor

Re: about #pragma HP_ALIGN

>warning #2161-D: unrecognized #pragma
#pragma WIDTH 100, LINES 80, PAGE, LIST OFF|ON

These listing pragmas aren't available on aC++, ignore them.

>I don't know if it's related to the fact of have been removed the #pragma HP_ALIGN HPUX_NATURAL

That would cause a runtime error, not a link error.

>ld: Mismatched ABI (not an ELF file) for /obras/master/IHM/VI/lib/libcgInterface.a

This isn't a valid ELF archive, remove it and build.

>maybe somewhere I have something compiled under /opt/XPADE or maybe other architecture options.

You don't want to use XPADE unless developing for PA.
Frequent Advisor

Re: about #pragma HP_ALIGN

I have find which could be the problem, in the library libcgInterface.a, all the files which generates it have as firs line the #pragma HP_ALIG HPUX_NATURAL.
I think that it could be what generates the error the error I described in the last post.
I'm have the sources of this library and I'm going to try to generate it again removing the HP_ALIGN pragma.

I could be doing a correct supposition?

Thanks again!
Acclaimed Contributor Acclaimed Contributor

Re: about #pragma HP_ALIGN

>removing the HP_ALIGN pragma. I could be doing a correct supposition?

Yes, remove them.
Highlighted
Frequent Advisor

Re: about #pragma HP_ALIGN

Thaks everybody