Repository navigation
Description
This issue is related to and referenced by #15333, but it is a separate issue from the general wheel building which was fixed by #15339.
Last week (2023-09-11), all of the weekly cron CI's "exotic" arch tests succeeded: https://github.com/astropy/astropy/actions/runs/6142559584. However this week (2023-09-18) we got failures in the:
- s390x
- ppc64Ie
- armv7 (32bit)
The failures are due to failure to even create the build environment for building the astropy wheel to test rather than failures in astropy itself. It appears the issue stems from a combination of the changes from #14949 and the release of numpy 1.26.
PR #14949 made the minimum numpy needed to build (not run) the astropy wheel 1.25. This means that numpy 1.25+ is needed in order to build the astropy wheel in the build environment setup by pip. This is posing a problem because prebuilt versions of numpy are not available for the archs in question. In particular, we were use the Ubuntu python3-numpy package installed via apt-get install rather than a wheel provided by pip. Currently, the latest version of numpy provided by Ubuntu (for the lunar version we use in CI) is numpy 1.24.2. The reason why #14949 did not cause exotic arch failures when it required numpy>=1.25 for building astropy is because it just so happens that the environment we build in these systems was able to allow pip to build numpy 1.25 from source as part of creating the build environment for building the astropy wheel.
Now that numpy 1.26 has been released, pip will grab numpy 1.26 for the astropy build environment (because its the latest version which satisfies our requirements), which also has no pre-builds available for these archs. This is the root of the issue because while our CI happened to have an environment which supported building numpy 1.25 it does not support building numpy 1.26.
As we have discussed in previous in #15018, it is preferable for astropy to not concern itself with how to build numpy in its CI, especially in the exotic archs CI. I believe that this is an entirely reasonable position, especially since numpy seems to be shifting its build system around in ways that make it so we have to play constant catch-up in order to continue our exotic arch testing CI. This leads to several possible solutions to this issue:
-
Cease the exotic arch testing on archs which
numpydoes not directly provide a wheel for (so anything that isn't x86_64, aarch64, or arm64).- This is likely an untenable option, as there are community members who really need us to do this.
-
Ask numpy to provide prebuilt wheels for the arches we need.
numpyis unlikely to do this just forastropy.
-
Ask Ubuntu or Debian to provide packages we can install through their package managers.
- This might be possible as it has been done for us in the past by @olebole for other packages (on Debian at least).
-
Add some complex logic to
in order to selectLine 5 in b9b552a
"numpy>=1.25,<2", numpy< 1.25 (or 1.26) in the archs we are experiencing difficulties with.- This is likely possible, but misleading as
astropyprefers the 1.25 build requirement, see Drop oldest-supported-numpy from build requirements when numpy 1.25 is released #14915. Moreover, I do not think it is appropriate forastropyto do something this drastic just to make CI pass on archs that it does not want to maintainnumpybuilding itself on.
- This is likely possible, but misleading as
-
Revert the Build: Replace oldest-supported-numpy #14949 changing the
numpyrequirement for the build environment fromoldest_supported_numpyto1.25.- The discussions around Drop oldest-supported-numpy from build requirements when numpy 1.25 is released #14915 indicate that we would prefer to keep the
1.25requirement.
- The discussions around Drop oldest-supported-numpy from build requirements when numpy 1.25 is released #14915 indicate that we would prefer to keep the
-
Pin the
numpyrequirement for the build environment<1.26.- I don't think this is a good option as one of our goals for the 1.25 lower pin was that so versions of
astropybuilt with this pin should be at least forwards compatible with thenumpy2.0 C API.
- I don't think this is a good option as one of our goals for the 1.25 lower pin was that so versions of
-
Muddle through and attempt to somehow make our exotic arch environment compatible with building
numpyfrom source under these circumstances.- As already alluded to,
astropydoes not really want to do this just to support the exotic archs builds as it is a time sink. However, doing this as an interim patch until some other fix for the issue is found.
- As already alluded to,
This solution list is likely not exhaustive so alternate solutions to discuss are welcome.
In any case, I personally don't have much more time to devote to resolving the exotic archs CI failures so I think this issue needs to be opened to the general community to find a tenable (hopefully more long-term) solution.
Activity
ngoldbaum commentedon Sep 19, 2023
For what it's worth, numpy builds all three archs as part of its CI, maybe the github actions workflow for those tests would be helpful for astropy to base its exotic arch build off of? https://github.com/numpy/numpy/blob/main/.github/workflows/linux_qemu.yml#L103
WilliamJamieson commentedon Sep 19, 2023
I looked over that workflow; however, I don't have the time right now to try to adapt it to astropy. I welcome others to try and do this.
olebole commentedon Sep 19, 2023
@WilliamJamieson Debian (and Ubuntu) have 1.24.2 as the latest version (in Debian 12 Bookworm, and in Ubuntu 23.04 and the upcoming 23.10). I can't help here with backporting 1.25 until it was packaged by the Debian numpy maintainers.
WilliamJamieson commentedon Sep 19, 2023
@olebole thanks for letting me know about the Ubuntu/Debian packaging situation.
pllim commentedon Sep 20, 2023
@olebole , is there a timeline for this to happen? 🙏
olebole commentedon Sep 20, 2023
Unfortunately not. I opened a wishlist bug (Debian#1052320) explaining that it would be nice to have it ASAP; let's see how this helps.
mhvk commentedon Sep 20, 2023
My suggestion would be for a given astropy version to pin the build requirements. So, not so much your option 6 of
numpy<1.26but rathernumpy==1.25. To me, it makes sense that we ensure that we avoid all of astropy development grinding to a half just because some build requirement is updated. Instead, the update itself should be a PR that proves it actually works for all CI.mhvk commentedon Sep 20, 2023
p.s. An alternative, which I like less: might there be a way in which we can indicate in our build requirements that
pipshould pick the latest numpy wheel that is available (i.e., disallow installing from source)?saimn commentedon Sep 21, 2023
Did you try installing openblas in the CI env ? It should be possible to compile numpy from source.
We could also use the
allow-noblasoption (as mentioned in the log) but probably better with openblas.pllim commentedon Sep 21, 2023
Worth trying... unless @WilliamJamieson already did but found problems?
pllim commentedon Sep 21, 2023
I think we should try the least-effort approach first. I'd rather us not opening up a new rabbit hole to refactor a bunch of CI infrastructure for a few obscure architectures.
pllim commentedon Oct 23, 2023
I think aarch64 is timing out in CI now too.