[R-sig-Debian] Problems to compile examples of RInside

David Ibarra Gómez dibarra at aqualogy.net
Wed Oct 22 10:22:14 CEST 2014


Hello,

                I have some problems to migrate to R  >3.0 my devel machine (R.2.15.2). So I decided to start from scratch with a brand new virtual machine.

Downloaded latest network install of debian testing, not stable (jessie/sid, SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux) installed only with ssh-server and basic utilities (no X).

Then I installed R by:

apt-get install r-base-dev

Then from R, I installed the needed (for me) packages by:

install.packages(c("Rcpp","RInside","forecast", "quadprog", "tseries", "fracdiff", "zoo", "RcppArmadillo","randomForest","RInside","lubridate","quantmod","nnet","caret"),type="source")

Session info extract (Rcpp and RInside libraries loaded):

R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C
[9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RInside_0.2.11 Rcpp_0.11.3

Afterwards I tried to compile RInside examples, by make on /usr/local/lib/R/site-library/RInside/examples/standard. No problem for:
rinside_sample7,rinside_sample10,rinside_test0,rinside_sample0,rinside_sample14.

But when it comes to  "rinside_module_sample0" I do get the following:

In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:64:0,
                 from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
                 from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
                 from rinside_module_sample0.cpp:7:
rinside_module_sample0.cpp: In function âint main(int, char**)â:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:5: error: âShieldâ was not declared in this scope
     Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
     ^
rinside_module_sample0.cpp:27:18: note: in expansion of macro âLOAD_RCPP_MODULEâ
     R["bling"] = LOAD_RCPP_MODULE(bling) ;
                  ^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:5: note: suggested alternative:
     Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
     ^
rinside_module_sample0.cpp:27:18: note: in expansion of macro âLOAD_RCPP_MODULEâ
     R["bling"] = LOAD_RCPP_MODULE(bling) ;
                  ^
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/protection/protection.h:21:0,
                 from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:129,
                 from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27,
                 from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
                 from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
                 from rinside_module_sample0.cpp:7:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/protection/Shield.h:29:11: note:   âRcpp::Shieldâ
     class Shield{
           ^
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:64:0,
                 from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
                 from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
                 from rinside_module_sample0.cpp:7:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:16: error: expected primary-expression before â>â token
     Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
                ^
rinside_module_sample0.cpp:27:18: note: in expansion of macro âLOAD_RCPP_MODULEâ
     R["bling"] = LOAD_RCPP_MODULE(bling) ;
                  ^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:94: error: expected â)â before â;â token
     Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
                                                                                              ^
rinside_module_sample0.cpp:27:18: note: in expansion of macro âLOAD_RCPP_MODULEâ
     R["bling"] = LOAD_RCPP_MODULE(bling) ;
                  ^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:452:13: error: â__load_module_call__â was not declared in this scope
     Rf_eval(__load_module_call__), R_GlobalEnv );
             ^
rinside_module_sample0.cpp:27:18: note: in expansion of macro âLOAD_RCPP_MODULEâ
     R["bling"] = LOAD_RCPP_MODULE(bling) ;
                  ^
<builtin>: recipe for target 'rinside_module_sample0' failed
make: *** [rinside_module_sample0] Error 1

Probably I'm missing something on installation, Could you please provide some advice?

Regards

David Ibarra











________________________________
Disclaimer: http://disclaimer.aqualogy.net/

	[[alternative HTML version deleted]]



More information about the R-SIG-Debian mailing list