[Buildroot] [PATCH 1/1] package/qt5/qt5webengine: Fix building against system ffmpeg

Nathan Ford nford at westpond.com
Wed Feb 19 20:04:24 UTC 2020


Hello Peter,

On Tue, Feb 18, 2020 at 8:38 AM Peter Seiderer <ps.report at gmx.net> wrote:
>
> Hello Nathan,
>
> thanks for taking care of bug 12416 and the provided patch!
>
> On Wed, 22 Jan 2020 11:19:22 -0500, Nathan Ford <nford at westpond.com> wrote:
>
> >  As of QT 5.10 the WEBENGINE_CONFIG options have been
> >  removed in favor of configure command line options.
> >  dist/changes-5.9.0 and dist/changes-5.10.0 document
> >  this.
>
> No need for additional indent here...
>
> >
> > qt5webengine also now requires webp mux support or the auto
> > detection of ffmpeg will fail.
> >
> > This fixes bug 12416
>
> Your patch is based on the one provided in the bug report [1]
> (plus the additional webp_mux and alsa changes)?
>
> If so mention it here ;-)

My Bad. Will fix.

> >
> > Signed-off-by: Nathan Ford <nford at westpond.com>
> >
> > diff --git a/package/qt5/qt5webengine/Config.in
> > b/package/qt5/qt5webengine/Config.in
> > index 0e776ec..18e4418 100644
> > --- a/package/qt5/qt5webengine/Config.in
> > +++ b/package/qt5/qt5webengine/Config.in
> > @@ -42,6 +42,7 @@ config BR2_PACKAGE_QT5WEBENGINE
> >         select BR2_PACKAGE_OPUS
> >         select BR2_PACKAGE_WEBP
> >         select BR2_PACKAGE_WEBP_DEMUX
> > +       select BR2_PACKAGE_WEBP_MUX
> >         select BR2_PACKAGE_QT5BASE_DBUS
> >         select BR2_PACKAGE_QT5BASE_EGLFS
> >         select BR2_PACKAGE_QT5BASE_FONTCONFIG
> > diff --git a/package/qt5/qt5webengine/qt5webengine.mk
> > b/package/qt5/qt5webengine/qt5webengine.mk
> > index 1d5ee8d..5a2ca6d 100644
> > --- a/package/qt5/qt5webengine/qt5webengine.mk
> > +++ b/package/qt5/qt5webengine/qt5webengine.mk
> > @@ -30,16 +30,16 @@ ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
> >  QT5WEBENGINE_DEPENDENCIES += host-libpng host-libnss libnss
> >  endif
> >
> > -QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_system_ffmpeg
> > +QT5WEBENGINE_QMAKEFLAGS += -webengine-ffmpeg
>
> Buildroot still supports two qt versions, Qt-latest (5.12.7) and Qt-LTS
> (5.6.x)..., so there is the need to support both configure methods (unless
> the new one although works for 5.6.x)...

Looks like 5.6.x pre-dates the changes. Would the best way to handle
this be an outer conditional for the version, with the inner
conditionals for the options?

> >
> >  ifeq ($(BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS),y)
> > -QT5WEBENGINE_QMAKEFLAGS += WEBENGINE_CONFIG+=use_proprietary_codecs
> > +QT5WEBENGINE_QMAKEFLAGS += -webengine-proprietary-codecs
> >  endif
> >
> >  ifeq ($(BR2_PACKAGE_QT5WEBENGINE_ALSA),y)
> >  QT5WEBENGINE_DEPENDENCIES += alsa-lib
> >  else
> > -QT5WEBENGINE_QMAKEFLAGS += QT_CONFIG-=alsa
> > +QT5WEBENGINE_QMAKEFLAGS += -no-webengine-alsa
> >  endif
> >
> >  # QtWebengine's build system uses python, but only supports python2. We work
> > @@ -64,7 +64,7 @@ QT5WEBENGINE_ENV +=
> > GN_PKG_CONFIG_HOST=$(@D)/host-bin/host-pkg-config
> >  endif
> >
> >  define QT5WEBENGINE_CONFIGURE_CMDS
> > -       (cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV)
> > $(HOST_DIR)/bin/qmake $(QT5WEBENGINE_QMAKEFLAGS))
> > +       (cd $(@D); $(TARGET_MAKE_ENV) $(QT5WEBENGINE_ENV)
> > $(HOST_DIR)/bin/qmake -- $(QT5WEBENGINE_QMAKEFLAGS))
> >  endef
> >
> >  define QT5WEBENGINE_BUILD_CMDS
>
> Your patch got somewhere garbled (see e.g. [2]), I get the
> following errors while applying:
>
>         $ git am patch-qt5webengine-nathan-ford-001.diff
> Applying: As of QT 5.10 the WEBENGINE_CONFIG options have been
> error: git diff header lacks filename information when removing 1 leading pathname component (line 2)
> Patch failed at 0001 As of QT 5.10 the WEBENGINE_CONFIG options have been

