Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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/"
share|improve this answer
    
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. –  AthomSfere Jun 17 '13 at 13:12
    
Fair enough. I'm actually a little surprised anyone even looked at this. Anyway, it's done. –  mkingston Jun 17 '13 at 14:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.