All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK
@ 2024-12-22 16:22 Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 2/5] wayland-protocols: Remove inoperative packaging override Tom Hochstein
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Hochstein

Building weston with an SDK fails to find pkg-config-native:
```
Did not find pkg-config by name 'pkg-config-native'
Found pkg-config: NO
Found CMake: /opt/poky/5.1/sysroots/x86_64-pokysdk-linux/usr/bin/cmake (3.31.0)
Build-time dependency wayland-scanner found: NO (tried cmake)

protocol/meson.build:1:14: ERROR: Dependency lookup for wayland-scanner with method 'pkgconfig' failed: Pkg-config for machine build machine not found. Giving up.
```

Fix the problem by extending the pkg-config-native wrapper install to
class-nativesdk.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index 6f13d0177e..2b298eb5e8 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -46,9 +46,9 @@ FILES:${PN} += "${datadir}/aclocal/pkg.m4"
 # specifying an appropriate provide.
 RPROVIDES:${PN} += "pkgconfig(pkg-config)"
 
-# Install a pkg-config-native wrapper that will use the native sysroot instead
-# of the MACHINE sysroot, for using pkg-config when building native tools.
 do_install:append:class-native () {
+    # Install a pkg-config-native wrapper that will use the native sysroot instead
+    # of the MACHINE sysroot, for using pkg-config when building native tools.
     sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
         -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
         < ${UNPACKDIR}/pkg-config-native.in > ${B}/pkg-config-native
@@ -59,6 +59,15 @@ do_install:append:class-native () {
     install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
 }
 
+do_install:append:class-nativesdk () {
+    # Install a pkg-config-native wrapper that will use the native sysroot instead
+    # of the MACHINE sysroot, for using pkg-config when building native tools.
+    sed -e "s|@PATH_NATIVE@|\$OECORE_NATIVE_SYSROOT|" \
+        -e "s|@LIBDIR_NATIVE@|\$OECORE_NATIVE_SYSROOT/usr/lib/pkgconfig|" \
+        < ${UNPACKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+    install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+}
+
 pkgconfig_sstate_fixup_esdk () {
 	if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a "${WITHIN_EXT_SDK}" = "1" ] ; then
 		pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
-- 
2.34.1



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

* [PATCH v3 2/5] wayland-protocols: Remove inoperative packaging override
  2024-12-22 16:22 [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK Tom Hochstein
@ 2024-12-22 16:22 ` Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 3/5] weston: Fix wayland-protocols dependency Tom Hochstein
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Hochstein

The upgrade to 1.38 re-enables the dev package [1]. With the dev
package enabled, the file wayland-protocol.pc is filtered by default
into the dev package, and the override adding it to the main package
does nothing and is not needed.

[1] https://github.com/openembedded/openembedded-core/commit/5de187aee675a78fe59620a3fb64a5da5ae662aa

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-graphics/wayland/wayland-protocols_1.38.bb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/wayland-protocols_1.38.bb b/meta/recipes-graphics/wayland/wayland-protocols_1.38.bb
index 3e628ab113..be6b732b1a 100644
--- a/meta/recipes-graphics/wayland/wayland-protocols_1.38.bb
+++ b/meta/recipes-graphics/wayland/wayland-protocols_1.38.bb
@@ -21,7 +21,5 @@ inherit meson pkgconfig allarch
 
 EXTRA_OEMESON += "-Dtests=false"
 
-FILES:${PN} += "${datadir}/pkgconfig/wayland-protocols.pc"
-
 BBCLASSEXTEND = "native nativesdk"
 
-- 
2.34.1



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

* [PATCH v3 3/5] weston: Fix wayland-protocols dependency
  2024-12-22 16:22 [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 2/5] wayland-protocols: Remove inoperative packaging override Tom Hochstein
@ 2024-12-22 16:22 ` Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 4/5] weston: Disable unused tests build Tom Hochstein
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Hochstein

An SDK build of weston fails:
```
Run-time dependency wayland-protocols found: NO (tried pkgconfig and cmake)
```

The file wayland-protocols.pc is missing in the SDK. This is traced to
the upgrade of wayland-protocols to 1.38 [1], which re-enables the dev
package, which moves wayland-protocols.pc to wayland-protocols-dev.

[1] https://github.com/openembedded/openembedded-core/commit/5de187aee675a78fe59620a3fb64a5da5ae662aa

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-graphics/wayland/weston_14.0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston_14.0.1.bb b/meta/recipes-graphics/wayland/weston_14.0.1.bb
index 50749d7d15..4cb0ca4d5f 100644
--- a/meta/recipes-graphics/wayland/weston_14.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_14.0.1.bb
@@ -137,7 +137,7 @@ RDEPENDS:${PN}-xwayland += "xwayland"
 
 RDEPENDS:${PN} += "xkeyboard-config"
 RRECOMMENDS:${PN} = "weston-init liberation-fonts"
-RRECOMMENDS:${PN}-dev += "wayland-protocols"
+RDEPENDS:${PN}-dev += "wayland-protocols-dev"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM:${PN} = "--system weston-launch"
-- 
2.34.1



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

* [PATCH v3 4/5] weston: Disable unused tests build
  2024-12-22 16:22 [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 2/5] wayland-protocols: Remove inoperative packaging override Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 3/5] weston: Fix wayland-protocols dependency Tom Hochstein
@ 2024-12-22 16:22 ` Tom Hochstein
  2024-12-22 16:22 ` [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot Tom Hochstein
       [not found] ` <18138C56105EEBAA.17446@lists.openembedded.org>
  4 siblings, 0 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Hochstein

Building weston with core-image-weston SDK fails for xwayland tests:
```
Run-time dependency xcb-cursor found: NO (tried pkgconfig and cmake)

tests/meson.build:357:2: ERROR: Problem encountered: xcb and xcb-cursor required for running xwayland tests
```

The problem is the tests folder is built but not installed. This
behavior seems to have been introduced with the 12.0.1 upgrade.

https://github.com/openembedded/openembedded-core/commit/be7da75827b4ffee3a243f977faad429dd9fa21c

Disable the build of the unused tests. Also drop the xwayland
dependency on xcb-util-cursor since it is a specific requirement
for the xwayland test build.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-graphics/wayland/weston_14.0.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston_14.0.1.bb b/meta/recipes-graphics/wayland/weston_14.0.1.bb
index 4cb0ca4d5f..2a0a403d99 100644
--- a/meta/recipes-graphics/wayland/weston_14.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_14.0.1.bb
@@ -31,7 +31,7 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '',
 
 WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
 
-EXTRA_OEMESON += "-Dpipewire=false"
+EXTRA_OEMESON += "-Dpipewire=false -Dtests=false"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
@@ -72,7 +72,7 @@ PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
 # Weston with systemd support
 PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
 # Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xcb-util-cursor xwayland"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor xwayland"
 # Clients support
 PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
 # Virtual remote output with GStreamer on DRM backend
-- 
2.34.1



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

* [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot
  2024-12-22 16:22 [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK Tom Hochstein
                   ` (2 preceding siblings ...)
  2024-12-22 16:22 ` [PATCH v3 4/5] weston: Disable unused tests build Tom Hochstein
@ 2024-12-22 16:22 ` Tom Hochstein
  2024-12-23 11:28   ` [OE-core] " Richard Purdie
       [not found] ` <18138C56105EEBAA.17446@lists.openembedded.org>
  4 siblings, 1 reply; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:22 UTC (permalink / raw)
  To: openembedded-core; +Cc: Tom Hochstein

Building weston with core-image-weston SDK fails:
```
../libweston/renderer-gl/gl-shader-config-color-transformation.c:29:10: fatal error: GLES3/gl3.h: No such file or directory
   29 | #include <GLES3/gl3.h>
      |          ^~~~~~~~~~~~~
```

Both GLES2 and GLES3 implementations are contained in libGLESv2.so.2,
which is packaged in libgles2-mesa. However, the headers are split
between libgles2-mesa-dev and libgles3-mesa-dev, which is why the
GLES3 headers end up missing in the SDK sysroot.

Add a dependency so the GLES3 headers are properly associated with
the GLES3 implementation.

Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 9fdf496e8b..84490158f1 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -233,6 +233,10 @@ DEV_PKG_DEPENDENCY = ""
 # development package of libgles3.
 RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
 
+# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
+# Add a dependency so the GLES3 dev package is associated with its implementation.
+RDEPENDS:libgles2-mesa-dev += "libgles3-mesa-dev"
+
 RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
 
 PACKAGES =+ "libegl-mesa libegl-mesa-dev \
-- 
2.34.1



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

* Re: [OE-core] [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot
       [not found] ` <18138C56105EEBAA.17446@lists.openembedded.org>
@ 2024-12-22 16:24   ` Tom Hochstein
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-22 16:24 UTC (permalink / raw)
  To: openembedded-core

v3 is the same as v2 but adds this patch.

Tom

On 12/22/2024 10:22 AM, Tom Hochstein via lists.openembedded.org wrote:
> Building weston with core-image-weston SDK fails:
> ```
> ../libweston/renderer-gl/gl-shader-config-color-transformation.c:29:10: fatal error: GLES3/gl3.h: No such file or directory
>     29 | #include <GLES3/gl3.h>
>        |          ^~~~~~~~~~~~~
> ```
> 
> Both GLES2 and GLES3 implementations are contained in libGLESv2.so.2,
> which is packaged in libgles2-mesa. However, the headers are split
> between libgles2-mesa-dev and libgles3-mesa-dev, which is why the
> GLES3 headers end up missing in the SDK sysroot.
> 
> Add a dependency so the GLES3 headers are properly associated with
> the GLES3 implementation.
> 
> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
> ---
>   meta/recipes-graphics/mesa/mesa.inc | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 9fdf496e8b..84490158f1 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -233,6 +233,10 @@ DEV_PKG_DEPENDENCY = ""
>   # development package of libgles3.
>   RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
>   
> +# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
> +# Add a dependency so the GLES3 dev package is associated with its implementation.
> +RDEPENDS:libgles2-mesa-dev += "libgles3-mesa-dev"
> +
>   RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
>   
>   PACKAGES =+ "libegl-mesa libegl-mesa-dev \
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#209011): https://lists.openembedded.org/g/openembedded-core/message/209011
> Mute This Topic: https://lists.openembedded.org/mt/110244770/3617670
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [tom.hochstein@oss.nxp.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 



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

* Re: [OE-core] [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot
  2024-12-22 16:22 ` [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot Tom Hochstein
@ 2024-12-23 11:28   ` Richard Purdie
  2024-12-23 14:43     ` Tom Hochstein
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2024-12-23 11:28 UTC (permalink / raw)
  To: tom.hochstein, openembedded-core

On Sun, 2024-12-22 at 10:22 -0600, Tom Hochstein via lists.openembedded.org wrote:
> Building weston with core-image-weston SDK fails:
> ```
> ../libweston/renderer-gl/gl-shader-config-color-transformation.c:29:10: fatal error: GLES3/gl3.h: No such file or directory
>    29 | #include <GLES3/gl3.h>
>       |          ^~~~~~~~~~~~~
> ```
> 
> Both GLES2 and GLES3 implementations are contained in libGLESv2.so.2,
> which is packaged in libgles2-mesa. However, the headers are split
> between libgles2-mesa-dev and libgles3-mesa-dev, which is why the
> GLES3 headers end up missing in the SDK sysroot.
> 
> Add a dependency so the GLES3 headers are properly associated with
> the GLES3 implementation.
> 
> Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
> ---
>  meta/recipes-graphics/mesa/mesa.inc | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 9fdf496e8b..84490158f1 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -233,6 +233,10 @@ DEV_PKG_DEPENDENCY = ""
>  # development package of libgles3.
>  RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
>  
> +# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
> +# Add a dependency so the GLES3 dev package is associated with its implementation.
> +RDEPENDS:libgles2-mesa-dev += "libgles3-mesa-dev"
> +
>  RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"

This doesn't quite make sense to me. The line above that RDEPENDS is
adding a dependency in the opposite direction and will effectively make
one package uninstallable without the other.

The question is does the libgles2-mesa-dev package need the libgles3-
mesa-dev package? If not, this is not the right way to solve the
problem you're seeing.

Cheers,

Richard




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

* Re: [OE-core] [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot
  2024-12-23 11:28   ` [OE-core] " Richard Purdie
@ 2024-12-23 14:43     ` Tom Hochstein
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Hochstein @ 2024-12-23 14:43 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

On 12/23/2024 5:28 AM, Richard Purdie wrote:
>>
>> +# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
>> +# Add a dependency so the GLES3 dev package is associated with its implementation.
>> +RDEPENDS:libgles2-mesa-dev += "libgles3-mesa-dev"
>> +
>>   RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
> 
> This doesn't quite make sense to me. The line above that RDEPENDS is
> adding a dependency in the opposite direction and will effectively make
> one package uninstallable without the other.
> 
> The question is does the libgles2-mesa-dev package need the libgles3-
> mesa-dev package? If not, this is not the right way to solve the
> problem you're seeing.
> 

Does this work better, signifying that libgles2-mesa contains libgles3-
mesa?

+RDEPENDS:libgles2-mesa += "libgles3-mesa"
+ALLOW_EMPTY:libgles3-mesa = "1"

Tom




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

end of thread, other threads:[~2024-12-23 14:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-22 16:22 [PATCH v3 1/5] pkgconfig: Add pkg-config-native to SDK Tom Hochstein
2024-12-22 16:22 ` [PATCH v3 2/5] wayland-protocols: Remove inoperative packaging override Tom Hochstein
2024-12-22 16:22 ` [PATCH v3 3/5] weston: Fix wayland-protocols dependency Tom Hochstein
2024-12-22 16:22 ` [PATCH v3 4/5] weston: Disable unused tests build Tom Hochstein
2024-12-22 16:22 ` [PATCH v3 5/5] mesa: Fix missing GLES3 headers in SDK sysroot Tom Hochstein
2024-12-23 11:28   ` [OE-core] " Richard Purdie
2024-12-23 14:43     ` Tom Hochstein
     [not found] ` <18138C56105EEBAA.17446@lists.openembedded.org>
2024-12-22 16:24   ` Tom Hochstein

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.