Did Boost 1.59.0 change the meaning of "using python : 3.4 : ..." in user-config.jam?
Hi, I'm trying to update the Fedora rawhide package to Boost 1.59.0 and the build fails with the output below (ignore the MPI warnings). We build with the following in user-config.jam: # This _adds_ extra python version. It doesn't replace whatever # python 2.X is default on the system. using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : : : : m ; Is that comment no longer true? Did something change in Boost 1.59.0 so that that line now sets the only allowed python version? I can make the build work with the following but I'd like to understand the change: using python : 2.7 : /usr/bin/python2 : /usr/include/python2.7 : : : : ; using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : : : : m ; Build failure: + echo ============================= build serial ================== + ./b2 -d+2 -q -j4 --without-mpi --without-graph_parallel --build-dir=serial variant=release threading=multi debug-symbols=on pch=off python=2.7 stage MPI auto-detection failed: unknown wrapper compiler mpic++ Please report this error to the Boost mailing list: http://www.boost.org You will need to manually configure MPI support. /builddir/build/BUILD/boost_1_59_0/tools/build/src/build/feature.jam:494: in feature.validate-value-string from module feature error: "2.7" is not a known value of feature <python> error: legal values: "3.4" /builddir/build/BUILD/boost_1_59_0/tools/build/src/build/property.jam:276: in validate1 from module property /builddir/build/BUILD/boost_1_59_0/tools/build/src/build/property.jam:302: in property.validate from module property /builddir/build/BUILD/boost_1_59_0/tools/build/src/build/build-request.jam:216: in convert-command-line-element from module build-request /builddir/build/BUILD/boost_1_59_0/tools/build/src/build/build-request.jam:154: in build-request.from-command-line from module build-request /builddir/build/BUILD/boost_1_59_0/tools/build/src/build-system.jam:583: in load from module build-system /builddir/build/BUILD/boost_1_59_0/tools/build/src/kernel/modules.jam:295: in import from module modules /builddir/build/BUILD/boost_1_59_0/tools/build/src/kernel/bootstrap.jam:139: in boost-build from module /builddir/build/BUILD/boost_1_59_0/boost-build.jam:17: in module scope from module
On 21-Aug-15 8:11 PM, Jonathan Wakely wrote:
Hi,
I'm trying to update the Fedora rawhide package to Boost 1.59.0 and the build fails with the output below (ignore the MPI warnings).
We build with the following in user-config.jam:
# This _adds_ extra python version. It doesn't replace whatever # python 2.X is default on the system. using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : : : : m ;
Is that comment no longer true?
Jonathan, I've just tried with the following user-config.jam: using python : 2.7 : C:/Python27 ; using python : 3.4 : C:/Python34 ; and was able to do both "b2 python=2.7" and "b2 python=3.4" and these appear to pick different python version - at least the latter produces a different set of warnings. I'm not entirely sure what the comment mean regarding system python 2.X. There is code in libs/python/build/Jamfile.v2 that does "using python" if no previous python initialization is found. That code is executed after user-config.jam and all other config files. I don't believe there was ever code to add 2.X python implicitly, so if you have "using python : 3.4", you must have "using python : 2.7" somewhere too for that version to be used. Maybe 2.7 used to be initialized in site-config.jam? Does that help? - Volodya
On 23 August 2015 at 18:05, Vladimir Prus wrote:
On 21-Aug-15 8:11 PM, Jonathan Wakely wrote:
Hi,
I'm trying to update the Fedora rawhide package to Boost 1.59.0 and the build fails with the output below (ignore the MPI warnings).
We build with the following in user-config.jam:
# This _adds_ extra python version. It doesn't replace whatever # python 2.X is default on the system. using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : : : : m ;
Is that comment no longer true?
Jonathan,
I've just tried with the following user-config.jam:
using python : 2.7 : C:/Python27 ; using python : 3.4 : C:/Python34 ;
and was able to do both "b2 python=2.7" and "b2 python=3.4" and these appear to pick different python version - at least the latter produces a different set of warnings.
Yes, if I add "using python : 2.7 : blahblah;" then it works, but we've been building using Python 2.7 without that extra line since 2012, and something seems to have changed in Boost 1.59.0
I'm not entirely sure what the comment mean regarding system python 2.X. There is code in libs/python/build/Jamfile.v2 that does "using python" if no previous python initialization is found. That code is executed after user-config.jam and all other config files. I don't believe there was ever code to add 2.X python implicitly, so if you have "using python : 3.4", you must have "using python : 2.7" somewhere too for that version to be used.
OK, I guess we've been doing it wrong but it just worked by chance.
Maybe 2.7 used to be initialized in site-config.jam?
No, we don't use a site-config.jam, we just unpack the release tarball, apply some patches and create a user-config.jam
Does that help?
Yes, it confirms that adding the "using python : 2.7 : blahblah;" line is correct, thanks.
On 24-Aug-15 11:41 AM, Jonathan Wakely wrote:
On 23 August 2015 at 18:05, Vladimir Prus wrote:
On 21-Aug-15 8:11 PM, Jonathan Wakely wrote:
Hi,
I'm trying to update the Fedora rawhide package to Boost 1.59.0 and the build fails with the output below (ignore the MPI warnings).
We build with the following in user-config.jam:
# This _adds_ extra python version. It doesn't replace whatever # python 2.X is default on the system. using python : 3.4 : /usr/bin/python3 : /usr/include/python3.4m : : : : m ;
Is that comment no longer true?
Jonathan,
I've just tried with the following user-config.jam:
using python : 2.7 : C:/Python27 ; using python : 3.4 : C:/Python34 ;
and was able to do both "b2 python=2.7" and "b2 python=3.4" and these appear to pick different python version - at least the latter produces a different set of warnings.
Yes, if I add "using python : 2.7 : blahblah;" then it works, but we've been building using Python 2.7 without that extra line since 2012, and something seems to have changed in Boost 1.59.0
Maybe "using python : 2.7" was previously added by bootstrap.sh. If you still have 1.58 conveniently available, could you run bootstrap.sh and compare the generated project-config.jam with the one in 1.59? Again, it's not intended change, but maybe something in python detection got broke. - Volodya
On 24 August 2015 at 10:15, Vladimir Prus wrote:
Maybe "using python : 2.7" was previously added by bootstrap.sh. If you still have 1.58 conveniently available, could you run bootstrap.sh and compare the generated project-config.jam with the one in 1.59?
Aha, good thinking: --- boost_1_58_0/project-config.jam 2015-08-24 16:54:41.177750798 +0100 +++ boost_1_59_0/project-config.jam 2015-08-24 16:55:03.936748390 +0100 @@ -15,7 +15,11 @@ project : default-build <toolset>gcc ; # Python configuration -using python : 2.7 : /usr ; +import python ; +if ! [ python.configured ] +{ + using python : 2.7 : /usr ; +} path-constant ICU_PATH : /usr ; So with 1.59.0 the python-2.7 config is only added if python.configured is true, but it used to be there unconditionally.
On 24 August 2015 at 16:57, Jonathan Wakely wrote:
On 24 August 2015 at 10:15, Vladimir Prus wrote:
Maybe "using python : 2.7" was previously added by bootstrap.sh. If you still have 1.58 conveniently available, could you run bootstrap.sh and compare the generated project-config.jam with the one in 1.59?
Aha, good thinking:
--- boost_1_58_0/project-config.jam 2015-08-24 16:54:41.177750798 +0100 +++ boost_1_59_0/project-config.jam 2015-08-24 16:55:03.936748390 +0100 @@ -15,7 +15,11 @@ project : default-build <toolset>gcc ;
# Python configuration -using python : 2.7 : /usr ; +import python ; +if ! [ python.configured ] +{ + using python : 2.7 : /usr ; +}
path-constant ICU_PATH : /usr ;
So with 1.59.0 the python-2.7 config is only added if python.configured is true, but it used to be there unconditionally.
Oops, sorry, of course it's only added if it's *false* :-)
On 24 August 2015 at 17:02, Jonathan Wakely wrote:
On 24 August 2015 at 16:57, Jonathan Wakely wrote:
On 24 August 2015 at 10:15, Vladimir Prus wrote:
Maybe "using python : 2.7" was previously added by bootstrap.sh. If you still have 1.58 conveniently available, could you run bootstrap.sh and compare the generated project-config.jam with the one in 1.59?
Aha, good thinking:
--- boost_1_58_0/project-config.jam 2015-08-24 16:54:41.177750798 +0100 +++ boost_1_59_0/project-config.jam 2015-08-24 16:55:03.936748390 +0100 @@ -15,7 +15,11 @@ project : default-build <toolset>gcc ;
# Python configuration -using python : 2.7 : /usr ; +import python ; +if ! [ python.configured ] +{ + using python : 2.7 : /usr ; +}
path-constant ICU_PATH : /usr ;
So with 1.59.0 the python-2.7 config is only added if python.configured is true, but it used to be there unconditionally.
Oops, sorry, of course it's only added if it's *false* :-)
Changed by https://github.com/boostorg/boost/commit/edca8b1e9317dd6f0ffc46536841708be84...
On 24-Aug-15 7:04 PM, Jonathan Wakely wrote:
# Python configuration -using python : 2.7 : /usr ; +import python ; +if ! [ python.configured ] +{ + using python : 2.7 : /usr ; +}
path-constant ICU_PATH : /usr ;
So with 1.59.0 the python-2.7 config is only added if python.configured is true, but it used to be there unconditionally.
Oops, sorry, of course it's only added if it's *false* :-)
Changed by https://github.com/boostorg/boost/commit/edca8b1e9317dd6f0ffc46536841708be84...
Ah, thanks for tracking this change! I guess the commit has logic to it - if one has explicit Python configurations, then maybe adding hardcoded 2.7 configuration is not a great idea. Would it be fine with you to just explicitly configure 2.7 from now on? Thanks, Volodya
On 24 August 2015 at 18:55, Vladimir Prus wrote:
On 24-Aug-15 7:04 PM, Jonathan Wakely wrote:
# Python configuration -using python : 2.7 : /usr ; +import python ; +if ! [ python.configured ] +{ + using python : 2.7 : /usr ; +}
path-constant ICU_PATH : /usr ;
So with 1.59.0 the python-2.7 config is only added if python.configured is true, but it used to be there unconditionally.
Oops, sorry, of course it's only added if it's *false* :-)
Changed by https://github.com/boostorg/boost/commit/edca8b1e9317dd6f0ffc46536841708be84...
Ah, thanks for tracking this change! I guess the commit has logic to it - if one has explicit Python configurations, then maybe adding hardcoded 2.7 configuration is not a great idea. Would it be fine with you to just explicitly configure 2.7 from now on?
Yes, now that I know why it changed it's clear that configuring both versions explicitly is the right solution. Thanks for your help finding the cause.
participants (2)
-
Jonathan Wakely
-
Vladimir Prus