[R-pkg-devel] Registering compiled functions and Winbuilder pre-check error

Jeremy Beaulieu jbeaulieu at nimbios.org
Fri Mar 24 14:52:57 CET 2017


Hi all:

So, I’m trying to submit a new version of a package of mine and have run into the new registration of compiled functions requirement. I’ve followed all the instructions, made sure the code runs properly, and ran the package checks. Everything seems fine and there are no errors or notes that are flagged during the package check.

However, when I submit my package onto CRAN it does not pass the win-builder pre-check. Here is the output:

* using log directory 'd:/RCompile/CRANincoming/R-devel/hisse.Rcheck'
* using R Under development (unstable) (2017-03-21 r72375)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'hisse/DESCRIPTION' ... OK
* this is package 'hisse' version '1.8.2'
* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Jeremy Beaulieu <jbeaulieu at nimbios.org <mailto:jbeaulieu at nimbios.org>>'

Possibly mis-spelled words in DESCRIPTION:
 HiSSE (10:37)
 Speciation (4:21, 10:63)
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'hisse' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd line widths ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... NOTE
File 'hisse/libs/i386/hisse.dll':
 Found no call to: 'R_registerRoutines'
File 'hisse/libs/x64/hisse.dll':
 Found no call to: 'R_registerRoutines'

It is good practice to register native routines and to disable symbol
search.

See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking installed files from 'inst/doc' ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... [3s] OK
** running examples for arch 'x64' ... [4s] OK
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [6s] OK
 Running 'testthat.R' [6s]
** running tests for arch 'x64' ... [8s] OK
 Running 'testthat.R' [7s]
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking re-building of vignette outputs ... [30s] OK
* checking PDF version of manual ... OK
* DONE
Status: 2 NOTEs

The error is obviously the "File 'hisse/libs/i386/hisse.dll’ but that has the notes: But I have no idea what this error is and how to fix it. In fact, when I run the code on Winbuilder myself, I get no such error.

Here is my init.c file:

#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>


/* .C calls */
extern void initmod_bisse();
extern void initmod_hisse();
extern void initmod_hisse_null();

extern void maddison_DE_bisse(void *, void *, void *, void *, void *, void *);
extern void maddison_DE_hisse(void *, void *, void *, void *, void *, void *);
extern void maddison_DE_hisse_null(void *, void *, void *, void *, void *, void *);

extern void set_birth_bisse_void(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
extern void set_birth_hisse_null_void(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);
extern void set_birth_hisse_void(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *);

static const R_CMethodDef CEntries[] = {
   {"initmod_bisse",             (DL_FUNC) &initmod_bisse,              0},
   {"initmod_hisse",             (DL_FUNC) &initmod_hisse,              0},
   {"initmod_hisse_null",        (DL_FUNC) &initmod_hisse_null,              0},
   {"maddison_DE_bisse",         (DL_FUNC) &maddison_DE_bisse,          6},
   {"maddison_DE_hisse",         (DL_FUNC) &maddison_DE_hisse,          6},
   {"maddison_DE_hisse_null",    (DL_FUNC) &maddison_DE_hisse_null,          6},
   {"set_birth_bisse_void",      (DL_FUNC) &set_birth_bisse_void,      29},
   {"set_birth_hisse_null_void", (DL_FUNC) &set_birth_hisse_null_void, 54},
   {"set_birth_hisse_void",      (DL_FUNC) &set_birth_hisse_void,      59},
   {NULL, NULL, 0}
};

void R_init_hisse(DllInfo *dll)
{
   R_registerRoutines(dll, CEntries, NULL, NULL, NULL);
   R_useDynamicSymbols(dll, FALSE);
}

Any help or advice on this would be greatly appreciated. Again, the version that I install on my computer and such runs fine. So I am not sure why it is saying I am making no calls to R_registerRoutines. 





	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list