[Rcpp-devel] compiling Rcpp with 3.0.1 on Solaris 10

MAYER Hans mayer at iiasa.ac.at
Mon Jun 24 16:30:58 CEST 2013



Hello 

My colleagues asked me to install "R" with module "shiny". 
R version 3.0.1 compiled fine on Solaris 10 and is running well. 

I tried to install "shiny". With the dependencies "Rcpp" should be installed before. But the compile step did fail. See below. 
The initial error message is "Error in dyn.load(file, DLLpath = DLLpath, ...) :" 
Before there are some warning. The final problem is, that the shared library Rcpp.so was not generated.

I am not familiar with R but I  could manage to compile a lot of source code on Solaris. Very often it's only a small change in Makefile or source code. 
Is there a way to compile "Rcpp" manually step by step  ? 
It seems, that the file Rcpp.so is removed before it is used for linking. ( See line rm libRcpp.so libRcpp.a ) 
How-to fix this problem. I am sure, it's not a major issue. 

Kind regards
Hans




# R CMD INSTALL Rcpp
* installing to library '/usr/local/lib/R/library'
* installing *source* package 'Rcpp' ...
** libs
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c Date.cpp -o Date.o
Date.cpp: In member function `void Rcpp::Date::update_tm()':
Date.cpp:108: warning: converting to `time_t' from `double'
Date.cpp: In member function `double Rcpp::Date::mktime00(tm&) const':
Date.cpp:134: warning: converting to `int' from `double'
Date.cpp:137: warning: converting to `int' from `double'
Date.cpp: In function `Rcpp::Date Rcpp::operator+(const Rcpp::Date&, int)':
Date.cpp:164: warning: converting to `time_t' from `double'
Date.cpp: In function `tm* Rcpp::timesub(const time_t*, long int, const Rcpp::state*, tm*)':
Date.cpp:1523: warning: converting to `long int' from `double'
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c Module.cpp -o Module.o
gcc -std=gnu99 -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c Rcpp_init.c -o Rcpp_init.o
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c Timer.cpp -o Timer.o
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c api.cpp -o api.o
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c attributes.cpp -o attributes.o
attributes.cpp: In member function `std::vector<Rcpp::attributes::Param, std::allocator<Rcpp::attributes::Param> > Rcpp::attributes::SourceFileAttributesParser::parseParameters(const std::string&)':
attributes.cpp:986: warning: converting of negative value `-0x00000000000000001' to `size_t'
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c barrier.cpp -o barrier.o
g++ -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -I/usr/sfw/include -I/opt/sfw/include    -fPIC  -g -O2  -c exceptions.cpp -o exceptions.o
g++ -shared -L/usr/local/lib -L/usr/sfw/lib -L/opt/sfw/lib -L/opt/solarisstudio12.3/lib -L/opt/solarisstudio12.3/prod/lib -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared
ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
cp libRcpp.so ../inst/lib
cp libRcpp.a ../inst/lib
rm libRcpp.so libRcpp.a
installing to /usr/local/lib/R/library/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   'Rcpp-FAQ.Rnw'
   'Rcpp-attributes.Rnw'
   'Rcpp-extending.Rnw'
   'Rcpp-introduction.Rnw'
   'Rcpp-modules.Rnw'
   'Rcpp-package.Rnw'
   'Rcpp-sugar.Rnw'
   'Rcpp-unitTests.Rnw'
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/library/Rcpp/libs/Rcpp.so':
  ld.so.1: R: fatal: relocation error: file /usr/local/lib/R/library/Rcpp/libs/Rcpp.so: symbol backtrace: referenced symbol not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/usr/local/lib/R/library/Rcpp'
amur1:root>
amur1:root>
amur1:root> R CMD INSTALL Rcpp
* installing to library '/usr/local/lib/R/library'
* installing *source* package 'Rcpp' ...
** libs
g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared
ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
cp libRcpp.so ../inst/lib
cp libRcpp.a ../inst/lib
rm libRcpp.so libRcpp.a
installing to /usr/local/lib/R/library/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
   'Rcpp-FAQ.Rnw'
   'Rcpp-attributes.Rnw'
   'Rcpp-extending.Rnw'
   'Rcpp-introduction.Rnw'
   'Rcpp-modules.Rnw'
   'Rcpp-package.Rnw'
   'Rcpp-sugar.Rnw'
   'Rcpp-unitTests.Rnw'
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/library/Rcpp/libs/Rcpp.so':
  ld.so.1: R: fatal: relocation error: file /usr/local/lib/R/library/Rcpp/libs/Rcpp.so: symbol backtrace: referenced symbol not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing '/usr/local/lib/R/library/Rcpp'



-- 




More information about the Rcpp-devel mailing list