On 4 January 2011 at 07:04, Dirk Eddelbuettel wrote: | On 4 January 2011 at 12:02, Rainer Hurling wrote: | | On 03.01.2011 13:20 (UTC+1), Dirk Eddelbuettel wrote: | | As mentioned above build and install are successfull. But testing if | | installed package can be loaded fails: | | | | ------------------------------------------- | | [..SNIP..] | | g++ -shared -L/usr/local/lib -o Rcpp.so Date.o DateVector.o Datetime.o | | DatetimeVector.o Dimension.o DottedPair.o Environment.o Evaluator.o | | Formula.o Function.o Language.o Module.o Pairlist.o Promise.o RObject.o | | RcppCommon.o Rcpp_init.o Reference.o S4.o Symbol.o WeakReference.o | | barrier.o cache.o coerce.o complex.o debugging.o exceptions.o posixt.o | | r_cast.o | | This line should have -L/usr/lib64/R/lib -lR at the end. | | Odd. Is your R version built as a shared library? | | | g++ -o libRcpp.so Date.o DateVector.o Datetime.o DatetimeVector.o | | Dimension.o DottedPair.o Environment.o Evaluator.o Formula.o Function.o | | Language.o Module.o Pairlist.o Promise.o RObject.o RcppCommon.o | | Rcpp_init.o Reference.o S4.o Symbol.o WeakReference.o barrier.o cache.o | | coerce.o complex.o debugging.o exceptions.o posixt.o r_cast.o -shared | | Dito here. | | | ar qc libRcpp.a Date.o DateVector.o Datetime.o DatetimeVector.o | | Dimension.o DottedPair.o Environment.o Evaluator.o Formula.o Function.o | | Language.o Module.o Pairlist.o Promise.o RObject.o RcppCommon.o | | Rcpp_init.o Reference.o S4.o Symbol.o WeakReference.o barrier.o cache.o | | coerce.o complex.o debugging.o exceptions.o posixt.o r_cast.o | | cp libRcpp.so ../inst/lib | | cp libRcpp.a ../inst/lib | | rm libRcpp.so libRcpp.a | | installiert nach /usr/local/lib/R/library/Rcpp/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, ...) : | | kann shared object '/usr/local/lib/R/library/Rcpp/libs/Rcpp.so' nicht | | laden: | | /usr/local/lib/R/library/Rcpp/libs/Rcpp.so: Undefined symbol | | "backtrace_symbols" | | Fehler: loading failed | | * removing '/usr/local/lib/R/library/Rcpp' | | ------------------------------------------- | | | | I do not understand why 'backtrace_symbols' is undefined. In | | 'src/debugging.cpp' all seems to be ok? | | No, it is a system library function we use. From 'man backtrace_symbol' : | | BACKTRACE(3) Linux Programmer's Manual BACKTRACE(3) | | NAME | backtrace, backtrace_symbols, backtrace_symbols_fd - support for application self- | debugging | | SYNOPSIS | #include <execinfo.h> | | int backtrace(void **buffer, int size); | | char **backtrace_symbols(void *const *buffer, int size); | | void backtrace_symbols_fd(void *const *buffer, int size, int fd); | [...]
A quick Google search for 'backtrace_symbols FreeBSD' points to a need for linking with -lexecinfo Can you please modify src/Makevars at your end by adding this line right after the line containing PKG_CPPFLAGS: PKG_LIB += -lexecinfo Dirk -- Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.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