boost: Convert ??= weaker assingment to weak ?= assignment
PATCH 1/1 boost: Convert ??= weaker assingment to weak ?= assignment
??= does not react at all withBOOST_LIBS += "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"
even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to BOOST_LIBS but the dependency is not added so it fails to build complaining for missing python headers which is a understood outcome
When converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
--- meta/recipes-support/boost/boost.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/boost/boost.inc +1 -1
@@ -19,7 +19,7 @@ BOOST_LIBS = "\ " # optional boost-python library -PACKAGECONFIG ??= "" +PACKAGECONFIG ?= "" PACKAGECONFIG[python] = ",,python" BOOST_LIBS += "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}" inherit python-dir
Signature · 1 line
1.7.10.4
Hi Khem,
Quoted 8 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcome
I tried bitbaking boost and all the recipes in the meta-ros layer (which uses boost heavily) with 1.) only the boost setup in OE-core and no boost.bbappend, and then also
2.) with a boost.bbappend with PACKAGECONFIG = "python" (as currently set in meta-ros).
However, I could not reproduce the problem you are reporting. With the current state, everything works on my own machine.
I did the builds on fresh directories, and with the current HEADs:
BB_VERSION = "1.21.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Fedora-18" TARGET_SYS = "x86_64-oe-linux" MACHINE = "qemux86-64" DISTRO = "nodistro" DISTRO_VERSION = "nodistro.0" TUNE_FEATURES = "m64" TARGET_FPU = "" meta = "master:4a562fd2614bb6ccce1222d47b9268d6980cf315" meta-oe = "master:9b3e284c58bce673801ca3649b53bc53797ce2e9"
and my bitbake repository is at 73ddf1a3d1c516ad3bc785e0413483e616ce07a8.
What's your configuration and how does it differs from mine?
Lukas
Quoted 12 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcomeWhen converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Quoted 7 lines
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/boost/boost.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
This needs more investigation as there is something missing from the description above.
To illustrate why I'm struggling to follow this, "bitbake boost -e | grep BOOST_LIBS" on OE-Core does not show python in the list...
Cheers,
Richard
Quoted 4 lines · Richard Purdie
To illustrate why I'm struggling to follow this, "bitbake boost -e | grep
BOOST_LIBS" on OE-Core does not show python in the list...
I can see it. Its on debian python is 2.7.3
kraj@builder:~$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/"
Quoted 10 lines · Khem Raj
Quoted 4 lines · Richard Purdie
To illustrate why I'm struggling to follow this, "bitbake boost -e | grep
BOOST_LIBS" on OE-Core does not show python in the list...I can see it. Its on debian python is 2.7.3
Quoted 10 lines
kraj@builder:~$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/"
I doubt its host OS that is causing this, more likely something to do with the configuration you have (I'm using python 2.7.5+ on Ubuntu 13.10). Which DISTRO is this? Which layers are enabled? Which version of bitbake?
What does the history of PACKAGECONFIG show in bitbake boost -e?
Cheers,
Richard
Quoted 22 lines · Richard Purdie
Quoted 10 lines · Khem Raj
Quoted 4 lines · Richard Purdie
To illustrate why I'm struggling to follow this, "bitbake boost -e | grep
BOOST_LIBS" on OE-Core does not show python in the list...I can see it. Its on debian python is 2.7.3
Quoted 10 lines
kraj@builder:~$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/"
Quoted 5 lines
I doubt its host OS that is causing this, more likely something to do with the configuration you have (I'm using python 2.7.5+ on Ubuntu 13.10). Which DISTRO is this? Which layers are enabled? Which version of bitbake?
all is latest from yesterday config wise I am building angstrom. now I did both with angstrom and with OE-Core only and you are right it appears to work with OE-Core alone
see
http://paste.ubuntu.com/6548349/
for angstrom version see
http://paste.ubuntu.com/6548360/
I will dig more into it a bit and see how PACKAGECONFIG can be bad in angstrom's case
Quoted 8 lines
What does the history of PACKAGECONFIG show in bitbake boost -e?
Cheers,
Richard
Quoted 38 lines · Khem Raj
Quoted 22 lines · Richard Purdie
Quoted 10 lines · Khem Raj
Quoted 4 lines · Richard Purdie
To illustrate why I'm struggling to follow this, "bitbake boost -e | grep
BOOST_LIBS" on OE-Core does not show python in the list...I can see it. Its on debian python is 2.7.3
Quoted 10 lines
kraj@builder:~$ cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 7 (wheezy)" NAME="Debian GNU/Linux" VERSION_ID="7" VERSION="7 (wheezy)" ID=debian ANSI_COLOR="1;31" HOME_URL="http://www.debian.org/" SUPPORT_URL="http://www.debian.org/support/" BUG_REPORT_URL="http://bugs.debian.org/"Quoted 5 lines
I doubt its host OS that is causing this, more likely something to do with the configuration you have (I'm using python 2.7.5+ on Ubuntu 13.10). Which DISTRO is this? Which layers are enabled? Which version of bitbake?
all is latest from yesterday config wise I am building angstrom. now I did both with angstrom and with OE-Core only and you are right it appears to work with OE-Core alone
see
Quoted 7 lines
for angstrom version see
http://paste.ubuntu.com/6548360/
I will dig more into it a bit and see how PACKAGECONFIG can be bad in angstrom's case
Looking at those pastebins, it shows up as a python function since the "python" flag is set. That shouldn't do anything too bad to the variable though:
python PACKAGECONFIG () {
}
In one case it has the value python, in the other it does not. Its all very odd. I wonder if "bitbake -e" shows it taking any value? There has to be something in the Angstrom setup which is triggering this...
Cheers,
Richard
Quoted 10 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcome
Quoted 6 lines
When converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
OK so the problem is that I have meta-ros in my layer-mix and in that layer it defines PACKAGECONFIG ?= "python" IMO it should have appended instead of redefining. Thats why I was seeing what I was seeing.
Quoted 18 lines
Signed-off-by Khem Raj <[email protected]>--- meta/recipes-support/boost/boost.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/recipes-support/boost/boost.inc index f13051c..f0f9eb8 100644
meta/recipes-support/boost/boost.inc +1
-1@@ -19,7 +19,7 @@ BOOST_LIBS = "\ " # optional boost-python library -PACKAGECONFIG ??= "" +PACKAGECONFIG ?= "" PACKAGECONFIG[python] = ",,python" BOOST_LIBS += "${@base_contains('PACKAGECONFIG', 'python', 'python', '',d)}" inherit python-dir
Signature · 1 line
-Khem
Quoted 14 lines · Khem Raj
Quoted 13 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcomeWhen converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Quoted 7 lines
Quoted 3 lines
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
OK so the problem is that I have meta-ros in my layer-mix and in that layer it defines PACKAGECONFIG ?= "python" IMO it should have appended instead of redefining. Thats why I was seeing what I was seeing.
It's worth noting that recipes, in general, should use ?= rather than ??=, but config files, in general, should use ??=. Otherwise it becomes impossible for the config metadata to define an overriding default -- the last ??= wins, after all, and that would always be the recipe. IMO default values in the recipe are there to give sane behavior when there's no configuration coming in from elsewhere, not to override configuration defaults.
Signature · 5 lines
Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics
Quoted 24 lines · Chris Larson
Quoted 14 lines · Khem Raj
Quoted 13 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcomeWhen converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Quoted 8 lines
Quoted 2 lines
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
OK so the problem is that I have meta-ros in my layer-mix and in that layer
it defines PACKAGECONFIG ?= "python" IMO it should have appended instead of
redefining. Thats why I was seeing what I was seeing.
Quoted 7 lines
It's worth noting that recipes, in general, should use ?= rather than ??=, but config files, in general, should use ??=. Otherwise it becomes impossible for the config metadata to define an overriding default -- the last ??= wins, after all, and that would always be the recipe. IMO default values in the recipe are there to give sane behavior when there's no configuration coming in from elsewhere, not to override configuration defaults.
yes I think thats a good point. so lets consider this patch for inclusion now we know the reason, I can resubmit with proper subject and patch header
Signature · 1 line
-Khem
Quoted 33 lines · Khem Raj
Quoted 24 lines · Chris Larson
Quoted 14 lines · Khem Raj
Quoted 13 lines · Khem Raj
??= does not react at all with
BOOST_LIBS+= "${@base_contains('PACKAGECONFIG', 'python', 'python', '', d)}"even though we have
PACKAGECONFIG ??= "" it does not honor it and always add python to
BOOST_LIBSbut the dependency is not added so it fails to build complaining for missing python headers which is a understood outcomeWhen converted to ?= it works as expected and only add --with-python in bjam when python is specified in PACKAGECONFIG otherwise not.
Quoted 8 lines
Quoted 2 lines
Is it a bitbake bug ? in anycase ?= should be enough of loose rope to let user/distro configure the packageconfig policy
OK so the problem is that I have meta-ros in my layer-mix and in that layer
it defines PACKAGECONFIG ?= "python" IMO it should have appended instead of
redefining. Thats why I was seeing what I was seeing.Quoted 7 lines
It's worth noting that recipes, in general, should use ?= rather than ??=, but config files, in general, should use ??=. Otherwise it becomes impossible for the config metadata to define an overriding default -- the last ??= wins, after all, and that would always be the recipe. IMO default values in the recipe are there to give sane behavior when there's no configuration coming in from elsewhere, not to override configuration defaults.
Quoted 2 lines
yes I think thats a good point. so lets consider this patch for inclusion now we know the reason, I can resubmit with proper subject and patch header
It might be worth trying to standardise this in OE-Core rather that pick off the recipes one by one. Most new PACKAGECONFIGs are cut and paste from others so the problem will spread until we fix them consistently.
Cheers,
Richard