-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
sage_build_cython: Do not rely on CC environment variable being set #30876
Comments
comment:1
What does happen if CC is not set, how is setup.py getting the compilers to use? Via distutils? |
comment:2
Yes, distutils. So distutils should also be used to construct the command line for this version test. |
comment:3
it looks doable, but ugly as hell: from distutils.ccompiler import new_compiler, get_default_compiler
new_compiler(get_default_compiler()).compile(["foo.c"]) and then $ strings hello.o | grep GCC
GCC: (Gentoo 8.3.1-r2 p4) 8.3.1 20190518 allows version extraction. Wouldn't it be easier to, e.g., parse the banner of Python?
|
comment:4
I think the call to |
comment:5
If I do >>> cc=new_compiler(get_default_compiler())
>>> _=cc.compile(["foo.c"], extra_preargs=['-dumpversion'])
8.3.1 then I see the version value. So one can wrap this in a script. |
comment:6
I've also asked on stackoverflow, nobody knows... |
comment:7
Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date. |
comment:9
We already reject gcc-4.7 and older in And if we do want to continue supporting gcc-4.8 from the system, couldn't we append |
comment:10
Replying to @orlitzky:
Yes, this is the compiler on We are dropping support for a platform with gcc 4.9 ( |
comment:11
A trivial fix is to just replace |
comment:12
nobody nowadays is using gcc 4 on Centos 7. There are system packages to get you gcc 9. cf. e.g. https://stackoverflow.com/a/67212990/557937 Same story with Ubuntu, more or less. We can and should drop gcc 4, without dropping OSs. |
comment:13
We can and should add variants of fedora/centos with |
comment:15
probably even more relevant than these semi-vanilla cases would be the Azure docker container used in cibuildwheel to build manylinux wheels. |
Commit: |
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
comment:21
Is the branch really in the state you want? The last commit basically remove the content of the previous one. Otherwise I am all for removing useless bits. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:23
Thanks. I've squashed/rebased it. Yes, all of it can go away |
Reviewer: François Bissey |
comment:24
We should really get that in quick. It has been waiting long enough. |
comment:25
Thanks! |
Changed branch from u/mkoeppe/sage_build_cython__do_not_rely_on_cc_environment_variable_being_set to |
(from #30580):
src/sage_setup/command/sage_build_cython.py
contains this code:This gives an (ignored) error when
CC
is not set -- which can happen if invoked outside ofsage-env
, for example when building an sdist.We remove this code, which is obsolete after #33316 (Drop support for GCC < 6.3 in Sage 9.7)
CC: @dimpase @orlitzky @kiwifb
Component: build
Author: Matthias Koeppe
Branch/Commit:
805bf82
Reviewer: François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/30876
The text was updated successfully, but these errors were encountered: