[R-pkg-devel] Windows load error installing package SOLVED

J C Nash pro|jcn@@h @end|ng |rom gm@||@com
Fri Jun 11 17:16:55 CEST 2021


After some flailing around, discovered a posting

https://stackoverflow.com/questions/42118561/error-in-r-cmd-shlib-compiling-c-code

which showed a makevars.win file containing

PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

I had tried several similar such makevars.win files, but trying PKG_LIBS+= and
no spaces. There is mention of the libraries in Writing R Extensions, but given
the heavy use of LAPACK, BLAS and FLIBS, perhaps this example should be there
in the documentation. I've separately noted that Linux sessionInfo() shows
BLAS and LAPACK but Windows does not.

Cheers, JN

On 2021-06-10 9:37 a.m., Dirk Eddelbuettel wrote:
> 
> On 10 June 2021 at 09:22, J C Nash wrote:
> | Thanks to help from Duncan Murdoch, we have extracted the nls() functionality to a package nlspkg and are building
> | an nlsalt package. We can then run nlspkg::AFunction() and nlsalt::AFunction() in a single script to compare.
> | This works great in Linux, with the packages building and installing under the command line or in Rstudio.
> | But in Windows CMD the "R CMD build" works, but "R CMD INSTALL" gives a number of errors of the type
> | 
> | *** arch - i386
> | C:/RBuildTools/4.0/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe:
> | loessf.o:loessf.f:(.text+0x650): undefined reference to `idamax_'
> | 
> | The reference is to a BLAS function, so I am fairly certain there is some failed pointer, possibly a
> | makevars.win entry, that we need. So far my searches and (possibly silly) attempts to provide links
> | have failed.
> | 
> | Can anyone provide suggestions?
> 
> Guess: On Linux you use a complete (external) BLAS, on Windows you use the
> (subset) BLAS provided by R which may not have the desired function rending
> your approach less portable.  See what sessionInfo() has to say on both.
> 
> Dirk
>



More information about the R-package-devel mailing list