Clang + pycparser 无法从 CPython 3.7 解析 pythread.h header
Clang + pycparser fail to parse pythread.h header from CPython 3.7
Clang
+ pycparser
无法从 CPython 3.7 解析 pythread.h
header,但这在 Travis CI 的 CPython 3.7-dev 中有效。
opt/python/3.7.0/include/python3.7m/pythread.h:122:5: error: "Require native
threads. See https://bugs.python.org/issue31370"
# error "Require native threads. See https://bugs.python.org/issue31370"
我是否应该尝试 gcc
而不是 clang
、将特定的线程标志传递给编译器或使用额外的 "faked" libc header 扩展 pycparser 并不明显编写不符合 C99 的代码?
本期更多详情:
https://github.com/pythonnet/pythonnet/issues/609#issuecomment-412959577
现在已修复,就像 Eli B. 建议编译器缺少 #define
:
https://github.com/pythonnet/pythonnet/blob/py37/tools/geninterop/geninterop.py#L177
"-D _POSIX_THREADS"
Clang
+ pycparser
无法从 CPython 3.7 解析 pythread.h
header,但这在 Travis CI 的 CPython 3.7-dev 中有效。
opt/python/3.7.0/include/python3.7m/pythread.h:122:5: error: "Require native
threads. See https://bugs.python.org/issue31370"
# error "Require native threads. See https://bugs.python.org/issue31370"
我是否应该尝试 gcc
而不是 clang
、将特定的线程标志传递给编译器或使用额外的 "faked" libc header 扩展 pycparser 并不明显编写不符合 C99 的代码?
本期更多详情:
https://github.com/pythonnet/pythonnet/issues/609#issuecomment-412959577
现在已修复,就像 Eli B. 建议编译器缺少 #define
:
https://github.com/pythonnet/pythonnet/blob/py37/tools/geninterop/geninterop.py#L177
"-D _POSIX_THREADS"