For instance, conda python uses its own GCC compiler, and we should g++ in this toolchain.
The Cython extension always sets language="c++".
The reason why:
restrain_hotspot.pyx, is written in cython with STL, and importing this without using "language=c++" causes:
tree = Parsing.p_module(s, pxd, full_module_name)
RestrainJIT_m.c:622:10: fatal error: ios: No such file or directory
#include "ios"
^~~~~
compilation terminated.
The RTS files, including the corresponding .c, .h and .cpp files, are likely to produce a name mangling issue when using gcc to compile:
ImportError: /tmp/tmpjnapmslp/RestrainJIT_m.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Z8ptrtointPv # should be ptrtoint
For instance, conda python uses its own GCC compiler, and we should g++ in this toolchain. The Cython extension always sets
language="c++"
.The reason why:
restrain_hotspot.pyx, is written in cython with STL, and importing this without using "language=c++" causes:
The RTS files, including the corresponding
.c
,.h
and.cpp
files, are likely to produce a name mangling issue when usinggcc
to compile: