[Rcpp-devel] g++-llvm still doesn't like RcppArmadillo?
Yan Zhou
zhouyan at me.com
Mon Dec 26 01:44:03 CET 2011
I guess many are moving towards llvm-gcc and clang. In fact r itself now compiles with clang and passes make check successfully on Lion, Xcode 4.2. Also clang is now the default compiler. Llvm-gcc/g++ are going to be dropped in a not too long time. gcc4.2 has already been dropped in xcode 4.2
Sometimes I have to stick with old gcc-4.2 and I believe many are in the same situation now and then. Clang is somehow stricter than g++ in many cases and is good for checking status conforming. The clang 3.0 shipped with Xcode 4.2 is quite production quality. Also I thin you don't have to get a Mac to solve the problem. You can get clang on Linux easily enough.
I don't think require a local gcc version other than compilers shipped with apple will be wise. System's default tool sets shall be supported whenever possible.
By the way, I found there are no problems of using armadillo with clang at all. But I don't know how RcppArmadillo is built. Though I cannot really help with the problem, but hope the information on compiler status on Mac will help some way. My suggestion is that support system default compilers whenever possible as that is what most people use. If they are not use clang now, they will start soon.
On Dec 23, 2011, at 11:39 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 23 December 2011 at 11:03, Davor Cubranic wrote:
> | 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.
>
> No idea, as I'm not a mac user I can't really help.
>
> Are OS X users / developers moving towards llvm, or towards local copies of
> newer g++ versions?
>
> Dirk
>
> | 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
> |
> | _______________________________________________
> | Rcpp-devel mailing list
> | Rcpp-devel at lists.r-forge.r-project.org
> | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
> --
> "Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
> dark to read." -- Groucho Marx
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
More information about the Rcpp-devel
mailing list