From Whitmore_Mattie at bah.com Wed Sep 10 00:19:00 2014 From: Whitmore_Mattie at bah.com (Whitmore, Mattie [USA]) Date: Tue, 9 Sep 2014 22:19:00 +0000 Subject: [C++-sig] Building Boost with python2.7 libraries on centos 6.5 Message-ID: <94E76852C06AB64BAED65DA3389EB8D63A0ADA2D@ASHBDAG3M2.resource.ds.bah.com> 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::::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? Thanks in advance Mattie -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at seefeld.name Wed Sep 10 13:25:09 2014 From: stefan at seefeld.name (Stefan Seefeld) Date: Wed, 10 Sep 2014 07:25:09 -0400 Subject: [C++-sig] Building Boost with python2.7 libraries on centos 6.5 In-Reply-To: <94E76852C06AB64BAED65DA3389EB8D63A0ADA2D@ASHBDAG3M2.resource.ds.bah.com> References: <94E76852C06AB64BAED65DA3389EB8D63A0ADA2D@ASHBDAG3M2.resource.ds.bah.com> Message-ID: <54103515.6050702@seefeld.name> 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::::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... From raghavendra.jain at gmail.com Thu Sep 11 10:12:34 2014 From: raghavendra.jain at gmail.com (Raghvendra Jain) Date: Thu, 11 Sep 2014 17:12:34 +0900 Subject: [C++-sig] Building Boost with python2.7 libraries on centos 6.5 In-Reply-To: <54103515.6050702@seefeld.name> References: <94E76852C06AB64BAED65DA3389EB8D63A0ADA2D@ASHBDAG3M2.resource.ds.bah.com> <54103515.6050702@seefeld.name> Message-ID: 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 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::::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: From micdestefano at users.sourceforge.net Sun Sep 28 10:06:28 2014 From: micdestefano at users.sourceforge.net (Michele De Stefano) Date: Sun, 28 Sep 2014 10:06:28 +0200 Subject: [C++-sig] mds-utils 2.1.0 released Message-ID: I am pleased to announce the release of mds-utils 2.1.0 . Features summary --------------------------- MDS-UTILS provides: 1. a tool for detecting machine endianity. 2. utilities for the Boost uBLAS library. Amongst them, some type traits for detecting different uBLAS matrix types. 3. some useful classes that allow to treat the old C FILE pointer as a C++ stream. 4. C++ wrappers of the main Python objects, independent of those in Boost Python. Wrappers are provided also for NumPy arrays. 5. C++ classes that help on treating Python file objects as C++ streams. 6. a review and refactor of the indexing support in Python extensions. Now access in write mode is supported too. 7. new C++ *to-Python* and *from-Python* converters for some *Boost uBlas* objects and for standard Python objects. These converters do not depend on Boost Python. 8. a new sequence iterator that is able to wrap Python sequences and allows also to modify them. This feature does not depend on Boost.Python. 9. the NDArrayIterator class, that wraps the Numpy C-API iterator and allows easy management of conversions to/from Numpy arrays. 10. some SWIG interface files, for easy integration with SWIG extensions for Python. Each class is a well-documented, small, easy to use and it should never be too difficult to learn to use it. A large percentage of this library makes a heavy usage of the Boost C++ libraries : so, they must be installed on the system. It is assumed that the user is familiar with them. Michele De Stefano -------------- next part -------------- An HTML attachment was scrubbed... URL: From mohammed_elafifi at yahoo.com Sun Sep 28 10:30:31 2014 From: mohammed_elafifi at yahoo.com (Mohammed El-Afifi) Date: Sun, 28 Sep 2014 01:30:31 -0700 Subject: [C++-sig] boost.python built with VC2010 Message-ID: <1411893031.57729.YahooMailNeo@web162203.mail.bf1.yahoo.com> Hello, I have successfully built boost.python with visual c++ 2010(dynamic library, 64-bit). I have python 2.7.8 64-bit installed on windows 7 64-bit. I've read here https://docs.python.org/2/distutils/apiref.html#module-distutils.msvccompiler that python extensions should be built with the same compiler that was used to build python itself. My question is, since python 2.7.8 was built with visual c++ 2008 64-bit compiler, can I have the following mix a) my python extension built with VC2008 64-bit(to match python itself) b) 64-bit boost.python dll built with VC2010 64-bit c) python 64-bit, built itself with VC2008 64-bit? I've noticed that boost.python dll depends on python dll and that's why I'm quite worried about the mix. Appreciating your insights. From giuseppe.corbelli at copanitalia.com Mon Sep 29 16:36:27 2014 From: giuseppe.corbelli at copanitalia.com (Giuseppe Corbelli) Date: Mon, 29 Sep 2014 16:36:27 +0200 Subject: [C++-sig] boost.python built with VC2010 In-Reply-To: <1411893031.57729.YahooMailNeo@web162203.mail.bf1.yahoo.com> References: <1411893031.57729.YahooMailNeo@web162203.mail.bf1.yahoo.com> Message-ID: <54296E6B.10808@copanitalia.com> On 28/09/2014 10:30, Mohammed El-Afifi wrote: > Hello, > I have successfully built boost.python with visual c++ 2010(dynamic library, > 64-bit). I have python 2.7.8 64-bit installed on windows 7 64-bit. I've read > here > https://docs.python.org/2/distutils/apiref.html#module-distutils.msvccompiler > that python extensions should be built with the same compiler that was used to > build python itself. My question is, since python 2.7.8 was built with visual > c++ 2008 64-bit compiler, can I have the following mix > a) my python extension built with VC2008 64-bit(to match python itself) > b) 64-bit boost.python dll built with VC2010 64-bit > c) python 64-bit, built itself with VC2008 64-bit? > I've noticed that boost.python dll depends on python dll and that's why I'm > quite worried about the mix. Appreciating your insights. You would end up having multiple copies of C runtime loaded (msvcrt) and it's not a good idea. Don't have any reference at hand right now, sorry. -- Giuseppe Corbelli WASP Software Engineer, Copan Italia S.p.A Phone: +390303666318 Fax: +390302659932 E-mail: giuseppe.corbelli at copanitalia.com