Page 1 of 1

relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recomp

Posted: 2010/04/14 18:15:26
by saurabhchokshi
Hello All,

I want to port 32-bit application on 64-bit Centos 5.3 platform. i.e. converting 32-bit app into 64-bit app. I am compiling this app on 32-bit Centos 5.3, it works fine.

However, when I compiled on 64-bit platform, it gives the error message:

ld -shared -soname xx.so.1 -o xx.so.1.0 -lc tmp/privy.o tmp/privy_access.o
ld: tmp/xx.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
tmp/xx.o: could not read symbols: Bad value
make: *** [xx.so.1.0] Error 1

I have also tried with -fPIC option, then it says the file xx.so.1 not found.

Could you please help me out to resolve this issue?

Thanks,
Saurabh

relocation R_X86_64_32S against `a local symbol' can not be

Posted: 2010/04/16 13:30:05
by pschaff
The first thing to try is updating to the current release 5.4, soon to be 5.5. 5.3 has numerous known bugs and security issues. Obsolete releases are not supported, nor is it advisable to be running them. You should update, following the procedure in section 4 of the [url=http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.4]CentOS 5.4 Release Notes[/url] to avoid glibc related problems.

If still having problems after the update you may need to provide more details including code or code fragments, and/or makefile, that generate the error.