sagemath / cysignals

cysignals: interrupt and signal handling for Cython. Source repository for https://pypi.org/project/cysignals/
GNU Lesser General Public License v3.0
44 stars 23 forks source link

cysignal example does not compile in cygwin #114

Closed zhaofeng-shu33 closed 5 years ago

zhaofeng-shu33 commented 5 years ago

The example uses # distutils: language = c++. However, after invoking python setup.py build in the example directory. I get the following output:

$ python setup.py build
running build
Compiling cysignals_example.pyx because it changed.
[1/1] Cythonizing cysignals_example.pyx
running build_ext
building 'cysignals_example' extension
gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/usr/src/ports/python2/python2-2.7.16-1.x86_64/build=/usr/src/debug/python2-2.7.16-1 -fdebug-prefix-map=/usr/src/ports/python2/python2-2.7.16-1.x86_64/src/Python-2.7.16=/usr/src/debug/python2-2.7.16-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/lib/python2.7/site-packages/cysignals -I/usr/include/python2.7 -c cysignals_example.cpp -o build/temp.cygwin-3.0.7-x86_64-2.7/cysignals_example.o
gcc: Error:spawn:No such file or directory
error: command 'gcc' failed with exit status 1

I guess gcc cannot spawn g++ in cygwin.

jdemeyer commented 5 years ago

That error doesn't seem related to cysignals at all. It looks like a problem with your Cygwin or Python installation. Is g++ installed?

zhaofeng-shu33 commented 5 years ago

This problem is fixed using the correct windows user to open the cygwin shell.