checking whether the Boost::Python headers are available... yes
checking for boost::python shared library... -lboost_python38
checking /usr/include/python3.8/Python.h usability... no
checking /usr/include/python3.8/Python.h presence... no
checking for /usr/include/python3.8/Python.h... no
configure: error: Required header Python.h missing. Install it, or specify --disable-python to skip the parts of LinuxCNC that depend on Python
error: Bad exit status from /var/tmp/rpm-tmp.ALK00P (%prep)
更详细的输出:
configure:9678: gcc -c -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib
In file included from /usr/include/python3.8/pystate.h:129,
from /usr/include/python3.8/genobject.h:11,
from /usr/include/python3.8/Python.h:121,
from conftest.c:88:
/usr/include/python3.8/cpython/pystate.h:9:10: fatal error: cpython/initconfig.h: No such file or directory
9 | #include "cpython/initconfig.h"
| ^~~~~~~~~~~~~~~~~~~~~~
我确实使用 python3.8 (Fedora rawhide 上的默认设置)编译了最新版本,但配置失败如下:
更详细的输出:
基本上,为了使用该标头,必须
-I
从 pkg-config() 中提供适当的选项。我补充道:
但上面需要#751这取决于#755。
但是,也避免手动传递
CPPFLAGS
给使用.configure
python
PKG_CHECK_MODULES()