All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
@ 2016-01-04 15:59 Javier Viguera
  2016-01-04 16:17 ` Martin Jansa
  2016-03-01  9:26 ` Javier Viguera
  0 siblings, 2 replies; 8+ messages in thread
From: Javier Viguera @ 2016-01-04 15:59 UTC (permalink / raw)
  To: openembedded-devel

QMAKE_CACHE_EVAL is only used in qtwebengine and qtwebkit, but not in
the rest of the QT5 packages, so use EXTRA_QMAKEVARS_PRE to pass the
packageconfig options to the do_configure task.

Also generalize bluetooth support so it can be used not only with bluez4
but with bluez5 as well.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
---
 recipes-qt/qt5/qtconnectivity_git.bb | 9 ++++++---
 recipes-qt/qt5/qtsystems_git.bb      | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/recipes-qt/qt5/qtconnectivity_git.bb b/recipes-qt/qt5/qtconnectivity_git.bb
index b1e155e2b48d..f677f7107465 100644
--- a/recipes-qt/qt5/qtconnectivity_git.bb
+++ b/recipes-qt/qt5/qtconnectivity_git.bb
@@ -13,11 +13,14 @@ LIC_FILES_CHKSUM = " \
 
 DEPENDS += "qtbase qtdeclarative"
 
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[bluez4] = "OE_BLUEZ_ENABLED,,bluez4"
+inherit bluetooth
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
+PACKAGECONFIG[bluez] = "CONFIG+=OE_BLUEZ_ENABLED,,${BLUEZ}"
+
+EXTRA_QMAKEVARS_PRE += "${EXTRA_OECONF}"
 
 do_configure_prepend() {
-    export QMAKE_CACHE_EVAL="CONFIG+=${EXTRA_OECONF}"
     # disable bluez test if it isn't enabled by PACKAGECONFIG
     sed -i 's/^qtCompileTest(bluez)/OE_BLUEZ_ENABLED:qtCompileTest(bluez)/g' ${S}/qtconnectivity.pro
 }
diff --git a/recipes-qt/qt5/qtsystems_git.bb b/recipes-qt/qt5/qtsystems_git.bb
index 27d2bff37b51..9d9d245d2d09 100644
--- a/recipes-qt/qt5/qtsystems_git.bb
+++ b/recipes-qt/qt5/qtsystems_git.bb
@@ -11,11 +11,14 @@ LIC_FILES_CHKSUM = " \
 
 DEPENDS += "qtbase qtdeclarative udev gconf"
 
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[bluez4] = "OE_BLUEZ_ENABLED,,bluez4"
+inherit bluetooth
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
+PACKAGECONFIG[bluez] = "CONFIG+=OE_BLUEZ_ENABLED,,${BLUEZ}"
+
+EXTRA_QMAKEVARS_PRE += "${EXTRA_OECONF}"
 
 do_configure_prepend() {
-    export QMAKE_CACHE_EVAL="CONFIG+=${EXTRA_OECONF}"
     # disable bluez test if it isn't enabled by PACKAGECONFIG
     sed -i 's/^    qtCompileTest(bluez)/    OE_BLUEZ_ENABLED:qtCompileTest(bluez)/g' ${S}/qtsystems.pro
 }


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 15:59 [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support Javier Viguera
@ 2016-01-04 16:17 ` Martin Jansa
  2016-01-04 16:39   ` Javier Viguera
  2016-03-01  9:26 ` Javier Viguera
  1 sibling, 1 reply; 8+ messages in thread
From: Martin Jansa @ 2016-01-04 16:17 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2926 bytes --]

On Mon, Jan 04, 2016 at 04:59:54PM +0100, Javier Viguera wrote:
> QMAKE_CACHE_EVAL is only used in qtwebengine and qtwebkit, but not in
> the rest of the QT5 packages, so use EXTRA_QMAKEVARS_PRE to pass the
> packageconfig options to the do_configure task.
> 
> Also generalize bluetooth support so it can be used not only with bluez4
> but with bluez5 as well.

Is it deterministic?

Will it always pick bluez4 when BLUEZ is set to bluez4, but there is
bluez5 is already in the sysroot as well?

config.tests/bluez/bluez.pro is only using pkgconfig to find bluez, so
I'm not sure which one will win.

> Signed-off-by: Javier Viguera <javier.viguera@digi.com>
> ---
>  recipes-qt/qt5/qtconnectivity_git.bb | 9 ++++++---
>  recipes-qt/qt5/qtsystems_git.bb      | 9 ++++++---
>  2 files changed, 12 insertions(+), 6 deletions(-)
> 
> diff --git a/recipes-qt/qt5/qtconnectivity_git.bb b/recipes-qt/qt5/qtconnectivity_git.bb
> index b1e155e2b48d..f677f7107465 100644
> --- a/recipes-qt/qt5/qtconnectivity_git.bb
> +++ b/recipes-qt/qt5/qtconnectivity_git.bb
> @@ -13,11 +13,14 @@ LIC_FILES_CHKSUM = " \
>  
>  DEPENDS += "qtbase qtdeclarative"
>  
> -PACKAGECONFIG ??= ""
> -PACKAGECONFIG[bluez4] = "OE_BLUEZ_ENABLED,,bluez4"
> +inherit bluetooth
> +
> +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
> +PACKAGECONFIG[bluez] = "CONFIG+=OE_BLUEZ_ENABLED,,${BLUEZ}"
> +
> +EXTRA_QMAKEVARS_PRE += "${EXTRA_OECONF}"
>  
>  do_configure_prepend() {
> -    export QMAKE_CACHE_EVAL="CONFIG+=${EXTRA_OECONF}"
>      # disable bluez test if it isn't enabled by PACKAGECONFIG
>      sed -i 's/^qtCompileTest(bluez)/OE_BLUEZ_ENABLED:qtCompileTest(bluez)/g' ${S}/qtconnectivity.pro
>  }
> diff --git a/recipes-qt/qt5/qtsystems_git.bb b/recipes-qt/qt5/qtsystems_git.bb
> index 27d2bff37b51..9d9d245d2d09 100644
> --- a/recipes-qt/qt5/qtsystems_git.bb
> +++ b/recipes-qt/qt5/qtsystems_git.bb
> @@ -11,11 +11,14 @@ LIC_FILES_CHKSUM = " \
>  
>  DEPENDS += "qtbase qtdeclarative udev gconf"
>  
> -PACKAGECONFIG ??= ""
> -PACKAGECONFIG[bluez4] = "OE_BLUEZ_ENABLED,,bluez4"
> +inherit bluetooth
> +
> +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}"
> +PACKAGECONFIG[bluez] = "CONFIG+=OE_BLUEZ_ENABLED,,${BLUEZ}"
> +
> +EXTRA_QMAKEVARS_PRE += "${EXTRA_OECONF}"
>  
>  do_configure_prepend() {
> -    export QMAKE_CACHE_EVAL="CONFIG+=${EXTRA_OECONF}"
>      # disable bluez test if it isn't enabled by PACKAGECONFIG
>      sed -i 's/^    qtCompileTest(bluez)/    OE_BLUEZ_ENABLED:qtCompileTest(bluez)/g' ${S}/qtsystems.pro
>  }
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 16:17 ` Martin Jansa
@ 2016-01-04 16:39   ` Javier Viguera
  2016-01-04 20:37     ` Martin Jansa
  0 siblings, 1 reply; 8+ messages in thread
From: Javier Viguera @ 2016-01-04 16:39 UTC (permalink / raw)
  To: openembedded-devel

On 04/01/16 17:17, Martin Jansa wrote:
>
> Is it deterministic?
>
> Will it always pick bluez4 when BLUEZ is set to bluez4, but there is
> bluez5 is already in the sysroot as well?

No, BLUEZ is set by *bluetooth* class depending on your distro features 
and is only used to add 'bluez4' or 'bluez5' to the recipe build-time 
dependences (DEPENDS). But apart from that it does nothing to the QT5 
compilation itself.

>
> config.tests/bluez/bluez.pro is only using pkgconfig to find bluez, so
> I'm not sure which one will win.

Neither do I, but I don't think having both versions of the bluez 
libraries in the sysroot is a common use-case. The package config file 
for bluez4 and bluez5 is almost the same. It adds the same cflags and 
libs to any package querying it:

Libs: -L${libdir} -lbluetooth
Cflags: -I${includedir}

So to recap: this change fix the bluetooth support which is currently 
broken because QMAKE_CACHE_EVAL is not used at all, and also allows to 
build QT5 bluetooth support using bluez5 instead of the hard-coded bluez4.

-- 
Regards,

Javier Viguera


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 16:39   ` Javier Viguera
@ 2016-01-04 20:37     ` Martin Jansa
  2016-01-05 10:28       ` Javier Viguera
  2016-01-12 16:25       ` Javier Viguera
  0 siblings, 2 replies; 8+ messages in thread
From: Martin Jansa @ 2016-01-04 20:37 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2619 bytes --]

On Mon, Jan 04, 2016 at 05:39:39PM +0100, Javier Viguera wrote:
> On 04/01/16 17:17, Martin Jansa wrote:
> >
> > Is it deterministic?
> >
> > Will it always pick bluez4 when BLUEZ is set to bluez4, but there is
> > bluez5 is already in the sysroot as well?
> 
> No, BLUEZ is set by *bluetooth* class depending on your distro features 
> and is only used to add 'bluez4' or 'bluez5' to the recipe build-time 
> dependences (DEPENDS). But apart from that it does nothing to the QT5 
> compilation itself.

That's not what I was asking about.

Some distros are still using bluez4, you can try it as well with:
DISTRO_FEATURES_remove = "bluez5"
DISTRO_FEATURES_append = " bluez4"

But nothing prevents bluez5 from being populated in the sysroot, because
unlike bluez4 in meta-oe, bluez5 in oe-core doesn't set the PNBLACKLIST
the make these 2 recipes really mutually exclusive in sysroot.

So you can build both with:
bitbake -c build bluez5 bluez4
(or with "bitbake world")

and you end with 2 providers for bluez.pc (and bluetooth.so) in the sysroot
and qtconnectivity will get runtime dependency on whatever bluez version
was built first, e.g. bluez5 even when BLUEZ variable says bluez4. See
shlibs provider code in package.bbclass.

That's cause for undeterministic builds and this QA warning:
WARNING: QA Issue: qtconnectivity rdepends on bluez5, but it isn't a build dependency? [build-deps]

> 
> >
> > config.tests/bluez/bluez.pro is only using pkgconfig to find bluez, so
> > I'm not sure which one will win.
> 
> Neither do I, but I don't think having both versions of the bluez 
> libraries in the sysroot is a common use-case. The package config file 
> for bluez4 and bluez5 is almost the same. It adds the same cflags and 
> libs to any package querying it:
> 
> Libs: -L${libdir} -lbluetooth
> Cflags: -I${includedir}
> 
> So to recap: this change fix the bluetooth support which is currently 
> broken because QMAKE_CACHE_EVAL is not used at all, and also allows to 
> build QT5 bluetooth support using bluez5 instead of the hard-coded bluez4.

I understand that, but it adds bluez5 support with undeterministic
behavior, which can cause currently bluez4 only images to get bluez5
dependency through qtconnectivity, as uncommon such setup it could be
it's still an issue (which should be fixed eithr in oe-core or meta-qt5).

Maybe I should PNBLACKLIST bluez4 only recipes with message that they
will be removed from meta-oe after 2.1 release and stop caring about
issues like this.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 20:37     ` Martin Jansa
@ 2016-01-05 10:28       ` Javier Viguera
  2016-01-12 16:25       ` Javier Viguera
  1 sibling, 0 replies; 8+ messages in thread
From: Javier Viguera @ 2016-01-05 10:28 UTC (permalink / raw)
  To: openembedded-devel

On 04/01/16 21:37, Martin Jansa wrote:
> So you can build both with:
> bitbake -c build bluez5 bluez4
> (or with "bitbake world")
> 
> and you end with 2 providers for bluez.pc (and bluetooth.so) in the sysroot
> and qtconnectivity will get runtime dependency on whatever bluez version
> was built first, e.g. bluez5 even when BLUEZ variable says bluez4. See
> shlibs provider code in package.bbclass.
> 
> That's cause for undeterministic builds and this QA warning:
> WARNING: QA Issue: qtconnectivity rdepends on bluez5, but it isn't a build dependency? [build-deps]

Ok, I understand now the problem. Thanks for explaining it.

But to be honest, I don't know how this can be solved in these QT5 recipes. To me this seems more a problem in the bluez5 recipe, so it cannot be built when bluez4 is already built. This is probably beyond my Yocto skills :-)

I used this commit as an example to add the bluez5 support:

http://git.openembedded.org/meta-openembedded/commit/?id=c2069a1420fb3d199c99f8b6e778478240fa56be

Shouldn't the problem you outline happen just the same with the gpsd recipe after above commit?

-- 
Regards,

Javier Viguera


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 20:37     ` Martin Jansa
  2016-01-05 10:28       ` Javier Viguera
@ 2016-01-12 16:25       ` Javier Viguera
  1 sibling, 0 replies; 8+ messages in thread
