sagemath / cysignals

cysignals: interrupt and signal handling for Cython
GNU Lesser General Public License v3.0
44 stars 23 forks source link

error: "cysignals must be compiled without _FORTIFY_SOURCE" #194

Open orlitzky opened 7 months ago

orlitzky commented 7 months ago

https://github.com/sagemath/cysignals/issues/73 is back for the third time. When building with clang on Gentoo,

$ CC=clang python setup.py build
running build
running build_py
...
In file included from build/src/cysignals/signals.c:2365:
build/src/cysignals/implementation.c:27:2: error: "cysignals must be compiled without _FORTIFY_SOURCE"
#error "cysignals must be compiled without _FORTIFY_SOURCE"

The constant __USE_FORTIFY_LEVEL=3 is built in to the compiler, so the two different hacks that we have to work around this are ineffective (and yes, the result still crashes if I remove the guard). I have yet to find a third workaround.

This is also Gentoo bug 918934.