Loading a rstan package from github


Hi, I am testing a finalized rstan package. When I try to install it from github repository, I received this error message:

Error: package or namespace load failed for ‘mlmm’ in inDL(x, as.logical(local), as.logical(now), …):
unable to load shared object ‘user/Documents/R/win-library/3.5/mlmm/libs/x64/mlmm.dll’:
LoadLibrary failure: %1 is not a valid Win32 application.

Error: loading failed
Execution halted
ERROR: loading failed for ‘x64’


The mlmm.dll file should not be part of the GitHub repo. You have to let the build process create it locally during installation.

Also, your Github repo uses the somewhat older build process. I would probably start over with rstantools::rstan_package_skeleton(). See also


Thank you for the the link of guidelines.
The mlmm.dll file is in src folder, should I not push the entire source code folder in the repo ?
Could you please check my repo if that is okay, you have helped that at the very beginning?
I may need to post enquirers in the future as a maintainer.


mlmm.dll should be mentioned in the .gitignore file


Thank you very much.

I have used the new skeleton structure and re-started to build the package again. I have these two new notes which were not presented in the checking process:
checking for GNU extensions in Makefiles … NOTE
GNU make is a SystemRequirements.

checking compiled code … NOTE
File ‘mlm4omics/libs/x64/mlm4omics.dll’:
Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
Would these because of copied .stan in the src-i386 and -x64?


That is normal and not a problem

That is due to not copying the src/init.cpp file generated by rstantools;:rstan_package_skeleton into your src directory.


Thank you, the new package based on the new rstan-skeleton is good and we found the difference are that the .stan folder is in the installed library.
We are almost getting the package. In the three systems checking, window has the following note which are not presented in the linux and OS X.

  • checking for portable use of (BLAS_LIBS) and (LAPACK_LIBS) … OK
  • checking compiled code … NOTE
    Note: information on .o files for i386 is not available
    Note: information on .o files for x64 is not available
    File ‘C:/Users/pkgbuild/packagebuilder/workers/jobs/689/14f4c5d/mlm4omics.buildbin-libdir/mlm4omics/libs/i386/mlm4omics.dll’:
    Found ‘abort’, possibly from ‘abort’ ©, ‘runtime’ (Fortran)
    Found ‘exit’, possibly from ‘exit’ ©, ‘stop’ (Fortran)
    Found ‘printf’, possibly from ‘printf’ ©

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.
Do you know the possible reason for this?