krlmlr / r-appveyor

Tools for using R with AppVeyor (https://appveyor.com)
132 stars 68 forks source link

--no-multiarch when installing dependencies from source #63

Closed rdiaz02 closed 5 years ago

rdiaz02 commented 8 years ago

I can't figure out how to force R to use --no-multiarch when installing a dependency from source.

I am building with Rtools33, and at least one dependency (testthat) cannot be installed from source because on the x64 build it also tries (and fails) to build for the i386 architecture and in the i386 if tries (and fails) to build for the x64 architecture. Just to make sure, I am not expecting the multiarch build to succeed, but I think the default should be (at least with Rtools33) that the installs use --no-multiarch.

An example of an i386 failing on R_ARCH=x64 can be seen here https://ci.appveyor.com/project/rdiaz02/oncosimul/build/1.0.76/job/rd16nq6o828ns4gd (line 281) and an example of an x64 build failing on i386 can be seen here, https://ci.appveyor.com/project/rdiaz02/oncosimul/build/1.0.76/job/aq8nm6lu5i9hld1a in line 283.

krlmlr commented 8 years ago

I pushed an update to my fork of r-travis which is used here, could you re-check? This issue should auto-resolve when testthat is compiled on Windows, though.

rdiaz02 commented 8 years ago

It works now, thanks a lot.

(Yes, I am aware that the testthat issue should be resolved when there are binaries for it, etc. But this could bite us at any time with any package, I guess).

I am closing the issue.

hafen commented 5 years ago

I'm still experiencing this issue. I have a github R package being installed that depends on testthat and there is a newer source version than binary so it is installing form source but trying to install 32 bit: https://ci.appveyor.com/project/hafen/kitools-r#L192.

krlmlr commented 5 years ago

Do you even need to compile from source? If not, consider setting PKGTYPE to binary as described in the README. Should this be the default (#149)?

hafen commented 5 years ago

That fixed it. Thanks.

hafen commented 5 years ago

While setting PKGTYPE: binary works in this case, I suppose there are cases where a package will need to be compiled so you don't want to set that but then a dependency could have a newer source and it tries to compile on 32 and 64 bit. Can --no-multiarch be added to install_deps() and install_github()?

krlmlr commented 5 years ago

Maybe. Do we need a new configuration variable, so that this setting is passed on consistently for all installation functions?

krlmlr commented 5 years ago

PKGTYPE: win.binary is the new default. I'm open to pull requests that make the --no-multiarch setting configurable.

pat-s commented 5 years ago

I am currently implementing this into {tic} - however this currently does not seem to solve the problem completely. See this build with INSTALL_OPTS = "--no-multiarch" passed to install.packages(). We are bypassing mingw32 but still fail.

https://ci.appveyor.com/project/ropensci/tic-vp4mj/builds/27650481#L528

I've reported this upstream at Rtools.