0

I'm trying to build moduler-boost in Fedora 23. I have installed gcc-c++ and python 2.7.

But its still giving this error, Any idea?

    "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.
Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147
  • Have you installed the development packages for python? – Ilja Everilä May 10 '16 at 07:47
  • No, I didn't, Why it needs development packages? – Nayana Adassuriya May 10 '16 at 08:00
  • Distributions usually split programs to binaries (the I-just-want-to-use-it stuff) and development related stuff. Installing *python* gets you the binaries, installing something along the lines of *python-dev* (ubuntu et al) or *python-devel* (opensuse, centos, ...) gets you the development headers etc. – Ilja Everilä May 10 '16 at 08:05
  • For future reference, may I suggest you try for example googling the actual error in question before posting. In this case "./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory" would yield a multitude of answers. – Ilja Everilä May 10 '16 at 08:10
  • Thanks for the point! I'm sad why boost build doc (http://www.boost.org/build/doc/html/) didn't mention anything about python-dev – Nayana Adassuriya May 10 '16 at 08:18

1 Answers1

0

As you've already specified the path to the python version you want to build against, I'm guessing you're missing the developer headers for python.

On ubuntu, install either python-dev or, more specifically, libpython2.7-dev.

Marcus
  • 101