On 03.01.2011 13:20 (UTC+1), Dirk Eddelbuettel wrote:
Rainer,

Please use the rcpp-devel list for questions. You need to subscribe to post,
or you can use a web-to-list interface to gmane.org.

Done. Hope it is ok to pursue the private thread on the list.


On 3 January 2011 at 11:54, Rainer Hurling wrote:
| I want to build and install Rcpp_0.9.0.tar.gz in R-2.12.1 on FreeBSD
| 9.0-CURRENT (amd64). The build process stops with the following error
| when trying to build the shared library:
|
| -------------------------------------------
| #R CMD INSTALL Rcpp_0.9.0.tar.gz
| * installing to library '/usr/local/lib/R/library'
| * installing *source* package 'Rcpp' ...
| ** libs

[..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
| g++ -o libRcpp.so  -shared
| g++: No input files specified
| *** Error code 1
|
| Stop in /tmp/RtmpdChXKU/R.INSTALL17af636/Rcpp/src.
| ERROR: compilation failed for package 'Rcpp'
| * removing '/usr/local/lib/R/library/Rcpp'
| -------------------------------------------
|
| It seems that 'src/Makevars' is not fully compatible to FreeBSD style

Hm. Can you try enforcing GNU make via something like

        export MAKE=/usr/bin/gmake

Thanks for the tip. With gmake it proceeds build and installing. But there is another problem with testing the installation, see below please.

(or whererever it it stored on your system). At that point the implicit
variable $^ is used:

                $(SHLIB_CXXLD) -o $(USERLIB) $^ $(SHLIB_CXXLDFLAGS) $(ALL_LIBS)

Here $^ expands to the list of all prerequisites, so you could try $OBJECTS
in its place.

gmake is able to use $^, so there is no need for me to use $OBJECTS  :-)

| (line 33, just a guess)? And there is no '/usr/bin/install_name_tool'
| (line 34) on FreeBSD.

Neither do I on Linux -- it's a test: if available (on OS X) then use it. So
that is no issue.

Ah, I assumed something like that.

| Since other packages like parser and highlight depend on Rcpp it would
| be nice if there is some chance to get Rcpp work on FreeBSD.
| Unfortunately I am not a programmer, so I have almost no experience with
| writing code.

Unfortunately we do not have *BSD systems, so we have no ability to test
anything for them.

| Please let me know if I can give more information. Of course I am able
| to test new code on my system.

You may need to develop and test changes for the build system as we cannot do
that for you.

I am willing to test everything. But I am afraid that I am not able to develop ... ;-(

Dirk

| Thanks in advance for any answer,
| Rainer Hurling
|

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 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 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?

I tried to comment out the complete part between '#if defined(__GNUC__)'
and '#endif' and use only

    SEXP stack_trace( const char *file, int line) {
        return R_NilValue ;
    }

That gives no more undefined symbols when loading, but of course there is no debugging code any more :-(

Do you have any idea how to get debugging.cpp functional on FreeBSD?

Many thanks,
Rainer
_______________________________________________
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