-
-
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
Fix build errors with pplpy, scipy, kiwisolver, fpylll on macos with system python3 #29408
Comments
comment:1
this needs details on the Python (system MacOS? Homebrew? CPython package?) and on clang (XCode? Homebrew? Other (e.g. conda?)) |
This comment has been minimized.
This comment has been minimized.
comment:3
what I gather from these links is that Pythons in MacOS are not Homebrew ones. |
This comment has been minimized.
This comment has been minimized.
comment:5
Replying to @dimpase:
That's right, this is system python3 from |
This comment has been minimized.
This comment has been minimized.
comment:7
Something seems to get very confused about values from sysconfig as it tries to replace
|
comment:8
It is caused by bizarre code in |
comment:9
https://github.com/python/cpython/blob/master/Lib/distutils/unixccompiler.py#L180
|
comment:10
Yes, my head hurts when I look at that file. I am fairly sure distros all over have patches for some aspects of it. From the line it expect some behavior from xcode. |
comment:11
Hum
Is it just a stupid |
comment:12
No, the linked code is really replacing "xcrun" by "g++". |
comment:13
More context, more fun at https://github.com/python/cpython/blob/master/Lib/_osx_support.py |
comment:14
Each of |
comment:15
Google search for LDCXXSHARED distutils brings up various things |
comment:16
It's an existing Python issue: https://bugs.python.org/issue8027 |
comment:18
More precisely, this one: https://bugs.python.org/issue1222585 |
comment:19
... open since 2005 |
comment:20
Related previous issue: #17484 |
comment:21
Replying to @mkoeppe:
Upstream python does have a bad history of compiler/linker support (especially differentiation between C and C++ actually). |
comment:22
A simple workaround is to clear the CXX environment variable before we call the installation. |
comment:23
Hum, OK but only for OSX. The problem is that we set CXX as a c++11 compiler which means CXX may actually be Why does CXX includes |
comment:24
Our own python3 has But you are right, for a system python3, we would not be able to assume that the sysconfig CXX is a C++11 compiler. |
comment:25
So I guess this needs to be figured out at configure time. |
comment:26
A different workaround is to set |
comment:63
On
|
comment:65
Also
|
comment:67
Started again from scratch. Turns out I broke it 4 years ago in #21175 by setting |
Changed author from Matthias Koeppe, Isuru Fernando to Matthias Koeppe |
comment:69
Tests run in https://github.com/mkoeppe/sage/actions/runs/73955490 |
comment:70
This works for me, but I don't understand the changes in |
comment:71
So if someone else wants to review it, I am happy to give some fraction of a positive review. |
comment:72
Replying to @jhpalmieri:
There was already a test that the system python (in the venv) is able to build a C extension. |
comment:73
Replying to @jhpalmieri:
100% thanks already |
comment:74
Let's also get this one into the next beta please |
comment:77
Okay, let's merge it. I can't get polymake to build with or without these changes, and the changes make sense. Re polymake, here is the error:
It's probably the old problem of not having the right perl modules present and Sage's polymake build system failing to recognize that. The instructions in polymake's SPKG.txt are no longer valid. In any case, the polymake problems should be dealt with at #29054. |
Reviewer: John Palmieri |
comment:78
Thanks. Yes, polymake will take more work. |
On the platform
local-homebrew-macos
defined bytox.ini
, running on amacos-latest
system as defined in https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources, a branch that includes #27824 (spkg-configure.m4 for python3) leads to the following error withpplpy
, as seen in https://github.com/mkoeppe/sage/runs/538432631:Same kind of error with scipy, kiwisolver, fpylll.
Full logs can be downloaded at the above link.
To test locally, using #29104 + #27824, remove all python3 from the homebrew in /usr/local
and run
With #29417, it is:
(broken out from #29404)
CC: @dimpase @videlec @kiwifb @mwageringel @embray @jhpalmieri @vbraun
Component: packages: standard
Author: Matthias Koeppe
Branch/Commit:
8317c3e
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/29408
The text was updated successfully, but these errors were encountered: