Skip to content
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

cysignals install fails on Fedora with system python3 #120

Closed
mkoeppe opened this issue Apr 9, 2020 · 1 comment
Closed

cysignals install fails on Fedora with system python3 #120

mkoeppe opened this issue Apr 9, 2020 · 1 comment

Comments

@mkoeppe
Copy link

mkoeppe commented Apr 9, 2020

cysignals tries to make sure that _FORTIFY_SOURCE is undefined by using Extension(undef_macros=...) (https://github.com/sagemath/cysignals/blob/master/setup.py#L46). distutils.ccompiler.CCompiler.gen_preprocess_options generates the compiler flag -U_FORTIFY_SOURCE from that.

However, Fedora uses -Wp,-D_FORTIFY_SOURCE=2, which is passed directly to the C preprocessor and overrides the -U flag.

See https://trac.sagemath.org/ticket/29473

@jdemeyer
Copy link
Collaborator

Duplicate of #80. I'm open to pull requests, provided that they don't break anything on other systems.

First of all, cysignals really doesn't work with _FORTIFY_SOURCE since it abuses the stack in ways that violate some -D_FORTIFY_SOURCE` checks.

The best solution would be for Cython to allow adding arbitrary code in the beginning of the generated .c file. Then we could simply write

#undef _FORTIFY_SOURCE

there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants