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

Jan de Leeuw deleeuw at stat.ucla.edu
Fri Apr 29 19:07:42 CEST 2011


Interesting. Stabilizing a compile by using the optimization flags. The runs I reported
earlier (with Apple's g++-4.2, Apple's llvm g++-4.2, and g++-4.7 from svn)
all used the -O4 flag. Although the symptoms are the same as mine, it seems
the disease is different.

On Apr 29, 2011, at 09:59 , Douglas Bates wrote:

> 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:
>> Yes, well, this still does not explain why Doug gets the same error
>> on Ubuntu.
>> 
>> On Apr 29, 2011, at 07:23 , Conrad Sanderson wrote:
>> 
>>> On 29 April 2011 23:40, Jan de Leeuw <deleeuw at stat.ucla.edu> wrote:
>>>> So it may be the LLVM g++ compiler (note that this is
>>>> a developer version which has not been released yet,
>>>> comes with Xcode 4.1) or an unfortunate interaction
>>>> of that compiler with libraries in /usr/local.
>>> 
>>> I suggest filing a bug with Apple.  The LLVM compiler is rather fresh,
>>> and it appears that it's still not ready for production use.
>>> 
>>> Perhaps Apple is doing an elaborate public beta test with this
>>> developer version.  If so, one has to wonder whether Apple internally
>>> lacks sufficiently varied test cases.
>>> 
>> 
>> ===
>> Jan de Leeuw; Distinguished Professor and Chair, UCLA Department of Statistics;
>> Director: UCLA Center for Environmental Statistics (CES);
>> Editor: Journal of Multivariate Analysis, Journal of Statistical Software;
>> US mail: 8125 Math Sciences Bldg, Box 951554, Los Angeles, CA 90095-1554
>> phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw at stat.ucla.edu
>> .mac: jdeleeuw ++++++  aim: deleeuwjan ++++++ skype: j_deleeuw
>> homepages: http://gifi.stat.ucla.edu ++++++ http://www.cuddyvalley.org
>>  -------------------------------------------------------------------------------------------------
>>          No matter where you go, there you are. --- Buckaroo Banzai
>>                   http://gifi.stat.ucla.edu/sounds/nomatter.au
>>  -------------------------------------------------------------------------------------------------
>> 
>> 
>> 
>> 
>> 
>> 
> 

====================================================================
    Jan de Leeuw, 11667 Steinhoff Rd, Frazier Park, CA 93225
    home 661-245-1725 mobile 661-231-5416 work 310-825-9550
    .mac: jdeleeuw +++  aim: deleeuwjan +++ skype: j_deleeuw
====================================================================
If I wanted you to understand it, I would have explained it better.
                                                -- Johan Cruijff                                 
====================================================================













More information about the Rcpp-devel mailing list