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. 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 ideal. 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. Here's my source code: https://github.com/Gastrograph/RS3 Thank you! -- Evan Farrell *Application Engineer* *Analytical Flavor Systems, LLC. * Mobile: (724) 831 - 9537 www.gastrograph.com All materials confidential If you are not the intended recipient, do not read (too late?), copy or distribute this e-mail or any attachments.Instead, please notify the sender and delete the e-mail and any attachments. Thank you. Copyright © Analytical Flavor Systems 2014 [[alternative HTML version deleted]]
On 6 August 2014 at 09: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. | | 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 | ideal. | | | 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. | | Here's my source code: https://github.com/Gastrograph/RS3 Thanks for that pointer. Could you consider "just" using Linux for now? Doing Windows is entirely doable, but more involved. As I recall, you need tricks such as not using a configure.win in order to build with both default arches on Windows. There are packages that do this, and you can "borrow" solutions from them. But none springs to my mind rightaway as I tend to deploy on Linux first, or else work with the very kind CRAN folks and have them provide 32 and 64 bit libraries on the builders themselves (as eg recently with hiredis) :) Medium-term you could do this too as libS3 is open source. Until then you can of course emulate that scheme perfectly well by building the 32 and 64 bit DLLs, store them in your repo and have Makevars.win point to them via the same env var trick used at CRAN. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
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 > ideal.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/RS3You 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 > https://stat.ethz.ch/mailman/listinfo/r-devel >-- 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