-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Accept /usr/bin/python3 from XCode 12.3 on macOS 10.15 (Catalina) and 11 (Big Sur) #31227
Comments
Dependencies: #31132 |
New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:8
This is the branch that I had. I won't have time to work on it over the next week. |
This comment has been minimized.
This comment has been minimized.
Author: Matthias Koeppe |
Reviewer: https://github.com/kliem/sage/pull/36/checks, Jonathan Kliem |
comment:10
I'm happy with this ticket, but I will have to wait and see if things work out in practice. |
This comment has been minimized.
This comment has been minimized.
comment:13
With this branch, |
comment:14
Did you run |
comment:15
Replying to @mkoeppe:
No, sorry for the false report. Having run |
Attachment: pillow-8.0.1.log |
comment:16
Attachment: cython-0.29.21.log Oh, and |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:62
Here's a new version to try on big sur |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:64
Started tests at https://github.com/mkoeppe/sage/actions/runs/526769308 but it looks like there is a long wait time to get macos instances |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:69
For the record, I was able to successfully build sage and documentation with this ticket on Big Sur using --with-python=/usr/bin/python3 |
comment:70
Thanks for testing! |
comment:71
Works for me with the system Python 3 on both Big Sur and Catalina. |
comment:72
Thanks for testing! Let's deal with issue #31314 (messages from Ready for review? |
comment:73
Replying to @mkoeppe:
Some results have been coming in:
Still waiting for the tests with other xcode versions (12.2, 12.3, 12.4). No failures so far. Note all runs are on |
Changed reviewer from https://github.com/kliem/sage/pull/36/checks, Jonathan Kliem to Jonathan Kliem |
comment:74
I'm happy with this ticket, but I would like another opinion on this. |
comment:75
Ok, I give it another 24 hours. If nobody speaks up, I'll give a positive review (after taking a final look of course). |
comment:76
I don't feel like I have enough experience to review this, but it certainly built on Big Sur and Catalina. I'm going to upgrade Big Sur to 11.2 later and see if this builds on 11.2 as well. |
comment:77
Replying to @mkoeppe:
Some more results:
|
comment:78
Let's take care of the I think this is sufficient improvement for one ticket. |
comment:80
Seems to work well on Big Sur 11.2 with standard homebrew packages. When running make ptest I get the annoying warnings: ld: warning: dylib (/usr/local/lib/libgmp.dylib) was built for newer macOS version (10.15) than being linked (10.14.6) which is probably because the MACOSX_DEPLOYMENT_TARGET for /usr/bin/python3 is set to 10.14.6 which doesn't match what Homebrew sets. It's easy enough to eliminate the warnings by setting MACOSX_DEPLOYMENT_TARGET=11.0 before doing all the testing. Otherwise, everything seems to build/test correctly. |
comment:81
Ok. Thanks for fixing all of this. I think the ticket is a good improvement as it is. |
comment:82
Thanks! |
Changed branch from u/mkoeppe/accept__usr_bin_python3_from_xcode_12_3_on_macos_10_15__catalina_ to |
(from #31132)
#27122 determines whether CC accepts
-march=native
and then adds it globally toCFLAGS
inbuild/bin/sage-build-env
.#30725 fixes this for macOS, where some packages are explicitly built with
clang
.However, there is another mechanism how
clang
can come in: Python extension modules are compiled with the compiler listed in sysconfig. On macOS with homebrew, using/usr/bin/python3
, this could again beclang
, which does not accept-march=native
in combination with-arch arm64
(which is provided even on x86_64 ifARCHFLAGS
is unset).In this ticket, we fix this by checking whether the compiler used by distutils accepts
-march=native
(or more generally, the flags determined earlier byconfigure
). If it does not, then we disable the use of these flags.In order to test this with
/usr/bin/python3
from XCode 12.3 (on macOS 10.15 (Catalina)), we fix another issue:This python3 (3.8.2) is not able to build extension modules because it emits
-arch arm64 -arch x86_64
unlessARCHFLAGS
is set explicitlyIn this ticket, if the distutils test fails, we try if setting
ARCHFLAGS=""
fixes it. Also, after accepting a system python andARCHFLAGS
so far has not been set, we test whether the system python wants to do the multi-arch build.In either of these two cases, we store a configuration variable that causes
sage-env
to setARCHFLAGS
as well.This is somewhat complicated logic - we are tiptoeing around previous breakage that had been caused by setting
ARCHFLAGS
unconditionally (#29408).Depends on #31132
Depends on #30725
CC: @jhpalmieri @zlscherr @dimpase @kliem @vbraun
Component: build: configure
Author: Matthias Koeppe
Branch/Commit:
fc8b676
Reviewer: Jonathan Kliem
Issue created by migration from https://trac.sagemath.org/ticket/31227
The text was updated successfully, but these errors were encountered: