Skip to content
Prev 6608 / 12125 Next

[R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission RIBMDB 1.0.0

On Thu, 18 Feb 2021 02:37:22 +0000
Binit Kumar <bkumar at rocketsoftware.com> wrote:

            
We might need the help of someone else more knowledgeable of Windows
package build process, but here is what I noticed: configure.win calls
Rscript without any environment variables. WRE 1.2 says:
It might be the case that configure.win ends up calling the wrong
Rscript and causing the problem. It might also be the case that
configure.win should handle both sub-architectures in one run. I'm not
sure. But the error definitely happens while building the package for
the 32-bit sub-architecture, because it says "*** arch - i386" earlier,
and the rest of the messages are consistent with this.
I think that the correct solution (as long as it's possible) would be
to specify a relative dependency load path when building the package
shared object to avoid hard-coding anything.
1. Make ./configure put the dependency into src/
2. Add PKG_LIBS=-Wl,-rpath,'$$ORIGIN' (plus other flags) to
   src/Makevars.in
3. Use install.libs.R to make sure that both package shared object and
   its dependency are installed in the same directory supplied by R
   (that is, file.path(R_PACKAGE_DIR, paste0('libs', R_ARCH)))

This should cover GNU/Linux, Solaris and some BSDs. On macOS,
@loader_path seems to be the magic incantation to be used instead of
$ORIGIN. No idea about linkers on AIX and other platforms you might
prefer to support.
CRAN source packages aren't allowed to contain executable binaries
anyway, so your solution of downloading the dependencies at build time
from a secure location is as close to following the CRAN policy as it
gets.