You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This results in a problem. When compiling for both architectures, BINPREF gets set on the 32-bit compile and then does not get reset for the 64-bit compile. As a result the 64-bit compile will fail.
Since there is already a BINPREF64 field, perhaps set BINPREF to BINPREF64 if (and only if) BINPREF64 is set:
Not true, otherwise we would not have have < 100 ERRORS on Windows for > 8000 packages on CRAN. You may want to ask your question on an appropriate mailing list including in example of your code that reproduces the problem you see.
You're right, I mischaracterized the problem, sorry about that. I was attempting to generalize it. It is a problem, though. Let me explain it like this:
I have tools in a nonstandard location. There is no way for me to do a multiarchitecture build without editing Makeconf. That's a change from 3.2. In the new build system, if you set BINPREF in your environment before building, the same value will be reused in 32- and 64- bit builds, which will not work. (If you don't set BINPREF then you can't build).
I raised this as an issue because it is a change from 3.2 and seems like it is not what was intended. If it is what was intended, then fine, I can work around it.
Why do the 8000 packages build? Presumably because the build host has tools in the default location.
I also encountered this issue. Since Rtools is not installed in C:/Rtools, BINPREF must be set for compilation to succeed. But 64-bit builds fail if you set BINPREF to .../Rtools/mingw_32/bin/ and BINPREF64 to .../Rtools/mingw_64/bin/ because BINPREF64 is not used for the x64 architecture build.
A minor change to Duncan's proposed solution worked for me. I added the following to $R_HOME/etc/x64/Makeconf:
Building packages from source fails on Windows because BINPREF is set incorrectly when compiling both 32 and 64 bit versions.
---
Makeconf (both 32- and 64-bit) use conditional assignment for BINPREF (set-if-not-set):
BINPREF ?= X:/.../mingw_32/bin
BINPREF ?= X:/.../mingw_64/bin
This results in a problem. When compiling for both architectures, BINPREF gets set on the 32-bit compile and then does not get reset for the 64-bit compile. As a result the 64-bit compile will fail.
Since there is already a BINPREF64 field, perhaps set BINPREF to BINPREF64 if (and only if) BINPREF64 is set:
BINPREF ?= X:/.../mingw_64/bin
ifdef BINPREF64
BINPREF = BINPREF64
endif
METADATA
The text was updated successfully, but these errors were encountered: