I have looked at many other posts related to this issue and have tried each solution. None have worked in my case, including copying over the makevars from Rcpp
. Anyhow, when building on Travis I get the following error
undefined symbol: dpotrf_’
The interesting note is that the package installs fine on windows, macOS, and linux.
here is my repo R package
Disclaimer: I work with D_Williams, but I figured out the problem, and others may find it useful.
A functioning configure.ac
was present, and a Makevars.in is present.
The problem is that the configure
file was not yet generated. This is an autotools/autoconf setup. To resolve it, I ran autoconf
in the package directory, which generated the configure
file. That configure
file is then executed when R builds the package. The configure
file modifies the Makevars.in
and creates Makevars
. That Makevars
file ultimately defines where to find libraries, includes, compilers, compiler options, etc.
If you do not generate the configure
file from configure.ac
using autoconf
, then there is no configure
file to be executed, and no Makevars
to define the needed options at compile time. Therefore, the compiler is not fully configured, and it will fail.
TLDR: If you have an configure.ac
, you must run autoconf
on it, and commit that configure file to your repo. R needs to execute it to have a functioning Makevars.