From: Javier Viguera @ 2016-01-12 16:25 UTC (permalink / raw)
  To: openembedded-devel

Hi Martin

On 04/01/16 21:37, Martin Jansa wrote:
> Some distros are still using bluez4, you can try it as well with:
> DISTRO_FEATURES_remove = "bluez5"
> DISTRO_FEATURES_append = " bluez4"
> 
> But nothing prevents bluez5 from being populated in the sysroot, because
> unlike bluez4 in meta-oe, bluez5 in oe-core doesn't set the PNBLACKLIST
> the make these 2 recipes really mutually exclusive in sysroot.

Seems that this problem was finally solved in:

http://git.openembedded.org/openembedded-core/commit/?id=0a556af62b509f9defd8ac5b3a6648bdfe1dff67

So here my humble ping for this commit (master and jethro).

-- 
Regards,

Javier Viguera


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-01-04 15:59 [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support Javier Viguera
  2016-01-04 16:17 ` Martin Jansa
@ 2016-03-01  9:26 ` Javier Viguera
  2016-03-01 10:28   ` Martin Jansa
  1 sibling, 1 reply; 8+ messages in thread
From: Javier Viguera @ 2016-03-01  9:26 UTC (permalink / raw)
  To: openembedded-devel

On 04/01/16 16:59, Javier Viguera wrote:
> QMAKE_CACHE_EVAL is only used in qtwebengine and qtwebkit, but not in
> the rest of the QT5 packages, so use EXTRA_QMAKEVARS_PRE to pass the
> packageconfig options to the do_configure task.
>
> Also generalize bluetooth support so it can be used not only with bluez4
> but with bluez5 as well.
>
> Signed-off-by: Javier Viguera <javier.viguera@digi.com>

Hi all,

This patch has been in *jethro-next* for almost two months now.

Is there a date to have 'jethro-next' merged into jethro? Is it planned?

-
Thanks,

Javier Viguera


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support
  2016-03-01  9:26 ` Javier Viguera
@ 2016-03-01 10:28   ` Martin Jansa
  0 siblings, 0 replies; 8+ messages in thread
From: Martin Jansa @ 2016-03-01 10:28 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

On Tue, Mar 01, 2016 at 10:26:32AM +0100, Javier Viguera wrote:
> On 04/01/16 16:59, Javier Viguera wrote:
> > QMAKE_CACHE_EVAL is only used in qtwebengine and qtwebkit, but not in
> > the rest of the QT5 packages, so use EXTRA_QMAKEVARS_PRE to pass the
> > packageconfig options to the do_configure task.
> >
> > Also generalize bluetooth support so it can be used not only with bluez4
> > but with bluez5 as well.
> >
> > Signed-off-by: Javier Viguera <javier.viguera@digi.com>
> 
> Hi all,
> 
> This patch has been in *jethro-next* for almost two months now.
> 
> Is there a date to have 'jethro-next' merged into jethro? Is it planned?

merged

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-01 10:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 15:59 [meta-qt5][master][jethro][PATCH] qtconnectivity, qtsystems: fix bluetooth support Javier Viguera
2016-01-04 16:17 ` Martin Jansa
2016-01-04 16:39   ` Javier Viguera
2016-01-04 20:37     ` Martin Jansa
2016-01-05 10:28       ` Javier Viguera
2016-01-12 16:25       ` Javier Viguera
2016-03-01  9:26 ` Javier Viguera
2016-03-01 10:28   ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.