【发布时间】:2016-05-10 07:43:48
【问题描述】:
我正在尝试在 Fedora 23 中构建 moduler-boost。我已经安装了 gcc-c++ 和 python 2.7。
但它仍然给出这个错误,你知道吗?
"g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -m64 -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DBOOST_PYTHON_STATIC_LIB -DNDEBUG -I"." -I"/usr/include/python2.7" -c -o "bin.v2/libs/python/build/gcc-5.3.1/release/link-static/threading-multi/exec.o" "libs/python/src/exec.cpp"
...failed gcc.compile.c++ bin.v2/libs/python/build/gcc-5.3.1/release/link-static/threading-multi/exec.o...
gcc.compile.c++ bin.v2/libs/python/build/gcc-5.3.1/release/link-static/threading-multi/object/function_doc_signature.o
In file included from ./boost/python/detail/prefix.hpp:13:0,
from ./boost/python/converter/registrations.hpp:8,
from libs/python/src/object/function_doc_signature.cpp:9:
./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
compilation terminated.
【问题讨论】:
-
你安装python的开发包了吗?
-
不,我没有,为什么需要开发包?
-
发行版通常将程序拆分为二进制文件(我只是想使用它的东西)和与开发相关的东西。安装 python 可以获得二进制文件,安装类似于 python-dev (ubuntu et al) 或 python-devel (opensuse, centos , ...) 为您提供开发标头等。
-
为了将来参考,我建议您在发布之前尝试例如谷歌搜索有问题的实际错误。在这种情况下,“./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory”会产生很多答案。
-
感谢您的指点!我很难过为什么 boost build doc (boost.org/build/doc/html) 没有提到任何关于 python-dev 的内容