(Conrad, This started as this thread http://thread.gmane.org/gmane.comp.lang.r.rcpp/1877 which picks up the issue first reported by Jan regaring arma_version not being found by the linker and which you commented on so colourfully a few days ago.)
On 28 April 2011 at 13:38, Jan de Leeuw wrote: | And I have armadillo-1.2.0 compiled from source on the Mac in /usr/local | | But removing the include and lib files does not help So just as a reference point, I did have Ubuntu's libarmadillo(0,-dev-doc) installed but both before and after purgeing them, I can do 'R CMD check RcppArmadillo' just fine against the SVN sources. Dito for R CMD INSTALL. So I don't what's going on -- there should not be an issue building this. And on my end (and Romain's for that matter) it worked before and after the suggested by Conrad to use arma::version::major etc directly. So I really don't know a) what is going on with Doug's setup as I use a very similar machine / setup on my Ubuntu box --- but then Doug unfortunately had build issues with related code on his box but not on mine, and b) what is going on Jan's Mac -- other than Conrad's earlier colourful remarks about maybe something being fishy with the OS X compiler, but that is just a guess too. Also, a simple check (see below) builds fine here. The RcppArmadillo package really does nothing much different than this check: access the elements of that struct. So I remain rather puzzled. One local build issue I could live with, but that both Doug and Jan have issues is a little strange. But as I said: nothing I can replicate at my end. This should just work. Dirk edd@max:~/svn/rcpp/pkg/RcppArmadillo/inst/include$ cat /tmp/quickCheck.cpp #include <armadillo> int main(void) { std::cout << "Seeing " << arma::arma_version::major << "." << arma::arma_version::minor << "." << arma::arma_version::patch << std::endl; } edd@max:~/svn/rcpp/pkg/RcppArmadillo/inst/include$ g++ -I. -o /tmp/quickCheck /tmp/quickCheck.cpp edd@max:~/svn/rcpp/pkg/RcppArmadillo/inst/include$ /tmp/quickCheck Seeing 1.2.0 edd@max:~/svn/rcpp/pkg/RcppArmadillo/inst/include$ | On Apr 28, 2011, at 13:26 , Douglas Bates wrote: | | > I just realized what is probably happening. I have the Ubuntu | > armadillo package installed and that version of the header files may | > be being picked up ahead of the version in the package. | > | > On Thu, Apr 28, 2011 at 3:24 PM, Dirk Eddelbuettel <e...@debian.org> wrote: | >> | >> Hi Doug, | >> | >> We're in the middle of our Rcpp workshop so this is timely :) | >> | >> On 28 April 2011 at 14:53, Douglas Bates wrote: | >> | I have been facing this problem for months now and I still don't know | >> | why other users of Ubuntu 10.10 using | >> | | >> | $ g++ --version | >> | g++ (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 | >> | Copyright (C) 2010 Free Software Foundation, Inc. | >> | This is free software; see the source for copying conditions. There is NO | >> | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | >> | | >> | can install RcppArmadillo and I can't. Most recently I tried to | >> | install the source package from CRAN and got the same error as I have | >> | been getting for months. | >> | | >> | | >> | > install.packages("RcppArmadillo", repos="http://cran.fhcrc.org") | >> | Installing package(s) into ‘/home/bates/R/x86_64-unknown-linux-gnu-library/2.13’ | >> | (as ‘lib’ is unspecified) | >> | trying URL 'http://cran.fhcrc.org/src/contrib/RcppArmadillo_0.2.19.tar.gz' | >> | Content type 'application/x-gzip' length 259638 bytes (253 Kb) | >> | opened URL | >> | ================================================== | >> | downloaded 253 Kb | >> | | >> | * installing *source* package ‘RcppArmadillo’ ... | >> | ** libs | >> | ccache 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 | >> | ccache 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 | >> | >> You know, Jan has the exact same issue and I blamed the Mac. Maybe the | >> difference is having Armadillo or not. This all works on my box, so could | >> you just install Ubuntu's armadillo package? | >> | >> It still works for me ... and that may be a part of the changes. | >> | >> Cheers from a seminar room at UIC, Dirk | >> | >> | 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’ | >> | | >> | The downloaded packages are in | >> | ‘/tmp/RtmpoJ3I0u/downloaded_packages’ | >> | Warning message: | >> | In install.packages("RcppArmadillo", repos = "http://cran.fhcrc.org") : | >> | installation of package 'RcppArmadillo' had non-zero exit status | >> | > sessionInfo() | >> | R version 2.13.0 (2011-04-13) | >> | Platform: x86_64-pc-linux-gnu (64-bit) | >> | | >> | locale: | >> | [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C | >> | [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 | >> | [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 | >> | [7] LC_PAPER=en_US.UTF-8 LC_NAME=C | >> | [9] LC_ADDRESS=C LC_TELEPHONE=C | >> | [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C | >> | | >> | attached base packages: | >> | [1] stats graphics grDevices utils datasets methods base | >> | | >> | loaded via a namespace (and not attached): | >> | [1] tools_2.13.0 | >> | | >> | | >> | The version of the source file RcppArmadillo/src/RcppArmadillo.cpp | >> | that I have (SVN version 3012 for the file - the source code package | >> | is at SVN version 3023) does indeed use arma::version::major, | >> | arma::version:minor and arma::version::patch but they aren't defined | >> | any place that I can see. | >> | | >> | What am I missing here? | >> | _______________________________________________ | >> | 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 | >> | >> -- | >> Gauss once played himself in a zero-sum game and won $50. | >> -- #11 at http://www.gaussfacts.com | >> | > | | === | 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 | ------------------------------------------------------------------------------------------------- | | | | | -- Gauss once played himself in a zero-sum game and won $50. -- #11 at http://www.gaussfacts.com _______________________________________________ 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