When trying to install Rcpp 0.10.2 with

$ R --version
R Under development (unstable) (2012-12-18 r61372) -- "Unsuffered Consequences"
$ clang++ --version
Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0)
Target: x86_64-pc-linux-gnu
Thread model: posix

I get

$ R CMD INSTALL Rcpp_0.10.2.tar.gz
...
clang++ -I/home/mtmorgan/bin/R-devel/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c Timer.cpp -o Timer.o
...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/2.16/Rcpp/libs/Rcpp.so': /home/mtmorgan/R/x86_64-unknown-linux-gnu-library/2.16/Rcpp/libs/Rcpp.so: undefined symbol: clock_gettime
Error: loading failed

From man clock_gettime I have

...
       Link with -lrt.

and adding PKG_LIBS += -lrt to src/Makevars addresses the problem for me, but I'm not sure that is a universal solution? Also, I had an identical problem with another package (Matrix, since corrected) so there is perhaps something a-typical about my configuration.

Martin
--
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793
_______________________________________________
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

Reply via email to