MAINT: Pin rtools version on Windows.#23678
Conversation
|
Not sure this will work, we will see. |
|
That looks right to me. How does the RTOOLS40_HOME environment variable get created? |
Looks like it is set by rtools during installation. Maybe that is why not all the windows tests were failing? So maybe using |
|
Darn, still failing. |
|
Note that full tests on 64 bit windows passed. |
.github/workflows/wheels.yml
Outdated
| run: | | ||
| echo "PLAT=i686" >> $env:GITHUB_ENV | ||
| echo "PATH=$env:RTOOLS40_HOME\mingw32\bin;$env:PATH" >> $env:GITHUB_ENV | ||
| echo "PATH=$env:RTOOLS43_HOME\mingw32\bin;$env:PATH" >> $env:GITHUB_ENV |
There was a problem hiding this comment.
I don't think you want this. RTOOLS43_HOME would be for the one that's just been released (it's not clear to me what's actually creating that environment variable).
On scipy we use:
choco install rtools -y --no-progress --force --version=4.0.0.20220206
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH
that puts the 64 bit gcc/gfortran/pkg-config on PATH. If you want the 32-bit tools they're in C:\rtools40\mingw32\bin. You can either put those directories on PATH or set the RTOOLS40_HOME variable correctly.
To fix the issue I think you need to set the RTOOLS40_HOME variable, i.e.
$env:RTOOLS40_HOME = "c:\rtools40"
or
echo "RTOOLS40_HOME=c:\rtools40" >> "$GITHUB_ENV"
| @@ -109,7 +109,7 @@ jobs: | |||
| - name: setup rtools for 32-bit | |||
| run: | | |||
| echo "PLAT=i686" >> $env:GITHUB_ENV | |||
There was a problem hiding this comment.
I think you need a choco install rtools -y --no-progress --force --version=4.0.0.20220206 line here. Otherwise you'll get rtools43 by default.
azure-steps-windows.yml
Outdated
|
|
||
| - powershell: | | ||
| choco install -y rtools --force --version=4.0.0.20220206 | ||
| choco install -y rtools |
There was a problem hiding this comment.
The RTOOLS43_HOME variable may not have been set?
azure-steps-windows.yml
Outdated
| $env:CFLAGS = "-m32" | ||
| $env:LDFLAGS = "-m32" | ||
| $env:PATH = "$env:RTOOLS40_HOME\\mingw32\\bin;$env:PATH" | ||
| $env:PATH = "$env:RTOOLS43_HOME\\mingw32\\bin;$env:PATH" |
There was a problem hiding this comment.
If you want to use rtools43 it'd be worth checking that the tools are in the same place.
b9de6fb to
b9e1489
Compare
|
Those tests look as if they're using gfortran to compile code. If you look at https://dev.azure.com/numpy/numpy/_build/results?buildId=29282&view=logs&j=d02055d6-a30d-5402-19aa-ca2310eeee52&t=3b8a6fc4-0b0a-5f32-7dd9-04a675f63363&l=1691 I think the 64 bit compiler is being picked up, rather than the 32 bit. The 32 bit is in $env:RTOOLS40_HOME\mingw32\bin. |
|
The path and flags look correct: What I cannot determine is what changed to make the tests suddenly fail. Do we need some flags for gfortran? |
e2dfebc to
110878c
Compare
|
Seems like adding the path worked, just harder to do then one would think. Is this the right thing then (with maybe tiny cleanup?). EDIT: Is the |
bba74e6 to
ea7e831
Compare
I'm giving it a shot, let's see how it does. I would prefer that as it is hopefully global. It turns out that rtools 42+ do not support 32 bit builds, so we are stuck with pinning rtools until we drop the 32 bit Windows builds. |
|
I'm also curious to see if the 32 bit wheel builds work tonight. |
Yes, I think that's the way to add things permanently to path. If you add an environment variable in one step they're not carried through to subsequent steps. See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable. GITHUB_ENV does environment variables, GITHUB_PATH does path I think. |
|
(I did try making a PR against @charris fork to try to illustrate this) |
See scipy/scipy#18374 for the reason. Closes numpy#23675.
ea7e831 to
0e43b3f
Compare
|
Used the (different) method we used in |
See scipy/scipy#18374 for the reason.
Closes #23675.