-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
macos-11.0: scipy build fails #31326
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:3
It seems like This will need investigation by someone who has already made the switch to Big Sur... |
comment:4
just want to point out that this problem exists on bash as well. For anyone wanting to test you can, after configuring, do:
to see the error. |
comment:5
I haven't tested the full homebrew-macos-11.0-xcode-minimal build, but I'm guessing it's related to MACOSX_DEPLOYMENT_TARGET. As I noted above, I can recreate the error with numpy by using sage's gfortran 9.2.0 on my machine with homebrew. As per usual I think this is because python was built with MACOSX_DEPLOYMENT_TARGET 11.0 and gfortran 9.2.0 can't recognize this value. Now I know that at some point scipy's spkg-install.in file was changed to contain the lines:
I'm not exactly sure what is in homebrew-macos-11.0-xcode-minimal, but if sage is building its own gfortran and its own python using a different MACOSX_DEPLOYMENT_TARGET then I would guess that this line might be causing the problems. It's been a while since I've thought about this problem, but it's possible that the above export might not be needed anymore since homebrew patched GCC. |
comment:6
Actually it probably shouldn't matter whether or not sage is building its own python. gfortran 9.2.0 just can't recognize MACOSX_DEPLOYMENT_TARGET=11.0. |
comment:7
Sorry for the spam, but the ticket that introduced that if statement is #31183 |
comment:8
Could you check if the gcc upgrade in #29827 fixes this issue? |
comment:9
Replying to @zlscherr:
Yes, that's right. This configuration uses a minimal installation of homebrew, plus the packages listed in |
comment:10
I also just saw that the error reported on top is in numpy and not in scipy. I'll take a look at #29827 when I get a chance, but I know that homebrew had to specifically patch GCC to avoid this sort of problem. A viable solution might be to track the legacy option to see if sage is building its own Fortran, and if so we set MACOSX_DEPLOYMENT_TARGET to 10.something |
comment:11
No, it's an error building scipy -- which uses numpy.distutils, which you see in the lines of the log |
comment:12
Ah okay. Also, do you know if the homebrew minimal test uses system for python? That might be responsible for why the deployment Target is set to 11, whereas when sage builds it's own python the deployment Target is set lower. |
comment:13
From https://groups.google.com/g/sage-release/c/KdSKg6RdZok/m/GXfB1rW1AgAJ: Runs in which scipy fails to build:
|
comment:14
For what it's worth, if I do
then the build fails on
|
comment:15
I think there are extra newlines in this version string, which confuses the numpy.distutils code |
comment:16
It's actually worse than just extra newlines. I tried manually patching to strip all whitespace from both ends, but that didn't solve the problem. I dumped the contents of the version_string which is causing numpy to fail into a text file and it turned out to be "gfortran: warning: couldn't understand version 11 9.3.0" (I tested with gcc 9.3, but the same happens with 9.2) I can get numpy and scipy to build by manually forcing MACOSX_DEPLOYMENT_TARGET to be 10.16 but it seems that 11 and 11.0 both cause problems. Here is a proposal for how to deal with this:
if we get back a value of 11 and yet the version of gfortran we are using is less than 10.2.0 then we change MACOSX_DEPLOYMENT_TARGET to 10.16 or something like that. |
comment:17
But probably the second step is not necessary, it would only be needed if the user has python3 from Homebrew and yet gfortran from sage. I think just fixing up scipy's spkg-install should fix everything. |
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:21
Thanks for investigating! To test this in various configurations, it would be enough to merge the branch of #31492 and then push a tag to your github fork of sage. |
comment:22
I think I did that correctly. I'll report on what happens in the CI on my repo. |
comment:23
I'm not sure if there is something I need to do to get the CI working, but some of the homebrew's are already failing because of an error like: curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to homebrew.bintray.com:443 Is there something I need to do to avoid this? |
comment:24
There are various ways how these CI runs can intermittently fail. It's nothing that we can fix on our side as far as I can tell. By the way, if you want, you can remove the unnecessary runs (for linux, cygwin) by editing files in |
comment:25
Replying to @mkoeppe:
@isuruf: Also this build using conda-forge is affected |
This comment has been minimized.
This comment has been minimized.
comment:27
yes, my student also reports getting
|
comment:28
I tried running on github CI, but it quit after a few days and only got through 10.15. I just took out 10.15 and am trying again... |
comment:29
I tried to run the CI tests on 11.0 but I got the following error message: "No runner matching the specified labels was found: macos-11.0" Is there a different way I should get the tests to run on Big Sur? |
comment:30
actions/runner-images#2486 |
comment:31
gotcha. I've tried some local testing and the reversion seems to be fine, but I'll leave it to others to do more extensive testing. |
comment:32
Some of my recent runs in https://github.com/mkoeppe/sage/actions/workflows/tox.yml have used branches that merged this ticket and may contain some useful results for 11.0 |
Reviewer: Matthias Koeppe |
comment:33
|
Author: Zachary Scherr |
comment:34
Also
|
comment:35
I agree it works with various Pythons on OS X 11. comment:14 has not been addressed, but I guess that's not for this ticket. |
comment:36
Replying to @jhpalmieri:
Yes, to fix that we need to upgrade our gcc/gfortran - that's #29703. |
Changed branch from u/gh-zlscherr/revert_scipy_MACOSX_DEPLOYMENT_TARGET to |
(from #31227)
Affected configurations (From https://groups.google.com/g/sage-release/c/KdSKg6RdZok/m/GXfB1rW1AgAJ)
see also https://github.com/mkoeppe/sage/runs/2103782381
CC: @jhpalmieri @zlscherr @dimpase @kliem @isuruf
Component: porting
Author: Zachary Scherr
Branch/Commit:
4cc8c4d
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/31326
The text was updated successfully, but these errors were encountered: