CRAN Package Check Results for Package inline

Last updated on 2024-08-17 02:48:16 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.3.19 2.37 46.91 49.28 OK
r-devel-linux-x86_64-debian-gcc 0.3.19 1.93 24.12 26.05 ERROR
r-devel-linux-x86_64-fedora-clang 0.3.19 79.11 OK
r-devel-linux-x86_64-fedora-gcc 0.3.19 77.15 OK
r-devel-windows-x86_64 0.3.19 4.00 107.00 111.00 OK
r-patched-linux-x86_64 0.3.19 2.62 41.72 44.34 OK
r-release-linux-x86_64 0.3.19 1.94 42.11 44.05 OK
r-release-macos-arm64 0.3.19 34.00 OK
r-release-macos-x86_64 0.3.19 56.00 ERROR
r-release-windows-x86_64 0.3.19 4.00 106.00 110.00 OK
r-oldrel-macos-arm64 0.3.19 37.00 OK
r-oldrel-macos-x86_64 0.3.19 65.00 OK
r-oldrel-windows-x86_64 0.3.19 5.00 123.00 128.00 OK

Check Details

Version: 0.3.19
Check: examples
Result: ERROR Running examples in ‘inline-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: cfunction > ### Title: Inline C, C++, Fortran function calls from R > ### Aliases: cfunction setCMethod > ### Keywords: file > > ### ** Examples > > > x <- as.numeric(1:10) > n <- as.integer(10) > > ## Not run: > ##D ## A simple Fortran example - n and x: assumed-size vector > ##D code <- " > ##D integer i > ##D do 1 i=1, n(1) > ##D 1 x(i) = x(i)**3 > ##D " > ##D cubefn <- cfunction(signature(n="integer", x="numeric"), code, convention=".Fortran") > ##D print(cubefn) > ##D > ##D cubefn(n, x)$x > ##D > ##D ## Same Fortran example - now n is one number > ##D code2 <- " > ##D integer i > ##D do 1 i=1, n > ##D 1 x(i) = x(i)**3 > ##D " > ##D cubefn2 <- cfunction(signature(n="integer", x="numeric"), implicit = "none", > ##D dim = c("", "(*)"), code2, convention=".Fortran") > ##D > ##D cubefn2(n, x)$x > ##D > ##D ## Same in F95, now x is fixed-size vector (length = n) > ##D code3 <- "x = x*x*x" > ##D cubefn3 <- cfunction(sig = signature(n="integer", x="numeric"), implicit = "none", > ##D dim = c("", "(n)"), code3, language="F95") > ##D cubefn3(20, 1:20) > ##D print(cubefn3) > ##D > ##D ## Same example in C > ##D code4 <- " > ##D int i; > ##D for (i = 0; i < *n; i++) > ##D x[i] = x[i]*x[i]*x[i]; > ##D " > ##D cubefn4 <- cfunction(signature(n="integer", x="numeric"), code4, language = "C", convention = ".C") > ##D cubefn4(20, 1:20) > ##D > ##D ## Give the function in the source code a name > ##D cubefn5 <- cfunction(signature(n="integer", x="numeric"), code4, language = "C", convention = ".C", > ##D name = "cubefn") > ##D code(cubefn5) > ## End(Not run) > > ## use of a module in F95 > modct <- "module modcts + double precision, parameter :: pi = 3.14159265358979 + double precision, parameter :: e = 2.71828182845905 + end" > > getconstants <- "x(1) = pi + x(2) = e" > > cgetcts <- cfunction(getconstants, module = "modcts", implicit = "none", + includes = modct, sig = c(x = "double"), dim = c("(2)"), language = "F95") > > cgetcts(x = 1:2) $x [1] 3.141593 2.718282 > print(cgetcts) An object of class 'CFunc' function (x) .Primitive(".Fortran")(<pointer: 0x7f299be06100>, x = as.double(x)) <environment: 0x556a79016478> code: 1: module modcts 2: double precision, parameter :: pi = 3.14159265358979 3: double precision, parameter :: e = 2.71828182845905 4: end 5: SUBROUTINE file22966d76ab708f ( x ) 6: USE modcts 7: IMPLICIT none 8: DOUBLE PRECISION x(2) 9: x(1) = pi 10: x(2) = e 11: RETURN 12: END 13: > > ## Use of .C convention with C code > ## Defining two functions, one of which calls the other > sigSq <- signature(n="integer", x="numeric") > codeSq <- " + for (int i=0; i < *n; i++) { + x[i] = x[i]*x[i]; + }" > sigQd <- signature(n="integer", x="numeric") > codeQd <- " + squarefn(n, x); + squarefn(n, x); + " > > fns <- cfunction( list(squarefn=sigSq, quadfn=sigQd), + list(codeSq, codeQd), + convention=".C") > > squarefn <- fns[["squarefn"]] > quadfn <- fns[["quadfn"]] > > squarefn(n, x)$x [1] 1 4 9 16 25 36 49 64 81 100 > quadfn(n, x)$x [1] 1 16 81 256 625 1296 2401 4096 6561 10000 > > ## Alternative declaration using 'setCMethod' > setCMethod(c("squarefn", "quadfn"), list(sigSq, sigQd), + list(codeSq, codeQd), convention=".C") > > squarefn(n, x)$x [1] 1 4 9 16 25 36 49 64 81 100 > quadfn(n, x)$x [1] 1 16 81 256 625 1296 2401 4096 6561 10000 > > ## Use of .Call convention with C code > ## Multyplying each image in a stack with a 2D Gaussian at a given position > code <- " + SEXP res; + int nprotect = 0, nx, ny, nz, x, y; + PROTECT(res = Rf_duplicate(a)); nprotect++; + nx = INTEGER(GET_DIM(a))[0]; + ny = INTEGER(GET_DIM(a))[1]; + nz = INTEGER(GET_DIM(a))[2]; + double sigma2 = REAL(s)[0] * REAL(s)[0], d2 ; + double cx = REAL(centre)[0], cy = REAL(centre)[1], *data, *rdata; + for (int im = 0; im < nz; im++) { + data = &(REAL(a)[im*nx*ny]); rdata = &(REAL(res)[im*nx*ny]); + for (x = 0; x < nx; x++) + for (y = 0; y < ny; y++) { + d2 = (x-cx)*(x-cx) + (y-cy)*(y-cy); + rdata[x + y*nx] = data[x + y*nx] * exp(-d2/sigma2); + } + } + UNPROTECT(nprotect); + return res; + " > funx <- cfunction(signature(a="array", s="numeric", centre="numeric"), code) ERROR(s) during compilation: source code errors or compiler configuration errors! make cmd is make -f '/home/hornik/tmp/R.check/r-devel-gcc/Work/build/etc/Makeconf' -f '/home/hornik/tmp/R.check/r-devel-gcc/Work/build/share/make/shlib.mk' -f '/home/hornik/.R/Makevars-gcc' SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB='file22966d8c7706f.so' CXX_DEFS=-DR_NO_REMAP XDEFS=-DSTRICT_R_HEADERS=1 OBJECTS='file22966d8c7706f.o' make would use make[1]: Entering directory '/tmp/Rtmp4doz01' g++-14 -std=gnu++17 -I"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/include" -DNDEBUG -I/usr/local/include -D_FORTIFY_SOURCE=3 -DSTRICT_R_HEADERS=1 -fpic -g -O2 -Wall -pedantic -mtune=native -DR_NO_REMAP -c file22966d8c7706f.cpp -o file22966d8c7706f.o if test "zfile22966d8c7706f.o" != "z"; then \ echo g++-14 -std=gnu++17 -shared -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -Wl,-O1 -o file22966d8c7706f.so file22966d8c7706f.o -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -lR; \ g++-14 -std=gnu++17 -shared -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -Wl,-O1 -o file22966d8c7706f.so file22966d8c7706f.o -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -lR; \ fi make[1]: Leaving directory '/tmp/Rtmp4doz01' Program source: 1: #include <R.h> 2: #include <Rdefines.h> 3: #include <R_ext/Error.h> 4: 5: 6: extern "C" { 7: SEXP file22966d8c7706f ( SEXP a, SEXP s, SEXP centre ); 8: } 9: 10: SEXP file22966d8c7706f ( SEXP a, SEXP s, SEXP centre ) { 11: 12: SEXP res; 13: int nprotect = 0, nx, ny, nz, x, y; 14: PROTECT(res = Rf_duplicate(a)); nprotect++; 15: nx = INTEGER(GET_DIM(a))[0]; 16: ny = INTEGER(GET_DIM(a))[1]; 17: nz = INTEGER(GET_DIM(a))[2]; 18: double sigma2 = REAL(s)[0] * REAL(s)[0], d2 ; 19: double cx = REAL(centre)[0], cy = REAL(centre)[1], *data, *rdata; 20: for (int im = 0; im < nz; im++) { 21: data = &(REAL(a)[im*nx*ny]); rdata = &(REAL(res)[im*nx*ny]); 22: for (x = 0; x < nx; x++) 23: for (y = 0; y < ny; y++) { 24: d2 = (x-cx)*(x-cx) + (y-cy)*(y-cy); 25: rdata[x + y*nx] = data[x + y*nx] * exp(-d2/sigma2); 26: } 27: } 28: UNPROTECT(nprotect); 29: return res; 30: 31: warning("your C program does not return anything!"); 32: return R_NilValue; 33: } Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language, verbose) : using C++ compiler: ‘g++-14 (Debian 14.2.0-1) 14.2.0’file22966d8c7706f.cpp: In function ‘SEXPREC* file22966d8c7706f(SEXP, SEXP, SEXP)’:file22966d8c7706f.cpp:31:3: error: ‘warning’ was not declared in this scope; did you mean ‘Rf_warning’? 31 | warning("your C program does not return anything!"); | ^~~~~~~ | Rf_warningmake[1]: *** [/home/hornik/tmp/R.check/r-devel-gcc/Work/build/etc/Makeconf:204: file22966d8c7706f.o] Error 1 Calls: cfunction -> compileCode Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.3.19
Check: tests
Result: ERROR Running ‘tinytest.R’ [4s/6s] Running the tests in ‘tests/tinytest.R’ failed. Complete output: > > if (requireNamespace("tinytest", quietly=TRUE) && + utils::packageVersion("tinytest") >= "1.1.0") { + + ## Set a seed to make the tests deterministic + set.seed(42) + + tinytest::test_package("inline") + } test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 0 tests test_cfunction.R.............. 1 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 1 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 2 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 3 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 3 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 3 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 3 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 4 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 4 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 4 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 4 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 5 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 5 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 5 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 5 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 6 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 7 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 8 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 9 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 9 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 9 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 9 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 10 tests <1b>[0;32mOK<1b>[0m test_cfunction.R.............. 11 tests <1b>[0;32mOK<1b>[0m <1b>[0;34m5.0s<1b>[0m test_cxxfunction.R............ 0 tests ERROR(s) during compilation: source code errors or compiler configuration errors! make cmd is make -f '/home/hornik/tmp/R.check/r-devel-gcc/Work/build/etc/Makeconf' -f '/home/hornik/tmp/R.check/r-devel-gcc/Work/build/share/make/shlib.mk' -f '/home/hornik/.R/Makevars-gcc' SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB='file22a925235c41ea.so' CXX_DEFS=-DR_NO_REMAP XDEFS=-DSTRICT_R_HEADERS=1 OBJECTS='file22a925235c41ea.o' make would use make[1]: Entering directory '/tmp/RtmpO9rzPl' g++-14 -std=gnu++17 -I"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/include" -DNDEBUG -I/usr/local/include -D_FORTIFY_SOURCE=3 -DSTRICT_R_HEADERS=1 -fpic -g -O2 -Wall -pedantic -mtune=native -DR_NO_REMAP -c file22a925235c41ea.cpp -o file22a925235c41ea.o if test "zfile22a925235c41ea.o" != "z"; then \ echo g++-14 -std=gnu++17 -shared -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -Wl,-O1 -o file22a925235c41ea.so file22a925235c41ea.o -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -lR; \ g++-14 -std=gnu++17 -shared -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -Wl,-O1 -o file22a925235c41ea.so file22a925235c41ea.o -L"/home/hornik/tmp/R.check/r-devel-gcc/Work/build/lib" -lR; \ fi make[1]: Leaving directory '/tmp/RtmpO9rzPl' Program source: 1: 2: // includes from the plugin 3: 4: #include <R.h> 5: #include <Rdefines.h> 6: #include <R_ext/Error.h> 7: 8: 9: // user includes 10: 11: 12: // declarations 13: extern "C" { 14: SEXP file22a925235c41ea( SEXP x, SEXP y) ; 15: } 16: 17: // definition 18: SEXP file22a925235c41ea(SEXP x, SEXP y) { 19: return ScalarReal(INTEGER(x)[0] * REAL(y)[0]); 20: Rf_warning("your C++ program does not return anything"); 21: return R_NilValue; 22: } Compilation ERROR, function(s)/method(s) not created! Error in compileCode(f, code, language = language, verbose = verbose) : using C++ compiler: ‘g++-14 (Debian 14.2.0-1) 14.2.0’file22a925235c41ea.cpp: In function ‘SEXPREC* file22a925235c41ea(SEXP, SEXP)’:file22a925235c41ea.cpp:19:8: error: ‘ScalarReal’ was not declared in this scope; did you mean ‘Rf_ScalarReal’? 19 | return ScalarReal(INTEGER(x)[0] * REAL(y)[0]); | ^~~~~~~~~~ | Rf_ScalarRealmake[1]: *** [/home/hornik/tmp/R.check/r-devel-gcc/Work/build/etc/Makeconf:204: file22a925235c41ea.o] Error 1 Calls: <Anonymous> ... lapply -> FUN -> eval -> eval -> cxxfunction -> compileCode Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.3.19
Check: tests
Result: ERROR Running ‘tinytest.R’ [16s/21s] Running the tests in ‘tests/tinytest.R’ failed. Last 13 lines of output: test_utilities.R.............. 10 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 10 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 11 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 11 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 11 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 11 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 11 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 12 tests <1b>[0;31m1 fails<1b>[0m test_utilities.R.............. 13 tests <1b>[0;31m1 fails<1b>[0m <1b>[0;34m4.7s<1b>[0m ----- FAILED[xcpt]: test_utilities.R<39--42> call| expect_error(moveDLL(quadfn, name = "testname", directory = tempdir(), call| --> unload = TRUE, overwrite = TRUE), "file can not be copied both 'from' and 'to'") diff| No error Error: 1 out of 30 tests failed Execution halted Flavor: r-release-macos-x86_64