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

Binit Kumar bkum@r @end|ng |rom rocket@o|tw@re@com
Thu Feb 18 03:37:22 CET 2021


Hi Ivan,
Thanks for the response. Appreciate.
But,

  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)



So that means the architecture on CRAN machine is 64 bit and not 32 bit.

This is extracted by my code using:

platform = .Platform$OS.type

arch = .Platform$r_arch



The dll is selected based on the architecture, it is not hardcoded.

Please let me know if my understanding is wrong.

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. As you mentioned, "This still may
be insufficient as you might have to instruct the dynamic linker to look
for libdb2.so in the same directory when the package shared object is
loaded by R; on some compilers this may be done by passing the
-rpath='$ORIGIN' argument to the linker, but this is very
platform-dependent (no idea whether it's going to work on Solaris, for
example)."  So the part that is failing is loading. I want to exclude test loading using "-c -no-test-load". I tested in my local system and it works fine.

Can you suggest how to move ahead?



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?




Thanks & Regards,
Binit Kumar
From: Ivan Krylov <krylov.r00t using gmail.com>
Sent: 18 February 2021 01:53
To: Binit Kumar <bkumar using rocketsoftware.com>
Cc: r-package-devel using r-project.org
Subject: Re: [R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission RIBMDB 1.0.0

EXTERNAL EMAIL



Hello Binit Kumar,

On Wed, 17 Feb 2021 15:12:53 +0000
Binit Kumar <bkumar using rocketsoftware.com<mailto:bkumar using rocketsoftware.com>> wrote:

> Error: Ld:/Compiler/gcc-4.9.3/local330/lib
> -LD:/RCompile/recent/R/bin/i386 -lR clidriver/bin/db2app64.dll: file
> not recognized: file format not recognized
>
> Why is db2app64.dll a non recognized file?

The package is being built for i386 (32-bit) subarchitecture, but the
64-bit dll is being linked to it. I think that the correct way to
identify the target sub-architecture is to inspect the R_ARCH
environment variable from configure.win (in R code, use getenv()).

This is described in WRE 1.2:
<https://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup<https://cran.r-project.org/doc/manuals/R-exts.html#Configure-and-cleanup>>.

> Error: ** testing if installed package can be loaded from temporary
> location
>
> Error: package or namespace load failed for 'RIBMDB' in
> dyn.load(file, DLLpath = DLLpath, ...):
>
> unable to load shared object
> '/srv/hornik/tmp/CRAN/RIBMDB.Rcheck/00LOCK-RIBMDB/00new/RIBMDB/libs/RIBMDB.so':
>
> libdb2.so.1: cannot open shared object file: No such file or
> directory

The bigger problem is trying to manually write under R.home() during
installation. This is not allowed by the CRAN policy and may lead to
problems. (Imagine what would happen if two different packages tried to
write to file.path(R.home(), 'clidriver') and for some reason succeeded
despite it's usually not writable for the end-user on Unix-alikes...)

Instead, you could try to (1) use ./configure to extract the
library to src/ and link to it from there and (2) provide a
src/install.libs.R file to copy libdb2.so from src/ to the same
directory where the package shared object is installed. This still may
be insufficient as you might have to instruct the dynamic linker to look
for libdb2.so in the same directory when the package shared object is
loaded by R; on some compilers this may be done by passing the
-rpath='$ORIGIN' argument to the linker, but this is very
platform-dependent (no idea whether it's going to work on Solaris, for
example).

See WRE 1.1.5 for more info on install.libs.R:
https://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories<https://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories>

In short, linking an R package to a binary dependency not provided by a
system package is painful, but not explicitly prohibited by CRAN policy
("Source packages may not contain any form of binary executable code",
and yours downloads binaries when it's built, but doesn't contain any;
"Downloads of additional software <...> as part of package installation
<...> should only use secure download mechanisms", which yours does).

--
Best regards,
Ivan

================================
Rocket Software, Inc. and subsidiaries ? 77 Fourth Avenue, Waltham MA 02451 ? Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================

This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list