Package compiling problem in Linux

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Package compiling problem in Linux

Waichler, Scott R

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:

> R.version.string
[1] "R version 2.2.1, 2005-12-20"
> install.packages("akima", lib="/usr/lib/R/library", repos =
"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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Package compiling problem in Linux

Prof Brian Ripley
On Mon, 13 Feb 2006, Waichler, Scott R wrote:

> I am trying to install packages in R-2.2.1 on a Redhat WS4 system.  I

What architecture is this?  How did you install R?

> get the following error messages trying to install, for example, the
> akima package:
>
>> R.version.string
> [1] "R version 2.2.1, 2005-12-20"
>> install.packages("akima", lib="/usr/lib/R/library", repos =
> "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?

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.

--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Package compiling problem in Linux

Waichler, Scott R
In reply to this post by Waichler, Scott R
> 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.

This is exactly what happened.  Now I know to use 'uname -a' to check
machine architecture first.  I was able to install the x86_64 version
and then packages successfully.

Thanks very much,
Scott Waichler

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html