Skip to content

Cython RTS files should be compiled via corresponding c++ compiler instead the c compiler #16

@thautwarm

Description

@thautwarm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions