From edd at debian.org  Wed Aug  6 16:49:33 2014
From: edd at debian.org (Dirk Eddelbuettel)
Date: Wed, 6 Aug 2014 09:49:33 -0500
Subject: [Rd] Can't use custom package on windows 64-bit
In-Reply-To: <CABwr+hiiOQfqo8DnLAnhVSZqepjzYn1XVuz0QLV_QVb04H0iBw@mail.gmail.com>
References: <CABwr+hiiOQfqo8DnLAnhVSZqepjzYn1XVuz0QLV_QVb04H0iBw@mail.gmail.com>
Message-ID: <21474.16509.155682.221834@max.nulle.part>


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



[Rd] Can't use custom package on windows 64-bit
Dirk Eddelbuettel