[Rcpp-devel] Issue Installing Rcpp on Solaris

Dirk Eddelbuettel edd at debian.org
Tue Oct 18 15:41:35 CEST 2011


On 18 October 2011 at 15:18, Martyn Plummer wrote:
| On Mon, 2011-10-17 at 16:13 -0500, Dirk Eddelbuettel wrote:
| > Hi Tim,
| > 
| > On 17 October 2011 at 13:39, Tim Jurka wrote:
| > | Hi Rcpp-devel,
| > | 
| > | When installing Rcpp on Solaris ( R2.13.1 Platform: i386-pc-solaris2.10 (32-bit) ) using install.packages, I get the following error:
| > | 
| > | g++ -I/usr/local/lib/R/include -I../inst/include/ -I/usr/local/include    -fpic  -g -O2 -c debugging.cpp -o debugging.o
| > | debugging.cpp:36:22: execinfo.h: No such file or directory
| > | debugging.cpp: In function `SEXPREC* stack_trace(const char*, int)':
| > | debugging.cpp:56: error: `backtrace' was not declared in this scope
| > | debugging.cpp:57: error: `backtrace_symbols' was not declared in this scope
| > | *** Error code 1
| > | make: Fatal error: Command failed for target `debugging.o'
| > | ERROR: compilation failed for package ‘Rcpp’
| > | 
| > | Has anybody encountered this problem before, and is there a known fix? Thank you in advance for all your help!
| > 
| > Thanks for working on Solaris.  
| > 
| > You may well be the only non-member of R Core who does so --- Prof Ripley
| > usually complains to us when Rcpp breaks there, and we usually just shrug our
| > shoulders and point out that our hands are tied: no Solaris machine either
| > one of us can access, so no (meaningful) way to work on fixes.
| > 
| > But more recently, Martyn Plummer (CC'ed) provided two excellent patches
| > which helped a lot.  With those, we now have Rcpp 0.9.7, and Solaris builds
| > on Prof Ripley's test systems, or at least the x86-based one.  Sparc still
| > fails as per the results page linked from CRAN's results page for Rcpp.
| > 
| > Now, for the backtrace and backtrace_symbols symbols were not declared.
| > Grep'ing for this I found
| > 
| > edd at max:~$ grep -rin backtrace svn/rcpp/pkg/Rcpp/src/*
| > svn/rcpp/pkg/Rcpp/src/debugging.cpp:56:    stack_depth = backtrace(stack_addrs, max_depth);
| > svn/rcpp/pkg/Rcpp/src/debugging.cpp:57:    stack_strings = backtrace_symbols(stack_addrs, stack_depth);
| > svn/rcpp/pkg/Rcpp/src/debugging.cpp:67:    free(stack_strings); // malloc()ed by backtrace_symbols
| > edd at max:~$ 
| > 
| > and indeed, in debugging.cpp I see
| > 
| > #else // ! (defined(WIN32) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 
| > 
| > which is lacking a Solaris test -- I may need to add    || defined(__SUNPRO_CC)   
| > test as well.
| > 
| > Could you try locally if that works?  Maybe Google can suggest another
| > Solaris variable to test for too?
| 
| Tim is using g++ to compile Rcpp so this is not a problem with the
| Solaris compiler.

Ding dong. I obviously wasn't thinking too hard about this ... but I had
wondered how on earth we had passed this linking stage otherwise :)

| The header that is missing on Tim's system is at /usr/include/execinfo.h
| on my Solaris Express (2.11) system and is provided by the package
| SUNWhea.  In the Package Manager, this appears as "system/headers" under
| System > Core.  So check that this package is installed.

Thanks for that note, Martyn!

Dirk

-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx


More information about the Rcpp-devel mailing list