I have released an R
package on CRAN
which depends on the successful compilation of some RcppArmadillo
code. The package built correctly and with no notes on all the test systems that I tried (CRAN comments here if interested), however, the CRAN checks fail on solaris-sparc
and are unable to load a dependency on solaris-x86
.
The reason for the error is given as ld: fatal: library -llapack: not found
(from goldi-00install.html).
In my Makevars
and Makevars.win
, I have stated -llapack
in PKG_LIBS
, which I thought was sufficient.
PKG_LIBS= -Wsign-compare -llapack
in both.
However, I'm unsure how to declare this dependency for Solaris. Is there a separate Makevars
that I must write, or there a different location that I must state the dependency?
I have read the relevant section of the "Writing R Extensions" manual, and suspect that I may have to declare $(LLAPACK_LIBS)
in PKG_LIBS
, but have no way of testing it on a solaris platform. Is this the correct path to follow?
Thanks for any help, it's much appreciated.
Your line in src/Makevars is just wrong. Don't do what you did:
PKG_LIBS= -Wsign-compare -llapack
do what we all do, what the example package has and the what the auto-generated package gets:
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
Believe us when we say that it just works. I venture that among the two-hundred-ninenty-one (291 !!) packages on CRAN, essentially all use this.
And any who do not, like yours, simply do it wrong. The above dispatches to what R knows about LAPACK and its dependencies. Use it.