[Rd] Can't use custom package on windows 64-bit
Prof Brian Ripley
ripley at stats.ox.ac.uk
Wed Aug 6 17:31:33 CEST 2014
On 06/08/2014 14:47, Evan Farrell wrote:
> I've been developing a package to use S3 bucket on AWS by using libs3 code.
> I have two problems. The first is, by standard, it will attempt to
> install i386 and x64 if I don't have a configure.win.
Or if you use --force-biarch or --merge-multiarch: see ?INSTALL and
'Writing R Extensions'.
> The problem with this is that while everything appears to compile
> correctly, I get this error when trying to load the x64 library:
> "LoadLibrary error: %1 is not a valid Win32 application"
> I am able to load the 32-bit library, but when I try to load that in
> Rstudio, it says: "package is not installed for 'arch=x64'". Now I know
> that I can simply switch Rstudio to point to 32-bit R, but that is not
That' s confusing error message from Windows. It most likely means that
some DLL which your package's DLL is trying to link to cannot be found,
or can be found but is 32-bit. (In theory at least a 64-bit DLL of the
required name will be found first, if there is one.)
> Is there a way to easily fix that? So that I can either compile correctly
> the 64-bit, or I can run the 32-bit in 64-bit R.
You cannot load 32-bit DLLs into a 64-bit process. (Here that means the
process linking to the R DLL: RStudio is just an arm's-length front end
that communicates with a client in a separate process.)
> Here's my source code: https://github.com/Gastrograph/RS3
You copy DLLs into the package from elsewhere, and likely they are the
problem. If you call dyn.load() on each of those you may get a more
informative error message. Using 'Dependency Walker' (see Writing R
Extensions) can sometimes be revealing as to which DLL is missing/corrupt.
> Thank you!
> R-devel at r-project.org mailing list
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-devel