Skip to content
Prev 1164 / 10988 Next

[Rcpp-devel] Rcpp on R 2.12.0 / windows / gcc 4.5

Le 01/10/10 20:52, Uwe Ligges a ?crit :
Not my fault. All we do is to call R CMD SHLIB (in inline:::compileCode).

     cmd <- paste(R.home(component = "bin"), "/R CMD SHLIB ",
         basename(libCFile), " 2> ", errfile, sep = "")



Here is something. If I have this function as my unit tests:

test.dummy <- function( ){
	print( commandArgs( ) )
	print( .Platform )
	print( Sys.getenv() )
}

I get the attached result, especially:


Sys.getenv( "R_ARCH" )

     R_ARCH
    "/i386"


seems to disagree with .Platform:

$r_arch
[1] "x64"


What should we do ?
- Should we call R CMD SHLIB differently ?
- Since this is now all R code, maybe we don't have to launch another 
process and we can invoke some R function (tools:::.SHLIB ?) ?
- Can/should we be defensive and set the R_ARCH environment variable 
based on $r_arch before calling SHLIB
- Is this a bug in R ?

Romain