Message ID | 20230503144741.3909244-1-Martin.Jansa@gmail.com |
---|---|
State | Under Review |
Headers | show |
Series | [meta-oe] glfw: respect DISTRO_FEATURES when enabling x11 in default PACKAGECONFIG and return it to REQUIRED_DISTRO_FEATURES | expand |
Thanks Martin for clearing that up. On Wed, May 3, 2023 at 7:47 AM Martin Jansa <Martin.Jansa@gmail.com> wrote: > > x11 was recently removed from REQUIRED_DISTRO_FEATURES but it > should still respect x11 in DISTRO_FEATURES, now this causes: > > ERROR: Nothing PROVIDES 'libxi' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) > libxi was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) > ERROR: Nothing PROVIDES 'libxinerama' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) > libxinerama was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) > ERROR: Nothing PROVIDES 'libxrandr' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) > libxrandr was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) > ERROR: Nothing PROVIDES 'libglu' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) > libglu was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) > ERROR: Nothing PROVIDES 'libxcursor' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) > libxcursor was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) > > when wayland and opengl are in DISTRO_FEATURES, but x11 isn't. > > REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and ANY_OF_DISTRO_FEATURES by "wayland", > but the default PACKAGECONFIG doesn't match with that. > > Also move libglu to x11 PACKAGECONFIG, because that also has x11 > in REQUIRED_DISTRO_FEATURES. > > Return x11 to REQUIRED_DISTRO_FEATURES because even with this change > it still fails to build without x11 in DISTRO_FEATURES, so until > wayland support is resolved it does require x11 to build, otherwise fails with: > > glfw/3.3+gitAUTOINC+781fbbadb0-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): > | Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) > > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> > --- > meta-oe/recipes-core/glfw/glfw_3.3.bb | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb > index 5b0d61241e..f4d983a6e0 100644 > --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb > +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb > @@ -20,17 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF" > > CFLAGS += "-fPIC" > > -DEPENDS = "libpng libglu zlib" > -REQUIRED_DISTRO_FEATURES = "opengl" > +DEPENDS = "libpng zlib" > +REQUIRED_DISTRO_FEATURES = "opengl x11" > ANY_OF_DISTRO_FEATURES = "wayland x11" > > # upstream considers x11 and wayland backends mutually exclusive and will > # prioritize wayland if it is enabled, but wayland has dependencies that cannot > # be satisfied by this layer so it is disabled by default > > -PACKAGECONFIG ??= "x11" > +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" > > PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon" > -PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor" > +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor libglu" > > COMPATIBLE_HOST:libc-musl = "null" > -- > 2.40.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#102288): https://lists.openembedded.org/g/openembedded-devel/message/102288 > Mute This Topic: https://lists.openembedded.org/mt/98663243/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/meta-oe/recipes-core/glfw/glfw_3.3.bb b/meta-oe/recipes-core/glfw/glfw_3.3.bb index 5b0d61241e..f4d983a6e0 100644 --- a/meta-oe/recipes-core/glfw/glfw_3.3.bb +++ b/meta-oe/recipes-core/glfw/glfw_3.3.bb @@ -20,17 +20,17 @@ EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_DOCS=OFF" CFLAGS += "-fPIC" -DEPENDS = "libpng libglu zlib" -REQUIRED_DISTRO_FEATURES = "opengl" +DEPENDS = "libpng zlib" +REQUIRED_DISTRO_FEATURES = "opengl x11" ANY_OF_DISTRO_FEATURES = "wayland x11" # upstream considers x11 and wayland backends mutually exclusive and will # prioritize wayland if it is enabled, but wayland has dependencies that cannot # be satisfied by this layer so it is disabled by default -PACKAGECONFIG ??= "x11" +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon" -PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor" +PACKAGECONFIG[x11] = ",,libxrandr libxinerama libxi libxcursor libglu" COMPATIBLE_HOST:libc-musl = "null"
x11 was recently removed from REQUIRED_DISTRO_FEATURES but it should still respect x11 in DISTRO_FEATURES, now this causes: ERROR: Nothing PROVIDES 'libxi' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) libxi was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) ERROR: Nothing PROVIDES 'libxinerama' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) libxinerama was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) ERROR: Nothing PROVIDES 'libxrandr' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) libxrandr was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) ERROR: Nothing PROVIDES 'libglu' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) libglu was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) ERROR: Nothing PROVIDES 'libxcursor' (but meta-oe/recipes-core/glfw/glfw_3.3.bb DEPENDS on or otherwise requires it) libxcursor was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES) when wayland and opengl are in DISTRO_FEATURES, but x11 isn't. REQUIRED_DISTRO_FEATURES is satisfied by "opengl" and ANY_OF_DISTRO_FEATURES by "wayland", but the default PACKAGECONFIG doesn't match with that. Also move libglu to x11 PACKAGECONFIG, because that also has x11 in REQUIRED_DISTRO_FEATURES. Return x11 to REQUIRED_DISTRO_FEATURES because even with this change it still fails to build without x11 in DISTRO_FEATURES, so until wayland support is resolved it does require x11 to build, otherwise fails with: glfw/3.3+gitAUTOINC+781fbbadb0-r0/recipe-sysroot-native/usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): | Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> --- meta-oe/recipes-core/glfw/glfw_3.3.bb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)