Cython compilation has suddenly started failing

I have a cythonised application which until yesterday was compiling and running completely fine.

Now, suddenly, when trying to compile (Ubuntu 20 droplet) I get this:

creating build/temp.linux-x86_64-3.8
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/var/www/anagami_console/anagami/anagamienv/include -I/usr/include/python3.8 -c event.c -o build/temp.linux-x86_64-3.8/event.o
x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The same code compiles and runs perfectly on my windows desktop using python 3.9.


Way of fixing it was to erase each and every .c and .pyd record and recompile new. I’m as yet not certain what was causing the first mistake - yet erasing + doing a totally new recompile fixed it.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


It sounds like that the server might be running out of memory. I could suggest checking your system logs to see if there are any OOM messages there.

If this is the case, you could try adding more RAM to the server or alternatively you could create a swap partition to have some extra buffer:

Best, Bobby