[Rd] error from make: gcc -shared -L/usr/local/lib64 ... relocation R_X86_64_32...

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Oct 25 22:44:57 CEST 2005


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



More information about the R-devel mailing list