Linker error on HP-UX with OpenMP

28 views
Skip to first unread message

Josh Hykes

unread,
May 19, 2015, 12:48:23 PM5/19/15
to gnu-f...@googlegroups.com
I am trying to use gfortran on our HP-UX B.11.31 ia64 machine. After several false starts, I was able to build gcc-4.7.4 using HP's aCC compiler (I had to disable java). 

Our code compiles with gfortran and runs successfully on the HP without OpenMP. (It compiles and runs okay with OpenMP on a variety of other platforms and compilers, including gfortran on linux.)

When I enable OpenMP with -fopenmp, the compilation fails in the linker stage with a series of errors like the following:

ld: The value 0xd01bf8 does not fit when applying the relocation TPREL22 or DTPREL22 for symbol "ainf.2311" at offset 0x14cf1 in section index 1 of file gendpx.o
ld
: The value 0xd01bf8 does not fit when applying the relocation TPREL22 or DTPREL22 for symbol "ainf.2311" at offset 0x14da0 in section index 1 of file gendpx.o

The array ainf is a save'd automatic array that is declared threadprivate. There is no GNU linker on HP-UX, so this is using the HP linker.

I am compiling with the following options:

-mlp64 -O2 -fconvert=big-endian -fbacktrace -ffpe-trap=invalid,zero,overflow -fPIC -fopenmp

I have tried a variety of gfortran and linker options, but none of them have allowed me to fix the above relocation error. Does anyone have any experience with this error message, or any suggestions that I could try?


Beliavsky

unread,
May 20, 2015, 8:55:56 AM5/20/15
to gnu-f...@googlegroups.com, jhy...@gmail.com
This newsgroup is not too active. If you don't get a reply soon, please consider posting to the gfortran mailing list fortran at gcc dot gnu dot org , which is primarily a venue for gfortran developers, or to comp.lang.fortran, which is also read by several gfortran developers.

Josh Hykes

unread,
May 22, 2015, 10:35:15 AM5/22/15
to gnu-f...@googlegroups.com
Thank you for the suggestion. I have posted this on the gfortran mailing list:

Reply all
Reply to author
Forward
0 new messages