[Rd] R CMD check --force-biarch

From: Russell G. Almond <ralmond_at_macosx.com>
Date: Thu, 18 Oct 2012 12:17:56 -0400

I'm having problems getting R CMD check to work correctly on Windows 7 (64 bit) in a package that uses C code. What I want to do is to be able to pass the equivalent of the "--force-biarch" option to check, but this is only supported for INSTALL.

I'm writing a package (RNetica) which forms a link between R and a third-party library (Netica.dll). The vendor supplies this library in both a 32 bit and a 64 bit version. Under Linux, I use configure to link against the 32 or 64 bit version of libnetica.a as appropriate. Under Windows, I use configure.win to copy the 32 and 64 bit versions to "$R_PACKAGE_DIR/libs/i386" and "$R_PACKAGE_DIR/libs/x64" respectively.

This mostly works. If I run R CMD INSTALL RNetica, R detects the configure.win and only builds the 64 bit version of RNetica. [I'm not entirely clear on why R doesn't at least try to build both architectures. Wouldn't the default assumption be that the author wrote the configure.win file to handle both cases?] But if I use R CMD INSTALL RNetica --force-biarch, it correctly builds and installs both the 32 and 64 bit versions. I can verify that I can load my library and call a few functions that exercise the DLL.

When I run R CMD check RNetica, I get the following problem in my 00install.out log:
> Warning: this package has a non-empty 'configure.win' file,
> so building only the main architecture
It then fails with the message:
> Error: .onLoad failed in loadNamespace() for 'RNetica', details:
> Call: library.dynam("RNetica",pkgname, libname)

> Error: DLL 'RNetica' not found: maybe not installed for this architecture?
Sure enough, if I check the directory RNetica.Rcheck/RNetica/libs/x64 It has Netica.dll, RNetica.dll, and symbols.rds If I check the directory RNetica.Rcheck/RNetica/libs/i386 It only has Netica.dll (copied there by the configure.win).

If I run R CMD check RNetica --no-multiarch, this test runs correctly. If I run R CMD check RNetica --extra-arch, this fails at the same point.

Thanks in advance for any help.

Russell Almond

Russell G. Almond
12065 Cedar Bluff Trail
Tallahassee, FL 32312

        [[alternative HTML version deleted]]

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 19 Oct 2012 - 07:09:04 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 19 Oct 2012 - 15:10:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive