Skip to content
Prev 2245 / 10988 Next

[Rcpp-devel] Unable to install RcppArmadillo from CRAN or from SVN archive on Ubuntu 10.10

OK, this is bizarre.  I am able to install the RcppArmadillo package
on my current setup provided that I turn on optimization in the call
to g++ to compile RcppArmadillo.cpp.  The only difference between the
following two calls is the -O3 flag.  (I haven't tried other levels of
optimization yet but presumably it would work with -O and -O2).
Compare the following

bates at bates3:/tmp$ R CMD INSTALL RcppArmadillo_0.2.19.1.tar.gz
* installing to library ?/home/bates/R/x86_64-unknown-linux-gnu-library/2.13?
* installing *source* package ?RcppArmadillo? ...
** libs
g++ -I/usr/share/R/include
-I"/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/include"
-I../inst/include -fpic  -g -O3 -Wall -pipe -pedantic -c
RcppArmadillo.cpp -o RcppArmadillo.o
g++ -I/usr/share/R/include
-I"/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/include"
-I../inst/include -fpic  -g -O3 -Wall -pipe -pedantic -c fastLm.cpp -o
fastLm.o
g++ -shared -o RcppArmadillo.so RcppArmadillo.o fastLm.o
-L/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/lib -lRcpp
-Wl,-rpath,/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/lib
-llapack -lblas -lgfortran -lm -L/usr/lib64/R/lib -lR
installing to /home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded

* DONE (RcppArmadillo)
bates at bates3:/tmp$ R CMD INSTALL RcppArmadillo_0.2.19.1.tar.gz
* installing to library ?/home/bates/R/x86_64-unknown-linux-gnu-library/2.13?
* installing *source* package ?RcppArmadillo? ...
** libs
g++ -I/usr/share/R/include
-I"/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/include"
-I../inst/include -fpic  -g -Wall -pipe -pedantic -c RcppArmadillo.cpp
-o RcppArmadillo.o
g++ -I/usr/share/R/include
-I"/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/include"
-I../inst/include -fpic  -g -Wall -pipe -pedantic -c fastLm.cpp -o
fastLm.o
g++ -shared -o RcppArmadillo.so RcppArmadillo.o fastLm.o
-L/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/lib -lRcpp
-Wl,-rpath,/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/Rcpp/lib
-llapack -lblas -lgfortran -lm -L/usr/lib64/R/lib -lR
installing to /home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo/libs/RcppArmadillo.so':
  /home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo/libs/RcppArmadillo.so:
undefined symbol: _ZN4arma12arma_version5majorE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ?/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo?
* restoring previous
?/home/bates/R/x86_64-unknown-linux-gnu-library/2.13/RcppArmadillo?
On Fri, Apr 29, 2011 at 9:32 AM, Jan de Leeuw <deleeuw at stat.ucla.edu> wrote: