And I can get past R CMD check Rcpp if I include -O3 in CXXFLAGS.
On Fri, Apr 29, 2011 at 11:59 AM, Douglas Bates <ba...@stat.wisc.edu> 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@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@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 <dele...@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 <dele...@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: dele...@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 >> ------------------------------------------------------------------------------------------------- >> >> >> >> >> >> > _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel