Skip to content

Package compiling problem in Linux

2 messages · Waichler, Scott R, Brian Ripley

#
Hi,

I am trying to install packages in R-2.2.1 on a Redhat WS4 system.  I
get the following error messages trying to install, for example, the
akima package:
[1] "R version 2.2.1, 2005-12-20"
"http://cran.fhcrc.org/")
.
.
.
gcc -shared -L/usr/local/lib -o akima.so akima433.o akima697.o
akima.new.o idbvip.o idcldp.o idgrid.o idlctn.o idpdrv.o idptip.o
idptli.o idsfft.o idtang.o idxchg.o init.o tripack.o ttidbs.o  -lg2c -lm
-lgcc_s -L/usr/lib/R/lib -lR
/usr/bin/ld: skipping incompatible /usr/lib/R/lib/libR.so when searching
for -lR
/usr/bin/ld: cannot find -lR
collect2: ld returned 1 exit status
make: *** [akima.so] Error 1

I don't understand the -lR flag.  What is missing in the system toolkit?

Scott Waichler
Pacific Northwest National Laboratory
scott.waichler _at_ pnl.gov
#
On Mon, 13 Feb 2006, Waichler, Scott R wrote:

            
What architecture is this?  How did you install R?
It is not a flag: it is an instruction to link against libR.

The only way I can see this happening is if you installed a ix86 RPM on a 
x86_86 system.  You can do that and R will run, but you will not be able 
to build packages out of the box.

What I am quite sure about is that R was not built on the system you are 
running here, since this error would have occurred whilst building R.
The solution is to build R from the sources.