[Rcpp-devel] g++-llvm still doesn't like RcppArmadillo?

Davor Cubranic cubranic at stat.ubc.ca
Fri Dec 23 20:03:30 CET 2011


Did we ever find a way to make RcppArmadillo compile with g++-llvm 
on OS X Lion?

There was a thread in July about unresolved 'arma_version' symbol 
(http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-July/002621.html), 
and it appears the only way around it was by compiling with the 
vanilla g++.

I just ran into the same error, using R installed from MacPorts as 
the R-framework port. This uses the llvm-g++-4.2 toolchain, so 
getting it to use apple-g++ to compile just RcppArmadillo would 
probably require manual fiddling with the configure step, which I 
would prefer to avoid given that this is on a compute cluster where 
we're automating software installation and upgrading.

Also, does anyone know if this will mean that every package that 
depends on RcppArmadillo will have to avoid using LLVM as well?

Installation output below:

* installing *source* package 'RcppArmadillo' ...
** package 'RcppArmadillo' successfully unpacked and MD5 sums 
checked
** libs
*** arch - x86_64
/opt/local/bin/llvm-g++-4.2 
-I/opt/local/Library/Frameworks/R.framework/Resources/include 
-I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 
-I/opt/local/include 
-I"/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
-I../inst/include -fPIC  -pipe -O2 -m64 -c RcppArmadillo.cpp -o 
RcppArmadillo.o
/opt/local/bin/llvm-g++-4.2 
-I/opt/local/Library/Frameworks/R.framework/Resources/include 
-I/opt/local/Library/Frameworks/R.framework/Resources/include/x86_64 
-I/opt/local/include 
-I"/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" 
-I../inst/include -fPIC  -pipe -O2 -m64 -c fastLm.cpp -o fastLm.o
/opt/local/bin/llvm-g++-4.2 -dynamiclib 
-Wl,-headerpad_max_install_names -undefined dynamic_lookup 
-single_module -multiply_defined suppress -L/opt/local/lib 
-L/opt/local/lib/llvm-gcc42 -lgfortran -o RcppArmadillo.so 
RcppArmadillo.o fastLm.o 
/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/lib/x86_64/libRcpp.a 
-L/opt/local/Library/Frameworks/R.framework/Resources/lib/x86_64 
-lRlapack 
-L/opt/local/Library/Frameworks/R.framework/Resources/lib/x86_64 
-lRblas -F/opt/local/Library/Frameworks/R.framework/.. -framework R 
-Wl,-framework -Wl,CoreFoundation
installing to 
/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo/libs/x86_64
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
*** tangling vignette sources ...
    'RcppArmadillo-unitTests.Rnw'
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object 
'/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo/libs/x86_64/RcppArmadillo.so':

dlopen(/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo/libs/x86_64/RcppArmadillo.so, 
6): Symbol not found: __ZN4arma12arma_version5majorE
   Referenced from: 
/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo/libs/x86_64/RcppArmadillo.so
   Expected in: flat namespace
  in 
/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo/libs/x86_64/RcppArmadillo.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing 
'/opt/local/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RcppArmadillo'

The downloaded packages are in
         '/private/tmp/RtmpXwDIXY/downloaded_packages'
Warning message:
In install.packages("RcppArmadillo") :
   installation of package 'RcppArmadillo' had non-zero exit status



More information about the Rcpp-devel mailing list