3

I'm building Boost 1.53.0 (latest release) in Arch 2012.6. The reason I'm building is because I need to compile as follows:

./b2 install --prefix=/usr/local/ cxxflags="-std=c++11"

Specifically, I need to supply the cxxflags="std=c++11" argument, which doesn't seem to have been used in the packages. I'm stuck because the build doesn't find the right python libraries. I have installed both python2 and python with pacman but I suspect boost requires the python 2 libs and isn't finding the required headers because Arch "defaults" to python 3. (Can you tell I'm a bit of an Arch newbie?).

I suspect I might be able to provide some more information to b2, possibly with the linkflags argument. But I'm at a bit of a dead end there.

The compile errors I'm getting are similar to this:

gcc.compile.c++ bin.v2/libs/python/build/gcc-4.8.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
 # include <pyconfig.h>

Appreciate any help, thanks everyone!

1 Answer 1

6

Adding -I/path/to/python/header/files/ to the cxxflags argument tells the compiler where to find the relevant header files. My build command therefore becomes:

./b2 install --prefix=/usr/local/ cxxflags="-std=c++11 -I/usr/include/python2.7/"
2
  • 1
    Can you expand on this? As it stands (Even if it works) it doesn't explain much and makes a poor answer for a Q&A site. Commented Jun 17, 2013 at 13:12
  • Fair enough. I'm actually a little surprised anyone even looked at this. Anyway, it's done.
    – mkingston
    Commented Jun 17, 2013 at 14:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .