Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGZILLA #16919] Makeconf sets BINPREF incorrectly when building packages from source #6237

Open
MichaelChirico opened this issue May 19, 2020 · 4 comments

Comments

@MichaelChirico
Copy link
Owner

Building packages from source fails on Windows because BINPREF is set incorrectly when compiling both 32 and 64 bit versions.

  1. Build package from source
R CMD build X && R CMD INSTALL X
  1. 64-bit build fails

---

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

  • Bug author - duncan
  • Creation time - 2016-05-22 16:43:06 UTC
  • Bugzilla link
  • Status - UNCONFIRMED
  • Alias - None
  • Component - Windows GUI / Window specific
  • Version - R 3.3.*
  • Hardware - Other Windows 64-bit
  • Importance - P5 minor
  • Assignee - R-core
  • URL -
  • Modification time - 2018-01-05 14:44 UTC
@MichaelChirico
Copy link
Owner Author

Not true, otherwise we would not have have


METADATA

  • Comment author - Uwe Ligges
  • Timestamp - 2016-05-22 17:16:53 UTC

@MichaelChirico
Copy link
Owner Author

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.


METADATA

  • Comment author - Uwe Ligges
  • Timestamp - 2016-05-22 17:19:20 UTC

@MichaelChirico
Copy link
Owner Author

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.


METADATA

  • Comment author - duncan
  • Timestamp - 2016-05-22 20:04:50 UTC

@MichaelChirico
Copy link
Owner Author

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:

ifdef BINPREF64
BINPREF = $(BINPREF64)
endif


METADATA

  • Comment author - Joshua Ulrich
  • Timestamp - 2018-01-05 14:44:20 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant