[Rcpp-devel] Unable to build Package under Rcpp with Windows XP using canonical Example

Savitsky, Terrance savitsky at rand.org
Wed Dec 15 04:21:00 CET 2010


Turns out the problem was my use of the cygwin bash shell with R CMD.
When I switched to the DOS shell, everything worked (including package
building under Rcpp and RcppArmadillo).  So I send this note for
documentation.

-----Original Message-----
From: Dirk Eddelbuettel [mailto:edd at debian.org] 
Sent: Tuesday, December 14, 2010 3:12 PM
To: Savitsky, Terrance
Cc: Dirk Eddelbuettel; rcpp-devel at r-forge.wu-wien.ac.at
Subject: RE: [Rcpp-devel] Unable to build Package under Rcpp with
Windows XP using canonical Example


On 14 December 2010 at 14:41, Savitsky, Terrance wrote:
| Sorry for not being clear.  I'd already used verbose=T with inline to
check the compile and build steps.  The scripts are identical, but
inline works and R CMD does not.  I've used simpler and simpler examples
and re-focused on Rcpp away from RcppArmadillo in an attempt to isolate
the problem.  
| 
| So what I did next was to build a package skeleton under Rcpp with
that included the canonical C++ code and R script (Rcpp_hello_world)
included there.  I built it, but when I checked it; the compile step
completed, but the build broke, with the following message:
| 

[...]

| I also attempted to build a package under RcppArmadillo using the
fastLm C++ code.  This is the same code from which I attempted to create
a SHLIB.  Not surprisingly, I receive the same compile error as before
when checking the package:

[...]
 
| I'm unable to discover a pattern between these (and other) compile and
build errors I'm achieving that would help me solve it.  As mentioned,
the scripts compile and build fine with inline under the same flag
texts.  The snprintf issue that appears when I employ RcppArmadillo is
not fixable by including cstdio, cstring or locale.  Anyway, it doesn't
make sense that an idiosyncratic tweak under one scenario will fix the
other errors I receive.  Again, my Rtools installation is fine with
nothing obvious there.  I'd appreciate your helping me think through
what factors would cause inline to work and R CMD to not when the
includes, namespace, wrappers and flag text are *identical* between the
two.  Anyway, I'm at whit's end since I'm unable to build a package
through Rcpp.

I am sorry but I do not have any further suggestions:

  - the tools to use are documented in Writing R Extension etc

  - it works for CRAN which creates Windows binaries of these packages
from
    source; dito for R-Forge

  - I just rebuilt a package using Rcpp at work using the current Rtools
and
    it also 'just works'.

Sorry,  Dirk

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

__________________________________________________________________________

This email message is for the sole use of the intended recipient(s) and
may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.



More information about the Rcpp-devel mailing list