xorgproto: Set ALLOW_EMPTY for the main package
PATCH 1/1 xorgproto: Set ALLOW_EMPTY for the main package
From: Ricardo Simoes <[email protected]>
When creating an SDK, the populate_sdk task relies on COMPLEMENTARY_GLOB[dev-pkgs] to decide which packages to install [1].
However, xorgproto is a header-only library, so bitbake does not emit a main package. The only reference to the -dev package is an RRECOMMENDS from the -dbg package, and such weak links are not honored when installing complementary packages [2].
Fix this by setting ALLOW_EMPTY for the xorgproto package. The main package is now emitted, which makes ${PN}-dev reachable through the complementary packages and lets recipes that depend on xorgproto be built with the SDK.
[1] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/populate_sdk_base.bbclass#n38
[2] https://docs.yoctoproject.org/ref-manual/variables.html#term-COMPLEMENTARY_GLOB
--- meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb | 3 +++ 1 file changed, 3 insertions(+)
meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb +3 -0
@@ -23,3 +23,6 @@ DEV_PKG_DEPENDENCY = "" RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" BBCLASSEXTEND = "native nativesdk" + +# This is a header only library - thus everything lands in the -dev package +ALLOW_EMPTY:${PN} = "1"
Signature · 1 line
2.34.1
Quoted 29 lines · On Fri, 2026-09-18 at 16:18 +0200, [email protected] wrote:
From: Ricardo Simoes <[email protected]>
When creating an SDK, the
populate_sdktask relies on COMPLEMENTARY_GLOB[dev-pkgs] to decide which packages to install [1].However, xorgproto is a header-only library, so bitbake does not emit a main package. The only reference to the -dev package is an RRECOMMENDS from the -dbg package, and such weak links are not honored when installing complementary packages [2].
Fix this by setting
ALLOW_EMPTYfor the xorgproto package. The main package is now emitted, which makes ${PN}-dev reachable through the complementary packages and lets recipes that depend on xorgproto be built with the SDK.[1] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/populate_sdk_base.bbclass#n38
[2] https://docs.yoctoproject.org/ref-manual/variables.html#term-COMPLEMENTARY_GLOBSigned-off-by Ricardo Simoes <[email protected]>Signed-off-by Mark Jonas <[email protected]>--- meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb | 3 +++ 1 file changed, 3 insertions(+)meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb +0
-0
meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb DEV_PKG_DEPENDENCY = "" · line 28
Quoted 6 lines
meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb +3
-0@@ -23,3 +23,6 @@ DEV_PKG_DEPENDENCY = "" RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" BBCLASSEXTEND = "native nativesdk" + +# This is a header only library - thus everything lands in the -dev package +ALLOW_EMPTY:${PN} = "1"
Hi Mark, Ricardo,
I built the SDK for core-image-sato, and this already includes xorgproto-dev without applying this patch. I can see the package listed in the target manifest and I can see usr/include/X11/X.h in the target sysroot.
Could you provide a bit more info on the SDK you're building, any local config changes, etc, so I can reproduce the issue?
Best regards,
Signature · 1 line
Paul Barker
Hi Paul,
Thank you for looking into this.
Quoted 79 lines
-----Ursprüngliche Nachricht-----
Von: Paul Barker <[email protected]>
Gesendet: Mittwoch, 30. September 2026 11:19
An: Jonas Mark (BT-EL/ESW1) <[email protected]>; openembedded- [email protected]
Cc: [email protected]; [email protected]; Simoes Ricardo (BT-EL/ESW2) <[email protected]>
Betreff: Re: [PATCH] xorgproto: SetALLOW_EMPTYfor the main packageQuoted 4 lines · On Fri, 2026-09-18 at 16:18 +0200, [email protected] wrote:
From: Ricardo Simoes <[email protected]>
When creating an SDK, the
populate_sdktask relies on COMPLEMENTARY_GLOB[dev-pkgs] to decide which packages to install[1].
Quoted 2 lines
However, xorgproto is a header-only library, so bitbake does not
emit
Quoted 2 lines
a main package. The only reference to the -dev package is an RRECOMMENDS from the -dbg package, and such weak links are not
honored
Quoted 9 lines
when installing complementary packages [2].
Fix this by setting
ALLOW_EMPTYfor the xorgproto package. The main package is now emitted, which makes ${PN}-dev reachable through the complementary packages and lets recipes that depend on xorgproto be built with the SDK.[1]
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
Quoted 1 line
openembedded.org%2Fopenembedded-core%2Ftree%2Fmeta%2Fclasses-
recipe%2F
Quoted 1 line
populate_sdk_base.bbclass%23n38&data=05%7C02%7Cmark.jonas%40de.bosch.c
Quoted 1 line
om%7Caab8cf3183ca4239566f08df1ed3e999%7C0ae51e1907c84e4bbb6d648ee58410
Quoted 1 line
f4%7C0%7C0%7C639263567650300241%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcG
Quoted 1 line
kiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoy
Quoted 1 line
fQ%3D%3D%7C0%7C%7C%7C&sdata=f9cFsWo%2BKHygCkswyUibFR5HSatvEJebVEPq6%2F
Quoted 2 lines
n%2BEso%3D&reserved=0 [2]
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs
Quoted 1 line
.yoctoproject.org%2Fref-manual%2Fvariables.html%23term-
COMPLEMENTARY_GQuoted 1 line
LOB&data=05%7C02%7Cmark.jonas%40de.bosch.com%7Caab8cf3183ca4239566f08d
Quoted 1 line
f1ed3e999%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C639263567650353
Quoted 1 line
303%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMC
Quoted 1 line
IsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=
Quoted 14 lines
bj372IW8yy1wIQ3J7oIMEXlv2knUrzqUGxtFSPrNhNg%3D&reserved=0
Signed-off-by Ricardo Simoes <[email protected]>Signed-off-by Mark Jonas <[email protected]>--- meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb | 3 +++ 1 file changed, 3 insertions(+)meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb +0
-0meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb DEV_PKG_DEPENDENCY = "" · line 28
Quoted 6 lines
meta/recipes-graphics/xorg-proto/xorgproto_2025.1.bb +3
-0@@ -23,3 +23,6 @@ DEV_PKG_DEPENDENCY = "" RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" BBCLASSEXTEND = "native nativesdk" + +# This is a header only library - thus everything lands in the -dev +package ALLOW_EMPTY:${PN} = "1"Hi Mark, Ricardo,
Quoted 7 lines
I built the SDK for core-image-sato, and this already includes xorgproto-dev without applying this patch. I can see the package listed in the target manifest and I can see
usr/include/X11/X.hin the target sysroot.Could you provide a bit more info on the SDK you're building, any local config changes, etc, so I can reproduce the issue?
We were a little brief on our explanations in the commit message. So we sat down to create a hopefully reproducible demo of the problem.
For reproducing with used core-image-base and local.conf containing the following:
MACHINE ??= "qemuarm"USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"CONF_VERSION = "2"
DEPENDS:append:pn-base-files = " xorgproto"
RDEPENDS:base-files:append = " xorgproto"
DISTRO_FEATURES:forcevariable = "systemd usrmerge ext2 ipv4 vfat gobject-instrospection-data ldconfig multiarch" DISTRO_FEATURES_OPTED_OUT = "*"
When we compile core-image-base then without our fix we get the following error:
$ bitbake core-image-base -c populate_sdk
NOTE: Executing Tasks
ERROR: core-image-base-1.0-r0 do_populate_sdk: Unable to install packages. Command '['/media/workspace/yocto_master/build/tmp/work/qemuarm-oe-linux-gnueabi/core-image-base/1.0/recipe-sysroot-native/usr/bin/opkg', '--volatile-cache', '-f', '/media/workspace/yocto_master/build/tmp/work/qemuarm-oe-linux-gnueabi/core-image-base/1.0/opkg-sdk-target.conf', '-t', '/media/workspace/yocto_master/build/tmp/work/qemuarm-oe-linux-gnueabi/core-image-base/1.0/temp/ipktemp/', '-o', '/media/workspace/yocto_master/build/tmp/work/qemuarm-oe-linux-gnueabi/core-image-base/1.0/sdk/image/usr/local/oe-sdk-hardcoded-buildpath/sysroots/cortexa15t2hf-neon-oe-linux-gnueabi', '--force-postinstall', '--prefer-arch-to-version', '--force-checksum', 'install', 'packagegroup-base-extended', 'packagegroup-core-boot', 'packagegroup-core-standalone-sdk-target', 'psplash', 'run-postinsts', 'target-sdk-provides-dummy']' returned 1:
Solver encountered 1 problem(s):
Problem 1/1:
- package packagegroup-core-boot-1.0-r0.qemuarm requires base-files, but none of the providers can be installed
- conflicting requests
- nothing provides xorgproto needed by base-files-3.0.14-r0.qemuarm
Solution 1:
- do not ask to install a package providing packagegroup-core-boot
ERROR: Logfile of failure stored in: /media/workspace/yocto_master/build/tmp/work/qemuarm-oe-linux-gnueabi/core-image-base/1.0/temp/log.do_populate_sdk.3071259
ERROR: Task (/media/workspace/yocto_master/openembedded-core/meta/recipes-core/images/core-image-base.bb:do_populate_sdk) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4485 tasks of which 4475 didn't need to be rerun and 1 failed.
Are you able to reproduce the problem using our setup above?
Is our fix the right way to tackle the build issue we see?
Quoted 5 lines
Best regards,
--
Paul Barker
Cheers,
Mark
Quoted 17 lines · Mark Jonas via lists.openembedded.org
We were a little brief on our explanations in the commit message. So we sat down to create a hopefully reproducible demo of the problem.
For reproducing with used core-image-base and local.conf containing the following:
MACHINE ??= "qemuarm"
USER_CLASSES?= "buildstats"
PATCHRESOLVE = "noop"BB_DISKMON_DIRS??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
Quoted 8 lines
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"CONF_VERSION= "2"
DEPENDS:append:pn-base-files = " xorgproto" RDEPENDS:base-files:append = " xorgproto" DISTRO_FEATURES:forcevariable = "systemd usrmerge ext2 ipv4 vfat gobject-instrospection-data ldconfig multiarch"DISTRO_FEATURES_OPTED_OUT= "*"
You're setting RDEPENDS:base-files:append = " xorgproto" and xorgproto doesn't exist so it isn't surprising the image generation fails as such. Did you over simplify the reproducer?
Cheers,
Richard
Hi Richard,
Quoted 38 lines
-----Ursprüngliche Nachricht-----
Von: Richard Purdie <[email protected]>
Gesendet: Donnerstag, 1. Oktober 2026 13:28
An: Jonas Mark (BT-EL/ESW1) <[email protected]>; Paul Barker <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; Simoes Ricardo (BT-EL/ESW2) <[email protected]>
Betreff: Re: [OE-core] [PATCH] xorgproto: SetALLOW_EMPTYfor the main packageQuoted 17 lines · Mark Jonas via lists.openembedded.org
We were a little brief on our explanations in the commit message. So we sat down to create a hopefully reproducible demo of the problem.
For reproducing with used core-image-base and local.conf containing the following:
MACHINE ??= "qemuarm"
USER_CLASSES?= "buildstats"
PATCHRESOLVE = "noop"BB_DISKMON_DIRS??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \Quoted 8 lines
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"CONF_VERSION= "2"
DEPENDS:append:pn-base-files = " xorgproto" RDEPENDS:base-files:append = " xorgproto" DISTRO_FEATURES:forcevariable = "systemd usrmerge ext2 ipv4 vfat gobject-instrospection-data ldconfig multiarch"DISTRO_FEATURES_OPTED_OUT= "*"
Quoted 3 lines
You're setting RDEPENDS:base-files:append = " xorgproto" and xorgproto doesn't exist so it isn't surprising the image generation fails as such. Did you over simplify the reproducer?
You are right, we tried to simply our scenario as much as possible - maybe too much.
We are now working on creating an absolute minimum meta-layer, a recipe, and an image to reproduce the issue.
The rough sketch is that we will have a foo-program.bb recipe which depends on xorgproto. It builds foo.c which uses a constant from a xorgproto header file. There will be an image foo-image.bb which includes core-image-base and rdepends on foo-program. What then happens is that the SDK generated will not contain xorgproto-dev.
What is interesting is that something must have happened between Kirkstone and Wrynose: With Kirkstone the above still worked. That is, xorgproto-dev was "automatically" part of the SDK. Even without adding it to the RDEPENDS.
Cheers,
Mark
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Richard and Paul,
Quoted 45 lines
Quoted 1 line
Quoted 1 line
We were a little brief on our explanations in the commit message.
So
Quoted 1 line
Quoted 1 line
we sat down to create a hopefully reproducible demo of the
problem.
Quoted 2 lines
Quoted 2 lines
For reproducing with used core-image-base and local.conf
containing
Quoted 21 lines
Quoted 12 lines
the following:
MACHINE ??= "qemuarm"
USER_CLASSES?= "buildstats"
PATCHRESOLVE = "noop"BB_DISKMON_DIRS??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \Quoted 8 lines
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"CONF_VERSION= "2"
DEPENDS:append:pn-base-files = " xorgproto" RDEPENDS:base-files:append = " xorgproto" DISTRO_FEATURES:forcevariable = "systemd usrmerge ext2 ipv4 vfat gobject-instrospection-data ldconfig multiarch"DISTRO_FEATURES_OPTED_OUT= "*"Quoted 1 line
You're setting RDEPENDS:base-files:append = " xorgproto" and
xorgproto
Quoted 2 lines
doesn't exist so it isn't surprising the image generation fails as such. Did you over simplify the reproducer?
You are right, we tried to simply our scenario as much as possible - maybe too much.
We are now working on creating an absolute minimum meta-layer, a recipe, and an image to reproduce the issue.
The rough sketch is that we will have a foo-program.bb recipe which depends on xorgproto. It builds
foo.cwhich uses a constant from a xorgproto header file. There will be an image foo-image.bb which includes core-image-base and rdepends on foo-program. What then happens is that the SDK generated will not contain xorgproto-dev.
Quoted 4 lines
What is interesting is that something must have happened between Kirkstone and Wrynose: With Kirkstone the above still worked. That is, xorgproto-dev was "automatically" part of the SDK. Even without adding it to the RDEPENDS.
We created a minimal meta-layer which illustrates the issue we see. You can do the following to reproduce the issue:
Clone meta-foo
$ git clone https://github.com/rugsi/meta-foo.git
Build SDK for foo-image of meta-foo
$ kas build kas-meta-foo.yml --target foo-image -c populate_sdk
It will build just fine. Nonetheless, the SDK will not contain xorgproto-dev.
$ grep -c xorgproto build/tmp/deploy/sdk/poky-glibc-x86_64-foo-image-cortexa15t2hf-neon-qemuarm-toolchain-6.0.99+snapshot.target.manifest 0
Once you apply our patch and add RDEPENDS:foo-program = "xorgproto" to foo-program.bb, the SDK will contain xorgproto-dev.
Our image-foo bases on core-image-base. We did another test basing foo-image on core-image-sato and adding X11 to the distro features. There, our patch is not needed and the SDK contains xorgproto-dev. We do not understand why, though. We think that this is essentially what Paul tested.
We will be on the OSSEU next week. Our email replies could be slower then. But maybe we can have a chat at the venue.
Cheers,
Mark