[Rcpp-devel] Rcpp.package.skeleton(module=TRUE) fails to load

Davor Cubranic cubranic at stat.ubc.ca
Thu Aug 23 19:37:30 CEST 2012


The same, it came with Xcode:

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

My guess is that there is some kind of mismatch in libraries. Do you have Macports or anything else development/computing-related other than R and Xcode? Do you set LD_LIBRARY_PATH?

At this point, you may want to try:

1. compile R from source and run its tests; then install Rcpp from source and run its unit tests
2. turn to r-sig-mac, as there are more experienced Mac developers there (I'm really just a Linux guy who happens to have a Mac on his desk)

Davor


On 2012-08-23, at 6:53 AM, Florian Oswald wrote:

> Thanks Dirk.
> 
> Davor, may I ask you what you get if you type
> 
> gcc --version
> 
> in your terminal? I get 
> 
> i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
> 
> which I thought to be the latest version (because I just upgraded that with XCode on the AppStore). However, I see that Simon Urbanek on http://r.research.att.com/tools/ posts a version
> 
> gcc-4.2 (Apple build 5666.3) with GNU Fortran 4.2.4 for Mac OS X 10.7 (Lion)
> 
> of the gcc. The build number is higher, I assume this means it's more up to date? Should I get that one instead?
> 
> thanks.
> Florian
> 
> On 23 August 2012 14:11, Dirk Eddelbuettel <edd at debian.org> wrote:
> 
> On 23 August 2012 at 13:22, Florian Oswald wrote:
> | Hi Dirk,
> |
> | my R version is
> | R version 2.15.1 (2012-06-22)
> 
> Good.
> 
> | Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
> 
> Oh well. I don't have that platform --- and it requires a fair amount of
> tweaking and getting the pieces right because, hey, that's how Apple rolls.
> 
> If you can't get that sorted out with all the hints by Simon, the r-sig-mac
> list and other OS X users here (as it seems to work fine for some) --- then I
> would suggest to punt and install something like Ubuntu in a virtual
> machine.
> 
> Dirk
> 
> | I ran the tests in
> | /Library/Frameworks/R.framework/Versions/2.15/Resources/library/Rcpp/unitTests
> |
> | ➜  unitTests  RunAllRcppTests="yes" Rscript -e 'library(inline); library
> | (RUnit); cppfunction <- function(...) cxxfunction(..., plugin="Rcpp");
> |  runTestFile("runit.Module.client.package.R")'
> |
> | and got the following (identical) error:
> |
> | R(7916) malloc: *** error for object 0x7fff7247f860: pointer being freed was
> | not allocated
> | *** set a breakpoint in malloc_error_break to debug
> | sh: line 1:  7916 Abort trap: 6           '/Library/Frameworks/R.framework/
> | Resources/bin/R' --arch=x86_64 --no-save --slave < /var/folders/bd/
> | xhwzz96x2xl6b02bwt4myhy00000gn/T//RtmpeLGmvL/file1e8c1514ade9
> | ERROR: loading failed for ‘x86_64’
> | * removing ‘/private/var/folders/bd/xhwzz96x2xl6b02bwt4myhy00000gn/T/Rtmpj3NgcG
> | /file1e7867afb0d/templib/testRcppClass’
> | Loading required package: testRcppClass
> | Timing stopped at: 21.775 2.057 47.64 
> | Error in func() : object 'stdNumeric' not found
> | In addition: Warning messages:
> | 1: In install.packages("testRcppClass_0.1.tar.gz", "templib", repos = NULL,  :
> |   installation of package ‘testRcppClass_0.1.tar.gz’ had non-zero exit status
> | 2: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return
> | = TRUE,  :
> |   there is no package called ‘testRcppClass’
> |  done successfully.
> |
> | Number of test functions: 1 
> | Number of errors: 1 
> | Number of failures: 0 
> |
> | Best
> | Florian
> |
> |
> | On 23 August 2012 13:07, Dirk Eddelbuettel <edd at debian.org> wrote:
> |
> |
> |     Florian,
> |
> |     On 23 August 2012 at 12:45, Florian Oswald wrote:
> |     | Davor,
> |     | I'm at a loss for words. I get this error consistently ONLY when trying
> |     to
> |     | install Rcpp.package.skeleton. I tried many times, always removed .o and
> |     so.
> |     | files. I did not come across this problem with any other package before,
> |     also
> |     | ones which are using Rcpp. I can install a similarly simple package that
> |     Jelmer
> |     | Ypma kindly put together for me to try out (attached). It differs from
> |     | Rcpp.package.skeleton in that it only defines a single class that
> |     contains all
> |     | functions. I guess that shouldn't matter, but apart from that I can find
> |     few
> |     | differences.
> |
> |     I may have asked this before, but what R version so you use?
> |
> |     Can you run the unit tests involving modules and packages? Eg
> |
> |        $ cd ~/svn/rcpp/pkg/Rcpp/inst/unitTests/       ## adjust for your
> |     sources
> |        $ RunAllRcppTests="yes" Rscript -e 'library(inline);library(RUnit); \
> |               cppfunction <- function(...) cxxfunction(..., plugin="Rcpp"); \
> |               runTestFile("runit.Module.client.package.R")'
> |
> |     (where the code line was wrapped.  Here, this works as expected and ends in
> |
> |        [...]
> |        * DONE (testRcppClass)
> |        Loading required package: testRcppClass
> |        Loading required package: Rcpp
> |         done successfully.
> |
> |        Number of test functions: 1
> |        Number of errors: 0
> |        Number of failures: 0
> |        edd at max:~/svn/rcpp/pkg/Rcpp/inst/unitTests$
> |
> |
> |     Dirk
> |
> |     --
> |     Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> |
> |
> 
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20120823/54aba04e/attachment-0001.html>


More information about the Rcpp-devel mailing list