Chris C Chris C - 1 year ago 65
R Question

Resolving unstated -llapack dependency issue on Solaris

I have released an

package on
which depends on the successful compilation of some
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
and are unable to load a dependency on

See here for CRAN checks.

The reason for the error is given as
ld: fatal: library -llapack: not found
(from goldi-00install.html).

In my
, I have stated
, 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
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
, 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.

Package on Github

Package on CRAN

Answer Source

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:


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.