swihart / gnlm

Generalized nonlinear regression models
GNU General Public License v2.0
1 stars 0 forks source link

Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’ #4

Closed swihart closed 5 years ago

swihart commented 5 years ago
Check Details
Version: 1.1.0 
Check: compiled code 
Result: NOTE 
    File ‘gnlm/libs/gnlm.so’:
     Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’

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

    See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual. 
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
swihart commented 5 years ago

Use https://github.com/swihart/rmutil/issues/1 for guidance which used https://github.com/swihart/event/issues/8 for guidance

swihart commented 5 years ago

Keep in mind, gnlm is using Roxygen whereas rmutil and event do not

swihart commented 5 years ago

Um, having trouble. Tried usual stuff ad nthen search and found the inconsistency problems between devtools and roxygen:

https://github.com/tidyverse/readxl/issues/520

https://github.com/klutometis/roxygen/issues/822

Following tried but not working

  1. make line 221 of gnlr.r
    • #' @useDynLib gnlm, .registration = TRUE
  2. Run the tools::package_native_routine_registration_skeleton(".") and copy and paste the full output in a packagename_init.c file to be put in src/
  3. CMD+CTRL+D to document
  4. CMD+CTRL+B to BUILD
  5. CMD+CTRL+E to
swihart commented 5 years ago

HOld the phone. Tried a couple of things but it worked.

remove.packages("roxygen2")
remotes::install_version("roxygen2", "6.1.0")

and then I deleted all the gunk that the skeleton gave me and just went with the following in gnlm_init.c:

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

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

Note the second argument or Routines is NULL, not CEntries.

swihart commented 5 years ago

Maybe my issue wasn't with Roxygen. Let's try going back to 6.1.1 -->

remove.packages("roxygen2")
remotes::install_version("roxygen2", "6.1.1")

Looks okay.

swihart commented 5 years ago

So things are working with Roxygen 6.1.1. The hold up was the extra stuff from the skeleton.

swihart commented 5 years ago

...Just finished working on growth and it was 6.1.1. At least initially we have to do the rollback and then we can bring 6.1.1 back.