On Thu, 18 Feb 2021 02:37:22 +0000 Binit Kumar <bku...@rocketsoftware.com> wrote:
> 1. Windows: As I can see in the logs of the machine: > > platform = windows , arch = x64 , R_Version = R Under development > (unstable) (2021-02-16 r80015) 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: >> Using ‘${R_HOME}/bin/R’ rather than just ‘R’ is necessary in order >> to use the correct version of R when running the script as part of R >> CMD INSTALL, and the quotes since ‘${R_HOME}’ might contain spaces. 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. > 2) Linux: I have already used "configure" and that copies the > requisite file using "CLIDriver_installer.R" but problem is that R > does everything in tmp file and then copy to the library folder of R. 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. > Can you suggest how to move ahead? 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. > Also the CRAN upload has a limitation of 100MB. I have some > executables for multiple platforms and they together constitute more > than 100MB. How to resolve this? Can you please help? 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. -- Best regards, Ivan ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel