diff mbox series

[v1] package/qt5webengine: examples need qt5svg

Message ID 20200810203841.26171-1-ps.report@gmx.net
State Superseded
Headers show
Series [v1] package/qt5webengine: examples need qt5svg | expand

Commit Message

Peter Seiderer Aug. 10, 2020, 8:38 p.m. UTC
Fixes:

  https://gitlab.com/buildroot.org/buildroot/-/jobs/674934350

  make[3]: Entering directory '.../build/qt5webengine-5.15.0/examples/webenginewidgets'
  Project ERROR: Unknown module(s) in QT: svg
  Makefile:47: recipe for target 'sub-pdfviewer-make_first' failed

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/qt5/qt5webengine/Config.in       | 1 +
 package/qt5/qt5webengine/qt5webengine.mk | 4 ++++
 2 files changed, 5 insertions(+)

Comments

Peter Seiderer Aug. 11, 2020, 6:31 p.m. UTC | #1
Hello *,

On Mon, 10 Aug 2020 22:38:41 +0200, Peter Seiderer <ps.report@gmx.net> wrote:

> Fixes:
>
>   https://gitlab.com/buildroot.org/buildroot/-/jobs/674934350
>
>   make[3]: Entering directory '.../build/qt5webengine-5.15.0/examples/webenginewidgets'
>   Project ERROR: Unknown module(s) in QT: svg
>   Makefile:47: recipe for target 'sub-pdfviewer-make_first' failed
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  package/qt5/qt5webengine/Config.in       | 1 +
>  package/qt5/qt5webengine/qt5webengine.mk | 4 ++++
>  2 files changed, 5 insertions(+)
>
> diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
> index 215afbb616..9879345e1e 100644
> --- a/package/qt5/qt5webengine/Config.in
> +++ b/package/qt5/qt5webengine/Config.in
> @@ -54,6 +54,7 @@ config BR2_PACKAGE_QT5WEBENGINE
>  	select BR2_PACKAGE_QT5DECLARATIVE_QUICK
>  	select BR2_PACKAGE_QT5QUICKCONTROLS
>  	select BR2_PACKAGE_QT5QUICKCONTROLS2
> +	select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5BASE_EXAMPLES
>  	select BR2_PACKAGE_QT5WEBCHANNEL
>  	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_QT5BASE_XCB
>  	select BR2_PACKAGE_XLIB_LIBXCURSOR if BR2_PACKAGE_QT5BASE_XCB
> diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
> index 4abcf45964..9101f35937 100644
> --- a/package/qt5/qt5webengine/qt5webengine.mk
> +++ b/package/qt5/qt5webengine/qt5webengine.mk
> @@ -18,6 +18,10 @@ QT5WEBENGINE_LICENSE = GPL-2.0 or LGPL-3.0 or GPL-3.0 or GPL-3.0 with exception
>  QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
>  	LICENSE.GPLv3 LICENSE.LGPL3 $(QT5WEBENGINE_CHROMIUM_LICENSE_FILES)
>
> +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
> +QT5WEBENGINE_DEPENDENCIES += qt5svg
> +endif
> +
>  ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
>  QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
>  	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst

Drop this one, make menuconfig results in the following warning:

package/qt5/qt5base/Config.in:1:error: recursive dependency detected!
package/qt5/qt5base/Config.in:1:	symbol BR2_PACKAGE_QT5BASE is selected by BR2_PACKAGE_QT5SVG
package/qt5/qt5svg/Config.in:1:	symbol BR2_PACKAGE_QT5SVG is selected by BR2_PACKAGE_QT5BASE_EXAMPLES
package/qt5/qt5base/Config.in:42:	symbol BR2_PACKAGE_QT5BASE_EXAMPLES depends on BR2_PACKAGE_QT5BASE
For a resolution refer to Documentation/kbuild/kconfig-language.txt
subsection "Kconfig recursive dependency limitations"

Regards,
Peter
Thomas Petazzoni Aug. 11, 2020, 7:28 p.m. UTC | #2
Hello,

+Yann in Cc for Kconfig expertise.

On Tue, 11 Aug 2020 20:31:55 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> package/qt5/qt5base/Config.in:1:error: recursive dependency detected!
> package/qt5/qt5base/Config.in:1:	symbol BR2_PACKAGE_QT5BASE is selected by BR2_PACKAGE_QT5SVG

Right, this makes sense.

> package/qt5/qt5svg/Config.in:1:	symbol BR2_PACKAGE_QT5SVG is selected by BR2_PACKAGE_QT5BASE_EXAMPLES

This doesn't make any sense to me:

config BR2_PACKAGE_QT5BASE_EXAMPLES
        bool "Compile and install examples (with code)"
        select BR2_PACKAGE_QT5BASE_NETWORK
        select BR2_PACKAGE_QT5BASE_XML
        help
          If unsure, say N.

Neither BR2_PACKAGE_QT5BASE_NETWORK nor BR2_PACKAGE_QT5BASE_XML are
selecting BR2_PACKAGE_QT5SVG.

Or perhaps it is the line added by your patch:

	select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5BASE_EXAMPLES

which causes this statement ?

> package/qt5/qt5base/Config.in:42:	symbol BR2_PACKAGE_QT5BASE_EXAMPLES depends on BR2_PACKAGE_QT5BASE

This obviously makes sense.

> For a resolution refer to Documentation/kbuild/kconfig-language.txt
> subsection "Kconfig recursive dependency limitations"
> 
> Regards,
> Peter
>
Peter Seiderer Aug. 11, 2020, 9:26 p.m. UTC | #3
Hello Thomas, *,

On Tue, 11 Aug 2020 21:28:52 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
>
> +Yann in Cc for Kconfig expertise.
>
> On Tue, 11 Aug 2020 20:31:55 +0200
> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > package/qt5/qt5base/Config.in:1:error: recursive dependency detected!
> > package/qt5/qt5base/Config.in:1:	symbol BR2_PACKAGE_QT5BASE is selected by BR2_PACKAGE_QT5SVG
>
> Right, this makes sense.
>
> > package/qt5/qt5svg/Config.in:1:	symbol BR2_PACKAGE_QT5SVG is selected by BR2_PACKAGE_QT5BASE_EXAMPLES
>
> This doesn't make any sense to me:
>
> config BR2_PACKAGE_QT5BASE_EXAMPLES
>         bool "Compile and install examples (with code)"
>         select BR2_PACKAGE_QT5BASE_NETWORK
>         select BR2_PACKAGE_QT5BASE_XML
>         help
>           If unsure, say N.
>
> Neither BR2_PACKAGE_QT5BASE_NETWORK nor BR2_PACKAGE_QT5BASE_XML are
> selecting BR2_PACKAGE_QT5SVG.
>
> Or perhaps it is the line added by your patch:
>
> 	select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5BASE_EXAMPLES
>
> which causes this statement ?
>
> > package/qt5/qt5base/Config.in:42:	symbol BR2_PACKAGE_QT5BASE_EXAMPLES depends on BR2_PACKAGE_QT5BASE
>
> This obviously makes sense.

One option to break the recursive dependency is to delete the
redundant 'select BR2_PACKAGE_QT5BASE' from all packages already
depending/selecting BR2_PACKAGE_QT5, see v2 of suggested patch...

Regards,
Peter

>
> > For a resolution refer to Documentation/kbuild/kconfig-language.txt
> > subsection "Kconfig recursive dependency limitations"
> >
> > Regards,
> > Peter
> >
>
>
>
Yann E. MORIN Aug. 11, 2020, 9:33 p.m. UTC | #4
Thomas, Peter, All,

On 2020-08-11 21:28 +0200, Thomas Petazzoni spake thusly:
> On Tue, 11 Aug 2020 20:31:55 +0200
> Peter Seiderer <ps.report@gmx.net> wrote:
> > package/qt5/qt5base/Config.in:1:error: recursive dependency detected!
> > package/qt5/qt5base/Config.in:1:	symbol BR2_PACKAGE_QT5BASE is selected by BR2_PACKAGE_QT5SVG
> Right, this makes sense.
> 
> > package/qt5/qt5svg/Config.in:1:	symbol BR2_PACKAGE_QT5SVG is selected by BR2_PACKAGE_QT5BASE_EXAMPLES
> This doesn't make any sense to me:
[--SNIP--]
> Or perhaps it is the line added by your patch:
> 	select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5BASE_EXAMPLES
> which causes this statement ?

AFAICS, yes.

> > package/qt5/qt5base/Config.in:42:	symbol BR2_PACKAGE_QT5BASE_EXAMPLES depends on BR2_PACKAGE_QT5BASE
> This obviously makes sense.

The whole problem we have is that the qt5 symbol is dual;

  - BR2_PACKAGE_QT5 that enables the whole Qt5 stack

  - BR2_PACKAGE_QT5BASE that enables the core component

However, BR2_PACKAGE_QT5 selects BR2_PACKAGE_QT5BASE, and BR2_PACKAGE_QT5BASE
depends on BR2_PACKAGE_QT5.

So both are either enabled or disabled at the same time:

    N N: valid
    N Y: impossible
    Y N: impossible
    Y Y: valid

But kcnfig can't see that the recursive dependency is resolved by
construction of the two symbols, as shown in the validity matrix.

I think we should change all qt5 packages to switch their dependency
onto the package, not the stack, and drop explicit select or depends
since this is implied by the top-level:

    diff --git a/package/qt5/Config.in b/package/qt5/Config.in
    index 5c544ecec4..954e257879 100644
    --- a/package/qt5/Config.in
    +++ b/package/qt5/Config.in
    @@ -36,8 +36,9 @@ menuconfig BR2_PACKAGE_QT5
     	  http://qt.io
     
     if BR2_PACKAGE_QT5
    -source "package/qt5/qt53d/Config.in"
     source "package/qt5/qt5base/Config.in"
    +if BR2_PACKAGE_QT5BASE
    +source "package/qt5/qt53d/Config.in"
     source "package/qt5/qt5charts/Config.in"
     source "package/qt5/qt5connectivity/Config.in"
     source "package/qt5/qt5declarative/Config.in"
    @@ -66,4 +67,5 @@ source "package/qt5/qt5websockets/Config.in"
     source "package/qt5/qt5webview/Config.in"
     source "package/qt5/qt5x11extras/Config.in"
     source "package/qt5/qt5xmlpatterns/Config.in"
    -endif
    +endif # QT5BASE
    +endif # QT5
    diff --git a/package/qt5/qt5svg/Config.in b/package/qt5/qt5svg/Config.in
    index bc80b62674..1c4e90d1d9 100644
    --- a/package/qt5/qt5svg/Config.in
    +++ b/package/qt5/qt5svg/Config.in
    @@ -1,6 +1,6 @@
     config BR2_PACKAGE_QT5SVG
     	bool "qt5svg"
    -	select BR2_PACKAGE_QT5BASE
     	select BR2_PACKAGE_QT5BASE_GUI
     	help
     	  Qt is a cross-platform application and UI framework for

Regards,
Yann E. MORIN.
diff mbox series

Patch

diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in
index 215afbb616..9879345e1e 100644
--- a/package/qt5/qt5webengine/Config.in
+++ b/package/qt5/qt5webengine/Config.in
@@ -54,6 +54,7 @@  config BR2_PACKAGE_QT5WEBENGINE
 	select BR2_PACKAGE_QT5DECLARATIVE_QUICK
 	select BR2_PACKAGE_QT5QUICKCONTROLS
 	select BR2_PACKAGE_QT5QUICKCONTROLS2
+	select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5BASE_EXAMPLES
 	select BR2_PACKAGE_QT5WEBCHANNEL
 	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_QT5BASE_XCB
 	select BR2_PACKAGE_XLIB_LIBXCURSOR if BR2_PACKAGE_QT5BASE_XCB
diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk
index 4abcf45964..9101f35937 100644
--- a/package/qt5/qt5webengine/qt5webengine.mk
+++ b/package/qt5/qt5webengine/qt5webengine.mk
@@ -18,6 +18,10 @@  QT5WEBENGINE_LICENSE = GPL-2.0 or LGPL-3.0 or GPL-3.0 or GPL-3.0 with exception
 QT5WEBENGINE_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 LICENSE.GPL3-EXCEPT \
 	LICENSE.GPLv3 LICENSE.LGPL3 $(QT5WEBENGINE_CHROMIUM_LICENSE_FILES)
 
+ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
+QT5WEBENGINE_DEPENDENCIES += qt5svg
+endif
+
 ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
 QT5WEBENGINE_DEPENDENCIES += xlib_libXScrnSaver xlib_libXcomposite \
 	xlib_libXcursor xlib_libXi xlib_libXrandr xlib_libXtst