Igalia / meta-webkit

Yocto / OpenEmbedded layer for WebKit based engines and browsers
MIT License
125 stars 66 forks source link

WebkitGTK issue with libmanette dependency #452

Closed amcelroy closed 1 year ago

amcelroy commented 1 year ago

Bug description I am trying to compile Webkitgtk for a Wayland / Weston image for the iMX8X chipset. When trying to compile, CMake searches for a dependency for libmanette. This problem appears to be a CMake issue that was patched in later versions, see here for more info.

The Yocto platform is Dunfell, and the webkitgtk version is 2.32.1 from the dunfell branch

How To Reproduce On a Wayland / Weston build (no X11 or Qt5), add webkitgtk via IMAGE_INSTALL. I can provide the board support tdx-reference-minimal-image.bb if needed. Here is the recipe that causes the issue:

require tdx-reference-minimal-image.bb

SUMMARY = "BSM Image"
DESCRIPTION = "Minimal BSM Wayland Image"

#Prefix to the resulting deployable tarball name
export IMAGE_BASENAME = "Reference-Multimedia-Image"

SYSTEMD_DEFAULT_TARGET = "graphical.target"

IMAGE_INSTALL += " \
    wayland \
    weston \
    packagegroup-tdx-cli \
    packagegroup-tdx-graphical \
    packagegroup-fsl-isp \
    \
    bash \
    coreutils \
    less \
    makedevs \
    mime-support \
    net-tools \
    util-linux \
    v4l-utils \
    \
    gpicview \
    media-files \
    webkitgtk \
    clang \
    git \
"

Solution This library check is tied to ENABLE_GAMEPAD. My target does not require gamepads, so the work around was to set this variable to off using:

diff --git a/recipes-browser/webkitgtk/webkitgtk_2.32.1.bb b/recipes-browser/webkitgtk/webkitgtk_2.32.1.bb
index 252f5ff..1181848 100644
--- a/recipes-browser/webkitgtk/webkitgtk_2.32.1.bb
+++ b/recipes-browser/webkitgtk/webkitgtk_2.32.1.bb
@@ -72,6 +72,7 @@ EXTRA_OECMAKE = " \
                  -DENABLE_GTKDOC=OFF \
                  -DENABLE_MINIBROWSER=ON \
                  -G Ninja \
+        -DENABLE_GAMEPAD=OFF \
                 "

 # Javascript JIT is not supported on powerpc
@@ -115,3 +116,4 @@ do_install_append() {
 FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
 FILES_${PN}-dbg += "${libdir}/webkit2gtk-4.0/injected-bundle/.debug/libwebkit2gtkinjectedbundle.so"
 FILES_${PN}-dbg += "${libdir}/webkitgtk/webkit2gtk-4.0/.debug/*"
+

Additional Information I also ran into this issue and resolved by modifying the file as recommended by @adahl5.

clopez commented 1 year ago

This issue has been addressed already on the master branch with a packageconfig option that you can enable or disable. I have submitted a PR here for the dunfell branch: https://github.com/Igalia/meta-webkit/pull/453