Dick Beyer
2005-Oct-25 20:22 UTC
[Rd] error from make: gcc -shared -L/usr/local/lib64 ... relocation R_X86_64_32...
I hope someone can point me, a newcomer to building R as well as 64-bit R, in a useful direction. I have a dual Opteron 275 box running RedHat EL4. I ran configure successfully, and, then, get the following error while running make: make[4]: Entering directory `/tmp/R-2.2.0/src/modules/lapack' g77 -fPIC -g -O2 -ffloat-store -c dlamc.f -o dlamc.lo g77 -fPIC -g -O2 -c dlapack0.f -o dlapack0.lo g77 -fPIC -g -O2 -c dlapack1.f -o dlapack1.lo g77 -fPIC -g -O2 -c dlapack2.f -o dlapack2.lo g77 -fPIC -g -O2 -c dlapack3.f -o dlapack3.lo g77 -fPIC -g -O2 -c cmplx.f -o cmplx.lo g77 -fPIC -g -O2 -c cmplxblas.f -o cmplxblas.lo gcc -shared -L/usr/local/lib64 -o libRlapack.so dlamc.lo dlapack0.lo dlapack1.lo dlapack2.lo dlapack3.lo cmplx.lo cmplxblas.lo -lg2c -lm -lgcc_s /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a(s_cat.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a: could not read symbols: Bad value collect2: ld returned 1 exit status make[4]: *** [libRlapack.so] Error 1 I am confused by the error message "recompile with -fPIC" since it looks like all the lapack routines are already being compiled with -fPIC. I did struggle with getting all the right development packages installed, so maybe I am missing some critical package? Any help, suggestions, or pointers to 64-bit RedHat EL4 would be greatly appreciated. Thanks very much, Dick ******************************************************************************* Richard P. Beyer, Ph.D. University of Washington Tel.:(206) 616 7378 Env. & Occ. Health Sci. , Box 354695 Fax: (206) 685 4696 4225 Roosevelt Way NE, # 100 Seattle, WA 98105-6099 http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html http://staff.washington.edu/~dbeyer
Prof Brian Ripley
2005-Oct-25 20:44 UTC
[Rd] error from make: gcc -shared -L/usr/local/lib64 ... relocation R_X86_64_32...
It is libg2c.a you are being told to recompile. There ought to be a lib2gc.so* on your system. On FC3 gannet% rpm -q --whatprovides /usr/lib/libg2c.so.0 libf2c-3.4.4-2.fc3 gannet% rpm -q --filesbypkg libf2c-3.4.4-2.fc3 libf2c /usr/lib/libg2c.so.0 libf2c /usr/lib/libg2c.so.0.0.0 which looks like the problem if it is missing. On Tue, 25 Oct 2005, Dick Beyer wrote:> I hope someone can point me, a newcomer to building R as well as 64-bit > R, in a useful direction. I have a dual Opteron 275 box running RedHat > EL4. I ran configure successfully, and, then, get the following error > while running make: > > make[4]: Entering directory `/tmp/R-2.2.0/src/modules/lapack' > g77 -fPIC -g -O2 -ffloat-store -c dlamc.f -o dlamc.lo > g77 -fPIC -g -O2 -c dlapack0.f -o dlapack0.lo > g77 -fPIC -g -O2 -c dlapack1.f -o dlapack1.lo > g77 -fPIC -g -O2 -c dlapack2.f -o dlapack2.lo > g77 -fPIC -g -O2 -c dlapack3.f -o dlapack3.lo > g77 -fPIC -g -O2 -c cmplx.f -o cmplx.lo > g77 -fPIC -g -O2 -c cmplxblas.f -o cmplxblas.lo > gcc -shared -L/usr/local/lib64 -o libRlapack.so dlamc.lo dlapack0.lo > dlapack1.lo dlapack2.lo dlapack3.lo cmplx.lo cmplxblas.lo -lg2c -lm -lgcc_s > /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a(s_cat.o): > relocation R_X86_64_32 against `a local symbol' can not be used when making a > shared object; recompile with -fPIC > /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a: could not read symbols: Bad > value > collect2: ld returned 1 exit status > make[4]: *** [libRlapack.so] Error 1 > > > I am confused by the error message "recompile with -fPIC" since it looks like > all the lapack routines are already being compiled with -fPIC. I did struggle > with getting all the right development packages installed, so maybe I am > missing some critical package? > > Any help, suggestions, or pointers to 64-bit RedHat EL4 would be greatly > appreciated.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Peter Dalgaard
2005-Oct-25 20:48 UTC
[Rd] error from make: gcc -shared -L/usr/local/lib64 ... relocation R_X86_64_32...
Dick Beyer <dbeyer at u.washington.edu> writes:> I hope someone can point me, a newcomer to building R as well as 64-bit R, in > a useful direction. I have a dual Opteron 275 box running RedHat EL4. I ran > configure successfully, and, then, get the following error while running make: > > make[4]: Entering directory `/tmp/R-2.2.0/src/modules/lapack' > g77 -fPIC -g -O2 -ffloat-store -c dlamc.f -o dlamc.lo > g77 -fPIC -g -O2 -c dlapack0.f -o dlapack0.lo > g77 -fPIC -g -O2 -c dlapack1.f -o dlapack1.lo > g77 -fPIC -g -O2 -c dlapack2.f -o dlapack2.lo > g77 -fPIC -g -O2 -c dlapack3.f -o dlapack3.lo > g77 -fPIC -g -O2 -c cmplx.f -o cmplx.lo > g77 -fPIC -g -O2 -c cmplxblas.f -o cmplxblas.lo > gcc -shared -L/usr/local/lib64 -o libRlapack.so dlamc.lo dlapack0.lo > dlapack1.lo dlapack2.lo dlapack3.lo cmplx.lo cmplxblas.lo -lg2c -lm -lgcc_s > /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a(s_cat.o): > relocation R_X86_64_32 against `a local symbol' can not be used when making a > shared object; recompile with -fPIC > /usr/lib/gcc/x86_64-redhat-linux/3.4.4/libg2c.a: could not read symbols: Bad > value > collect2: ld returned 1 exit status > make[4]: *** [libRlapack.so] Error 1 > > > I am confused by the error message "recompile with -fPIC" since it looks like > all the lapack routines are already being compiled with -fPIC. I did struggle > with getting all the right development packages installed, so maybe I am > missing some critical package? > > Any help, suggestions, or pointers to 64-bit RedHat EL4 would be greatly > appreciated.I have a faint bell ringing in the distance... The proximate cause is that the static libg2c.a is being picked up and it is likely not -fPIC compiled (which is important on 64bit but AFAIR you get away with it on 32bit). Now why is it that this happens... Is there a libg2c.so around? - O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Dick Beyer
2005-Oct-25 22:32 UTC
[Rd] error from make: gcc -shared -L/usr/local/lib64 ... relocation R_X86_64_32...
Dear Peter and Brian, I have made progress. I removed libf2c and installed it again. Then libg2c.so.0 ended up in /usr/lib64. make is getting much further now. I think I had a messed up installation of the development packages, maybe. Weird. Anyway, I appreciate all your great help. Cheers, Dick ******************************************************************************* Richard P. Beyer, Ph.D. University of Washington Tel.:(206) 616 7378 Env. & Occ. Health Sci. , Box 354695 Fax: (206) 685 4696 4225 Roosevelt Way NE, # 100 Seattle, WA 98105-6099 http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html http://staff.washington.edu/~dbeyer ******************************************************************************* On 26 Oct 2005, Peter Dalgaard wrote:> Dick Beyer <dbeyer at u.washington.edu> writes: > >> Hi Peter, >> >> Thanks very much for your help. >> >> I did a up2date libf2c, and see that I already had libf2c on my system: >> >> [root at localhost 3.4.4]# rpm -q --whatprovides /usr/lib/libg2c.so.0 >> libf2c-3.4.4-2 >> [root at localhost 3.4.4]# rpm -q --filesbypkg libf2c-3.4.4-2 >> libf2c /usr/lib/libg2c.so.0 libf2c >> /usr/lib/libg2c.so.0.0.0 >> >> Is there something I haven't done with config.site or some Make* file >> so make will not get libg2c.a instead of libg2c.so.0.0.0? > > Hmm, pretty odd if the linker doesn't pick up .so files in /usr/lib. > > It's a bit of a longshot, but is it registered in the dynamic > linker cache? As in > > [pd at titmouse ~]$ /sbin/ldconfig -p | grep g2c > libg2c.so.0 (libc6) => /usr/lib/libg2c.so.0 > > > -- > O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B > c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K > (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 > ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 >