A bit off topic, but having trouble again with the 64-bit libs when trying to compile this short fortran code to build a shared object. Can anyone offer an explaination of what is meant by the relocation bit, and how to fix it? I've tried the -fPIC, but apparently I either didn't have it in the right place or it does not work. Be glad to take this offline if somone could help me. Here's the output from the compile.... Hostid: PGI=003048E02E69493B247282 fortran routine compiled create shared library... /usr/bin/ld: wrf_user_fortran_util_0.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC wrf_user_fortran_util_0.o: could not read symbols: Bad value error in load, error exit -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20051010/6170b8cb/attachment-0002.html>
Hi Sam: Some library somewhere is using a different ABI than you expect. Do a file wrf_user_fortran_util_0.o and against any of the shared/static objects you are linking against. Make sure you have the right -L options. I got this when I had a stale build of something. I had to rebuild the application after cleaning out the old libs/objects (a simple make clean often helps). Joe Sam Drinkard wrote:> A bit off topic, but having trouble again with the 64-bit libs when > trying to compile this short fortran code to build a shared object. Can > anyone offer an explaination of what is meant by the relocation bit, and > how to fix it? I've tried the -fPIC, but apparently I either didn't > have it in the right place or it does not work. Be glad to take this > offline if somone could help me. Here's the output from the compile.... > > Hostid: PGI=003048E02E69493B247282 > fortran routine compiled > create shared library... > /usr/bin/ld: wrf_user_fortran_util_0.o: relocation R_X86_64_32 against > `a local symbol' can not be used when making a shared object; recompile > with -fPIC > wrf_user_fortran_util_0.o: could not read symbols: Bad value > error in load, error exit > > > ------------------------------------------------------------------------ > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos-- Joseph Landman, Ph.D Founder and CEO Scalable Informatics LLC, email: landman at scalableinformatics.com web : http://www.scalableinformatics.com phone: +1 734 786 8423 fax : +1 734 786 8452 cell : +1 734 612 4615
On Mon, 2005-10-10 at 17:11 -0400, Sam Drinkard wrote:> A bit off topic, but having trouble again with the 64-bit libs when > trying to compile this short fortran code to build a shared object. > Can anyone offer an explaination of what is meant by the relocation > bit, and how to fix it? I've tried the -fPIC, but apparently I either > didn't have it in the right place or it does not work. Be glad to > take this offline if somone could help me. Here's the output from the > compile.... > > Hostid: PGI=003048E02E69493B247282 > fortran routine compiled > create shared library... > /usr/bin/ld: wrf_user_fortran_util_0.o: relocation R_X86_64_32 against > `a local symbol' can not be used when making a shared object; > recompile with -fPIC > wrf_user_fortran_util_0.o: could not read symbols: Bad value > error in load, error exitIt has to do with the .a or .o file you're linking against, in this case wrf_user_fortran_util_0.o. That object needs to use -fPIC when being built. -- Ignacio Vazquez-Abrams <ivazquez at ivazquez.net> http://centos.ivazquez.net/ gpg --keyserver hkp://subkeys.pgp.net --recv-key 38028b72 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20051010/05aba19e/attachment-0002.sig>