[Rcpp-devel] compiling error

Dirk Eddelbuettel edd at debian.org
Mon May 3 22:57:39 CEST 2010


On 3 May 2010 at 16:26, chuan gao wrote:
| Hi All,
| I am working on redhat enterprise 5. I installed R by enabling the shared
| library by the following command,
| ./configure --enable-R-shlib
| make 
| make install

Did you also uninstall the previous version of R?
 
| and I tried to install RInside by 
| 
| svn checkout svn://svn.r-forge.r-project.org/svnroot/rinside

As mentioned, you may be better off with CRAN for Rcpp and RInside.
 
| cd rinside/
| 
| R CMD INSTALL pkg
| 
| 
| and i got the following error
| 
| 
| * installing to library \u2018/usr/local/lib64/R/library\u2019
| 
| * installing *source* package \u2018RInside\u2019 ...
| 
| ** libs
| 
| ** arch - 
| 
| /usr/local/lib64/R/bin/R --vanilla --slave < tools/RInsideEnvVars.r >
| RInsideEnvVars.h
| 
| /usr/local/lib64/R/bin/R --vanilla --slave < tools/RInsideAutoloads.r >
| RInsideAutoloads.h
| 
| g++ -I/usr/local/lib64/R/include  -I/usr/local/lib64/R/include -I/usr/local/
| lib64/R/library/Rcpp/lib     -fpic  -I. -I/usr/local/lib64/R/include -g -O2
| -c MemBuf.cpp -o MemBuf.o
| 
| g++ -I/usr/local/lib64/R/include  -I/usr/local/lib64/R/include -I/usr/local/
| lib64/R/library/Rcpp/lib     -fpic  -I. -I/usr/local/lib64/R/include -g -O2
| -c RInside.cpp -o RInside.o
| 
| g++ -o libRInside.so  MemBuf.o RInside.o -shared   -L/usr/local/lib64/R/lib
| -lR
| 
| /usr/bin/ld: cannot find -lR
| 
| collect2: ld returned 1 exit status
| 
| make: *** [libRInside.so] Error 1
| 
| ERROR: compilation failed for package \u2018RInside\u2019
| 
| * removing \u2018/usr/local/lib64/R/library/RInside\u2019
| 
| * restoring previous \u2018/usr/local/lib64/R/library/RInside\u2019
| 
| 
| can anybody help? Thanks!

If you know how tools like configure etc work, it is pretty obvious.  It
tried to link 

 g++ -o libRInside.so  MemBuf.o RInside.o -shared   -L/usr/local/lib64/R/lib -lR

and libR.so is not in that directory.

Before you run off and copy files around, consider reading up on the 'R
Installation + Admin' manual.


-- 
  Regards, Dirk


More information about the Rcpp-devel mailing list