
I'm building using: bjam -d+2 -j8 cxxflags='-march=native -Wno-unused-local-typedefs' -sHAVE_ICU=1 - sEXPAT_INCLUDE=/usr -sEXPAT_LIBPATH=/usr/lib64 --layout=tagged threading=single,multi link=shared stage In user-config.jam I added: using python : 3.3 : /usr/bin/python3 : /usr/include/python3.3m ; I wind up with stage/lib/libboost_python.so stage/lib/libboost_python3.so But AFAICT, they were build the same way. It's be nice if one was built against python2 and the other python3, but that doesn't appear to be true. AFAICT, both were built from the same sources (using /usr/include/python3.3m). What I'd like is to build both python2 and python3 from the same source tree, installing the final shared libs into the same destination dir. Right now I have 2 different source trees, and build switching the one line in user- config.jam.

Neal Becker
What I'd like is to build both python2 and python3 from the same source tree, installing the final shared libs into the same destination dir. Right now I have 2 different source trees, and build switching the one line in user- config.jam.
In Fedora, I add the Python 3 like you do, and then additionally add e.g. python=2.7 to the b2 command line. This then builds a libboost_python.so vs. Python 2 and libboost_python3 vs. Python 3. My theory is that when Python 2 to Python 3 transition is eventually done, you still want to build libbost_python (sans 3), because lots of apps will still use -lboost_python. But by that time it will be desirable to have libboost_python built vs. Python 3. Thanks, PM

Petr Machata wrote:
Neal Becker
writes: What I'd like is to build both python2 and python3 from the same source tree, installing the final shared libs into the same destination dir. Right now I have 2 different source trees, and build switching the one line in user- config.jam.
In Fedora, I add the Python 3 like you do, and then additionally add e.g. python=2.7 to the b2 command line. This then builds a libboost_python.so vs. Python 2 and libboost_python3 vs. Python 3.
My theory is that when Python 2 to Python 3 transition is eventually done, you still want to build libbost_python (sans 3), because lots of apps will still use -lboost_python. But by that time it will be desirable to have libboost_python built vs. Python 3.
Thanks, PM
I'm not quite clear on your procedure. Adding python=2.7 to command line(having modified user-config.jam as described): bjam -d+2 -j8 cxxflags='-march=native -Wno-unused-local-typedefs' -sHAVE_ICU=1 - sEXPAT_INCLUDE=/usr -sEXPAT_LIBPATH=/usr/lib64 --layout=tagged threading=single,multi link=shared stage python=2.7 /usr/local/src/boost_1_54_0.python3/tools/build/v2/build/feature.jam:493: in feature.validate-value-string from module feature error: "2.7" is not a known value of feature <python> error: legal values: "3.3" /usr/local/src/boost_1_54_0.python3/tools/build/v2/build/property.jam:273: in validate1 from module property /usr/local/src/boost_1_54_0.python3/tools/build/v2/build/property.jam:299: in property.validate from module property /usr/local/src/boost_1_54_0.python3/tools/build/v2/build/build-request.jam:216: in convert-command-line-element from module build-request /usr/local/src/boost_1_54_0.python3/tools/build/v2/build/build-request.jam:154: in build-request.from-command-line from module build-request /usr/local/src/boost_1_54_0.python3/tools/build/v2/build-system.jam:583: in load from module build-system /usr/local/src/boost_1_54_0.python3/tools/build/v2/kernel/modules.jam:289: in import from module modules /usr/local/src/boost_1_54_0.python3/tools/build/v2/kernel/bootstrap.jam:139: in boost-build from module /usr/local/src/boost_1_54_0.python3/boost-build.jam:17: in module scope from module

Neal Becker
I'm not quite clear on your procedure. Adding python=2.7 to command line(having modified user-config.jam as described):
/usr/local/src/boost_1_54_0.python3/tools/build/v2/build/feature.jam:493: in feature.validate-value-string from module feature error: "2.7" is not a known value of feature <python> error: legal values: "3.3"
Hmm, I use locally-bootstrapped ./d2, and I now see that the bootstrap script itself creates project-config.jam with the following line: using python : 2.7 : /usr ; So, that explain why my adding Python 3 actually _added_ Python 3, not replaced the system one. Python 2 comes from another file... My guess is that if you add both pythons to user-config.jam, the effect would be the same. Thanks, PM
participants (2)
-
Neal Becker
-
Petr Machata