I noticed that patchwork had trouble with it. Not sure what happened.

> Checked your patch after applying manually, seems to work as expected with
> the following buildroot config snippet:
>
> BR2_PACKAGE_QT5WEBENGINE=y
> BR2_PACKAGE_QT5WEBENGINE_PROPRIETARY_CODECS=y
> # BR2_PACKAGE_QT5WEBENGINE_ALSA is not set
>
>         $ diff -u build/qt5webengine-5.12.7_orig/config.summary build/qt5webengine-5.12.7/config.summary
> --- build/qt5webengine-5.12.7_orig/config.summary       2020-02-18 12:21:02.354085462 +0100
> +++ build/qt5webengine-5.12.7/config.summary    2020-02-18 13:21:59.772558050 +0100
> @@ -3,7 +3,7 @@
>    Full debug information ................. no
>    Pepper Plugins ......................... no
>    Printing and PDF ....................... no
> -  Proprietary Codecs ..................... no
> +  Proprietary Codecs ..................... yes
>    Spellchecker ........................... yes
>    Native Spellchecker .................... no
>    WebRTC ................................. no
> @@ -14,14 +14,14 @@
>    Kerberos Authentication ................ no
>    Support qpa-xcb ........................ no
>    Building v8 snapshot supported ......... yes
> -  Use ALSA ............................... yes
> +  Use ALSA ............................... no
>    Use PulseAudio ......................... no
>    Optional system libraries used:
>      re2 .................................. no
>      icu .................................. no
> -    libwebp, libwebpmux and libwebpdemux . no
> +    libwebp, libwebpmux and libwebpdemux . yes
>      opus ................................. yes
> -    ffmpeg ............................... no
> +    ffmpeg ............................... yes
>      libvpx ............................... yes
>      snappy ............................... no
>      glib ................................. yes
> @@ -49,5 +49,3 @@
>      xcursor .............................. no
>      xi ................................... no
>      xtst ................................. no
>
>
> Care to re-send (best using git format-patch/send-email, see [3])?

Will do. I have some additional changes that I made after I submitted
the patch. Specifically I added build deps for the packages that
qtwebengine will auto detect and use if present ( otherwise building
its own copy ). Should I include this in the V2, or should it be
submitted separately?

> One further question out of interest, on which hardware do you run
> qtwebengine and how (or which buildroot config/defconfig do you use)?
>
> There is a report from one buildroot user not to be able to run
> the minimal example on RaspberryPi Zero (see [4] and [5])...

I use it on a few different pieces of hardware, some generic some
custom, most of which are x86_64. One of them is armv7 ( Marvell Dove
pj4 ). I have a qt application that wraps an instance of webengine.
All of this is on eglfs. The config is custom, using an external
toolchain. I was on gcc 6.3 ( x86_64 ) but now I am on gcc 8.3 (
x86_64 and armv7 ). I looked at that email thread and I have not
encountered the error they see.

> Regards,
> Peter
>
>
> [1] https://bugs.busybox.net/show_bug.cgi?id=12416
> [2] https://patchwork.ozlabs.org/patch/1227357/
> [3] https://buildroot.org/downloads/manual/manual.html#submitting-patches
> [4] http://lists.busybox.net/pipermail/buildroot/2020-February/273320.html
> [5] http://lists.busybox.net/pipermail/buildroot/2020-February/273329.html
>
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>

--Nate


More information about the buildroot mailing list