[Rcpp-devel] using [[Rcpp::interfaces(r, cpp)]] causes a package to fail
Søren Højsgaard
sorenh at math.aau.dk
Sat Feb 15 09:16:09 CET 2014
Dear all
If in a package I have
// [[Rcpp::interfaces(r, cpp)]]
in all .cpp files then things work.
However, if in a .cpp file I have
// [[Rcpp::interfaces(r, cpp)]]
then compilation fails with the message:
* checking whether package 'mypack' can be installed ...Warning: running command '"C:/programs/R/current/bin/x64/Rcmd.exe" INSTALL -l "c:/Documents/stat/Rdevel/gmwR-DEVEL/gRbaseDEVEL/c-code/c-code-gRbase/array-ops-2014/mypack.Rcheck" --no-html "c:\DOCUME~2\stat\Rdevel\GMWR-D~1\GRBASE~1\c-code\C-CODE~1\ARRAY-~1\MYPACK~1.RCH\00_PKG~1\mypack"' had status 1 ERROR Installation failed.
See 'c:/Documents/stat/Rdevel/gmwR-DEVEL/gRbaseDEVEL/c-code/c-code-gRbase/array-ops-2014/mypack.Rcheck/00install.out
The 00install.out says
* installing *source* package 'mypack' ...
** libs
*** arch - i386
g++ -m32 -I"C:/programs/R/current/include" -DNDEBUG -I../inst/include/ -I"C:/programs/R/current/library/Rcpp/include" -I"C:/programs/R/current/library/RcppEigen/include" -I"C:/programs/R/current/library/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp: In function 'SEXPREC* mypack_cell2entry_cpp(SEXP, SEXP)':
RcppExports.cpp:37:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_cell2entry2_cpp(SEXP, SEXP)':
RcppExports.cpp:72:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCell_cpp(SEXP, SEXP)':
RcppExports.cpp:107:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCellSlicePrim_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:143:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCellSlice_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:179:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_slice2entry_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:215:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_getCellNumberPrim_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:251:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_getCellNumber_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:287:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_permuteCellEntries_cpp(SEXP, SEXP)':
RcppExports.cpp:322:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
make: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/programs/R/current/etc/i386/Makeconf" -f "C:/programs/R/current/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="mypack.dll" OBJECTS="RcppExports.o array-ops14-prim.o rcppeigen_hello_world.o spdinv-arma.o utils-all-subsets.o"' had status 2
g++ -m32 -I"C:/programs/R/current/include" -DNDEBUG -I../inst/include/ -I"C:/programs/R/current/library/Rcpp/include" -I"C:/programs/R/current/library/RcppEigen/include" -I"C:/programs/R/current/library/RcppArmadillo/include" -I"d:/RCompile/CRANpkg/extralibs64/local/include" -O2 -Wall -mtune=core2 -c RcppExports.cpp -o RcppExports.o
RcppExports.cpp: In function 'SEXPREC* mypack_cell2entry_cpp(SEXP, SEXP)':
RcppExports.cpp:37:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_cell2entry2_cpp(SEXP, SEXP)':
RcppExports.cpp:72:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCell_cpp(SEXP, SEXP)':
RcppExports.cpp:107:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCellSlicePrim_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:143:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_nextCellSlice_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:179:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_slice2entry_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:215:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_getCellNumberPrim_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:251:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_getCellNumber_cpp(SEXP, SEXP, SEXP)':
RcppExports.cpp:287:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
RcppExports.cpp: In function 'SEXPREC* mypack_permuteCellEntries_cpp(SEXP, SEXP)':
RcppExports.cpp:322:9: error: 'jumpToTop' is not a member of 'Rcpp::internal'
make: *** [RcppExports.o] Error 1
Warning: running command 'make -f "Makevars.win" -f "C:/programs/R/current/etc/i386/Makeconf" -f "C:/programs/R/current/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="mypack.dll" OBJECTS="RcppExports.o array-ops14-prim.o rcppeigen_hello_world.o spdinv-arma.o utils-all-subsets.o" symbols.rds' had status 2
ERROR: compilation failed for package 'mypack'
* removing 'c:/Documents/stat/Rdevel/gmwR-DEVEL/gRbaseDEVEL/c-code/c-code-gRbase/array-ops-2014/mypack.Rcheck/mypack'
I have this sessionInfo()
> sessionInfo()
R version 3.0.2 Patched (2014-02-12 r64985)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Danish_Denmark.1252 LC_CTYPE=Danish_Denmark.1252 LC_MONETARY=Danish_Denmark.1252
[4] LC_NUMERIC=C LC_TIME=Danish_Denmark.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.11.0 devtools_1.4.1 shTools_1.0 markdown_0.6.4 knitr_1.5
loaded via a namespace (and not attached):
[1] compiler_3.0.2 digest_0.6.4 evaluate_0.5.1 formatR_0.10
[5] grid_3.0.2 httr_0.2 lattice_0.20-24 Matrix_1.1-2
[9] memoise_0.1 parallel_3.0.2 RcppArmadillo_0.4.000.2 RcppEigen_0.3.2.0.2
[13] RCurl_1.95-4.1 stringr_0.6.2 tools_3.0.2 whisker_0.3-2
Any thoughts on what is going on?
Cheers
Søren
--------------------------------------------------
Dr. Søren Højsgaard, Head of Department
Department of Mathematical Sciences
Aalborg University
Fredrik Bajers Vej 7 G
DK-9220 Aalborg Ø
--------------------------------------------------
Phone +45 9940 8801; cell phone +45 2485 5748
Secretary: phone +45 9940 8800; Fax: +45 9815 8129
Homepage: people.math.aau.dk/~sorenh
--------------------------------------------------
More information about the Rcpp-devel
mailing list