|
| View previous topic :: View next topic |
| Author |
Message |
kzhu
Joined: 03 Jun 2013 Posts: 3
|
Posted: Thu Jun 06, 2013 7:05 am Post subject: pgc++ - relocation R_X86_64_PC32 against "..." can |
|
|
Hi all,
I used pgc++ to create the object files, (with -fPIC flag for all object files). At the linking stage, I received the following error message.
| Code: |
/home/kzhu/pgi/linux86-64/13.5/bin/pgc++ -shared -o libcore.so
-pthread -m64 -L/home/kzhu/pgi/linux86-64/13.5/lib64 -fPIC -lpthread -lc -lm -lcrypt -lrt -ldl -rpath /some_path xxx.o yyy.o zzz.o
... ...
/usr/bin/ld: zzz.o: relocation R_X86_64_PC32 against `... ...' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
*** Error code 2
|
Any suggestion on possible cause of this linking error is appreciated. For the reference, the linker that I used is
| Code: |
-bash-3.2$ /usr/bin/ld --version
GNU ld version 2.17.50.0.6-20.el5_8.3 20061020
Copyright 2005 Free Software Foundation, Inc.
|
Many thanks.
Kevin |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4995 Location: The Portland Group Inc.
|
Posted: Thu Jun 06, 2013 1:23 pm Post subject: |
|
|
Hi Kevin,
I typically see this error when you have a very large static array (>2GB) in the code. In this case, you need use the medium memory model (-mcmodel=medium).
If that doesn't work, I'll need you to send a report to PGI Customer Service (trs@pgroup.com) and include a reproducing example to determine the cause, or the the following information.
The output from:
pgc++ -c t.c -dryrun
As well as the post processed source files:
pgc++ -C -E <user_flags> xxx.c -o outx.i
pgc++ -C -E <user_flags> yyy.c -o outy.i
pgc++ -C -E <user_flags> zz.c -o outz.i
Note that pgc++ doesn't accept the "-pthread" flag, hence you should be getting a compilation error if you use it.
- Mat |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|