[R-pkg-devel] package submission NOTE : Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
Ronan GRIOT
ron@n@gr|ot @end|ng |rom gm@||@com
Thu Jul 15 11:39:27 CEST 2021
Dear R developpers,
I submitted my package on the CRAN and had this NOTE :
Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
------------------------------------------------------------------------------------------------------------------------
In my package, called APIS, I wrote 4 .c functions all included in one file
: APIS.c
To avoid that NOTE message, I ran the command
tools::package_native_routine_registration_skeleton("."), copy the output
and paste it in a mypackage_init.c file.
Here is the output of the function :
#include <stdlib.h> // for NULL
#include <R_ext/Rdynload.h>
/* FIXME:
Check these declarations against the C/Fortran source code.
*/
/* .C calls */
extern void get_individual_mendelian_probability_2n(void *, void *, void *,
void *, void *, void *, void *, void *, void *, void *);
extern void get_individual_mendelian_probability_3n(void *, void *, void *,
void *, void *, void *, void *, void *, void *, void *);
extern void get_mendelian_probability_2n(void *, void *, void *, void *,
void *, void *, void *, void *, void *, void *, void *);
extern void get_mendelian_probability_3n(void *, void *, void *, void *,
void *, void *, void *, void *, void *, void *, void *);
static const R_CMethodDef CEntries[] = {
{"get_individual_mendelian_probability_2n", (DL_FUNC)
&get_individual_mendelian_probability_2n, 10},
{"get_individual_mendelian_probability_3n", (DL_FUNC)
&get_individual_mendelian_probability_3n, 10},
{"get_mendelian_probability_2n", (DL_FUNC)
&get_mendelian_probability_2n, 11},
{"get_mendelian_probability_3n", (DL_FUNC)
&get_mendelian_probability_3n, 11},
{NULL, NULL, 0}
};
void R_init_APIS(DllInfo *dll)
{
R_registerRoutines(dll, CEntries, NULL, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
----------
then, I changed all the @useDynLib APIS by @useDynLib APIS, .registration =
TRUE as recommended in
https://stackoverflow.com/questions/42313373/r-cmd-check-note-found-no-calls-to-r-registerroutines-r-usedynamicsymbols
On my computer, it solved the problem and I do not have the NOTE message
anymore. However, during the CRAN submission process, I had this NOTE
message twice.
I do not know how to fix this as I cannot get the NOTE message on my
computer.
Regards,
Ronan
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list