[C++-sig] Building Boost with python2.7 libraries on centos 6.5

Raghvendra Jain raghavendra.jain at gmail.com
Thu Sep 11 10:12:34 CEST 2014


Hi Mattie,

Here are the instructions for installation. I had used 1.54. Please modify
the version in instructions that suit yours.

1.  In the directory where you want to put the Boost installation, execute

tar --bzip2 -xf /path/to/boost_1_54_0.tar.bz2

Then, do this from the boost download directory:

 $ ./bootstrap.sh --prefix=$HOME/pool --libdir=$HOME/pool/lib
--with-libraries=signals,thread,python
 $ ./bjam variant=release link=shared install


For recent versions, the second line should read

 $./b2
 $./b2 install

A few notes:

   - To make installation faster, you can use -jX option after b2 or bjam.  X
   in above command, is the number of threads your PC can handle. If you use
   VM on windows, Please go to My Computer(right click)-->Device Manager -->
   Processors to see the list of processors you have. Usually, the list of
   processors are equal to no. of threads that could be run concurrently. So,
   its 4 processors, please use -j4 option.
   - You may omit --with-libraries=... if you want to build all of boost,
   but it will make the compile take somewhat longer


   - You may adapt the file and directory names to suit your liking,
   however the rest of this tutorial will assume that you use these paths.

Also, do the following to install the Boost libraries from the command line
using apt-get utility ( for Ubuntu ), please change for fedora with yum:

     $ sudo apt-get install libboost-all-dev
     $ sudo apt-get upgrade

I hope it works. Please feel free to ask.


Cheers,

Raghav



On Wed, Sep 10, 2014 at 8:25 PM, Stefan Seefeld <stefan at seefeld.name> wrote:

> On 09/09/2014 06:19 PM, Whitmore, Mattie [USA] wrote:
> > Dear All,
> >
> > I must build boost 1.46.1 from source since yum does not support it. I
> > am running into issues with the proper make commands. I have run:
> >
> >
> > ./bootstrap.sh -with-libraries=python -with-python=Python2.7
> > -with-toolset=gcc
> >
> > ./bjam -a --layout=tagged -q
> >
> >
> > libs/python/src/numeric.cpp:22: warning:
> > ‘boost::python::numeric::<unnamed>::array_module’ defined but not used
> >
> >
> > "g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall
> > -pthread -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE
> > -DBOOST_PYTHON_STATIC_LIB -DNDEBUG -I"." -I"/usr/include/python2.6" -c
> > -o
> >
> "bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/numeric.o"
> > "libs/python/src/numeric.cpp"
> >
> >
> > ...failed gcc.compile.c++
> >
> bin.v2/libs/python/build/gcc-4.4.7/release/link-static/threading-multi/numeric.o...
> >
> > ...failed updating 1 target...
> >
> >
> > Does anyone have suggestions on building boost with python libraries?
> > Is this because I am not building all of the libraries at once?
> >
>
> The above doesn't contain any actual error, only a warning, so it's hard
> to tell what went wrong. Can you sent the full output, please ?
>
> Stefan
>
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> https://mail.python.org/mailman/listinfo/cplusplus-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20140911/7358b469/attachment.html>


More information about the Cplusplus-sig mailing list