[Rcpp-devel] libRInside.a and "base package"

Dirk Eddelbuettel edd at debian.org
Tue Sep 4 22:54:17 CEST 2012


On 4 September 2012 at 13:31, Dan Murphy wrote:
| I am absolutely willing to work with you on this (Windows expert?
| perhaps not yet). I really appreciate your help!
| 
| I think I followed the steps you outlined -- or at least (hopefully)
| can figure it out when I have the time to look at it later tonight.
| But I'm not sure I know how to rebuild RInside_0.2.7 locally from the
| .tar.gz". I spent hours researching how to do that with Rcpp without

Have you looked at the R manual "Writing R Extensions" ?  

For every CRAN etc package, the step involves just

    R CMD INSTALL somePackage_0.1.2.tar.gz

so here, with the added flag, it was

    R CMD INSTALL --no-multiarch RInside_0.2.7.tar.gz

which results in a fresh local installation with a 64 bit static library
libRInside.a --- which is currently missing from the CRAN binary.

Hth, Dirk


| success. I don't have my development machine with me now, but do I
| just go to the src directory and
| make --no-multiarch -f makefile.win
| ?
| Of course, I will set
| R_ARCH := --arch x64
| and
| RINSIDELIBS=../../lib/x64/libRInside.a
| inside makefile.win beforehand.
| 
| On Tue, Sep 4, 2012 at 1:13 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
| >
| > On 4 September 2012 at 14:48, Dirk Eddelbuettel wrote:
| > |
| > | On 3 September 2012 at 23:44, Dan Murphy wrote:
| > | | I copied the six dll's from C:\R\R-2.15.1\bin\i386 to
| > | | C:\R\R-2.15.1\library\RInside\examples\standard before running make
| > | | (just to be sure). Then
| > | |
| > | | make -f makevars.win
| > | |
| > | | ran without error, but
| > | |
| > | | C:\R\R-2.15.1\library\RInside\examples\standard>rinside_sample0
| > | |
| > | | gave the same  "Fatal error: unable to open the base package".
| > | |
| > | | No one else has suggested any solution.
| > |
| > | I think (but I am not windows expert) this hints at a 32 bit / 64 bit mismatch.
| > |
| > | | Thinking the error was probably thrown in Rcpp, I thought maybe I
| > | | should try building Rcpp from source, so I downloaded the latest
| > | | package and ran
| > | | R CMD INSTALL --build rcpp_0.9.13.tar.gz
| > | |
| > | | but that did not eliminate the fatal error. I'm out of ideas.
| > |
| > | It stumped me too today. I didn't have too much time for this but here is
| > | quick run-down
| > |
| > |   i)    I think RInside_0.2.7.zip as shipped for Windows is in fact deficient
| > |         in the sense that it should have, but doesn't have, a static library
| > |       for 64 bit use.
| > |
| > |   ii)   So I rebuilt RInside_0.2.7 locally from the .tar.gz, opting for
| > |         the --no-multiarch flag to ensure I get a 64 bit build.
| > |
| > |   iii)  I then noticed that using Makefile.win results in an incomplete /
| > |         wrong call for libRinside.a.  As a stop-gap measure, I fixed this via
| > |            RINSIDELIBS=../../lib/x64/libRInside.a
| >
| > PS  I also set   R_ARCH := --arch x64    by uncommenting that entry.
| >
| > Dirk
| >
| > |
| > |   iv)   With those changes / fixes, 'make -f Makefile.win' works and results
| > |         in working executables.  I didn't have to copy any dlls into the
| > |         working directory.
| > |
| > | I hope to make some time over the next few weeks to address i) and iii).
| > | Help from experienced Windows users would certainly be appreciated :)
| > |
| > | Dirk
| > |
| > |
| > |
| > |
| > |
| > | --
| > | Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| >
| > --
| > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list