Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-22 10:50:08


From: "Neal D. Becker" <nbecker_at_[hidden]>

> I'm trying to build boost.python on gcc/linux. I'm stumped.
>
> I build/installed jam/bjam, and then did a boost top-level build
> using:
>
>
bjam -sGCC=gcc3 -sGXX=g++3 -sPYTHON_ROOT=/usr -sPYTHON_VERSION=2.2 -sPYTHON
_INCLUDES=/usr/include/python2.2 -sTOOLS=gcc
> ---------------------------------------------------------------------
> skipping Boost.Python library build
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> You can configure the location of your python installation, by setting:
> PYTHON_ROOT - currently "/usr"
> PYTHON_VERSION - The 2-part python Major.Minor version number (e.g.
> "2.2", NOT "2.2.1") - currently "2.2"
>
> The following are automatically configured from PYTHON_ROOT if not
> otherwise set:
> PYTHON_INCLUDES - path to Python #include directories; currently
"/usr/include/python2.2"
> PYTHON_LIB_PATH - path to Python library; currently
> "/usr/lib/python2.2/config"
> PYTHON_STDLIB_PATH - path to Python standard library modules;
currently
> "/usr/lib/python2.2"
> ---------------------------------------------------------------------

It didn't find your Python installation where you said it was. Do you have
a directory called

    /usr/lib/python2.2

?

If so, do you have a file called

    /usr/lib/python2.2/test/__init__.py

?

That's what it's looking for. If in fact your python installation leaves
you with:

    /usr/local/lib/python2.2

Then you should be setting PYTHON_ROOT to /usr/local, not /usr.

> ...found 414 targets...
> ...updating 125 targets...
> [building....]
>
> But now how do I build Boost.Python? The instructions in
> boost/libs/python/doc/building.html say
> To build and test Boost.Python from within the libs/python/build
directory, invoke
>
> bjam -sTOOLS=toolset test

Urrh, isn't 'toolset' italicized in the doc? That means you're supposed to
substitute the toolset name you wish to build with there. In this case,
gcc. See www.boost.org/tools/build

Finally, if you're just getting started with Boost.Python, let me encourage
you to try using v2 instead of v1, since v1 is going to be retired Real
Soon Now.

Instructions for getting started with v2 similar to those for v1. Details
at:

    http://mail.python.org/pipermail/c++-sig/2002-May/001100.html

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk