Skip to contentSkip to conversation

libconfig: import recipe from meta-oe

PATCH Superseded Dmitry Baryshkov 5 participants 10 messages Oct 30, 2025 – Dec 3, 2025

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 libconfig: import recipe from meta-oe

One of the freedreno tools in the Mesa package depends on libconfig. Recipes from other layers also depend on libconfig. It makes sense to move libconfig to OE-Core in order to reduce inter-layer dependencies.

Changes between meta-oe and this recipe:
- Upgraded to 1.8.1
- Switched to UPSTREAM_CHECK_GITTAGREGEX
- Switched from autotools-brokensep to autotools
- Added a patch fixing reproducibility issues

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 ...Add-missing-dependency-for-scanner.h.patch | 33 +++++++++++++++++++
 .../libconfig/libconfig_1.8.1.bb              | 30 +++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-extended/libconfig/libconfig/0001-Add-missing-dependency-for-scanner.h.patch
 create mode 100644 meta/recipes-extended/libconfig/libconfig_1.8.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
index c4142e2b7215..d4ec0ddcc852 100644
@@ -329,6 +329,7 @@ RECIPE_MAINTAINER:pn-libcgroup = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-libcheck = "Yi Zhao <[email protected]>"
 RECIPE_MAINTAINER:pn-libclc = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-libcomps = "Unassigned <[email protected]>"
+RECIPE_MAINTAINER:pn-libconfig = "Dmitry Baryshkov <[email protected]>"
 RECIPE_MAINTAINER:pn-libconvert-asn1-perl = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-libcxx = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-libdaemon = "Unassigned <[email protected]>"
meta/recipes-extended/libconfig/libconfig/0001-Add-missing-dependency-for-scanner.h.patch new file +33 -0
new file mode 100644
index 000000000000..6e6a9419aeb1
@@ -0,0 +1,33 @@
+From b9afffcee8809e47d0564f3d6376de724ae820ae Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <[email protected]>
+Date: Wed, 29 Oct 2025 22:26:16 +0200
+Subject: [PATCH] Add missing dependency for scanner.h
+
+Automake doesn't handle the header -> source dependency for lex
+scanners. This might result in the out-of-date header or it not being
+rebuilt in time. Provide a rule to make sure that the header is built
+properly.
+
+Signed-off-by: Dmitry Baryshkov <[email protected]>
+Upstream-Status: Submitted [https://github.com/hyperrealm/libconfig/pull/277]
+---
+ lib/Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 9ef984323af3..bd5d3dbe5aa3 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -36,6 +36,9 @@ libinc_cpp =  libconfig.h++
+ 
+ BUILT_SOURCES = scanner.c scanner.h grammar.c grammar.h
+ 
++scanner.h: scanner.c
++	@if test ! -f $@; then rm -f scanner.c; $(MAKE) $(AM_MAKEFLAGS) scanner.c; else :; fi
++
+ ## Build mode: C-only or C & C++
+ lib_LTLIBRARIES = libconfig.la
+ 
+-- 
+2.51.0
+
meta/recipes-extended/libconfig/libconfig_1.8.1.bb new file +30 -0
new file mode 100644
index 000000000000..37c2504b0168
@@ -0,0 +1,30 @@
+SUMMARY = "C/C++ Configuration File Library"
+DESCRIPTION = "Library for manipulating structured configuration files"
+HOMEPAGE = "https://hyperrealm.github.io/libconfig/"
+BUGTRACKER = "https://github.com/hyperrealm/libconfig/issues"
+SECTION = "libs"
+
+LICENSE = "LGPL-2.1-only"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=17c8e32f0f72580cc2906b409d46b5ac"
+
+SRC_URI = " \
+    git://github.com/hyperrealm/libconfig.git;protocol=https;branch=master;tag=v${PV} \
+    file://0001-Add-missing-dependency-for-scanner.h.patch \
+"
+SRCREV = "47ec93c588f534d20f6ee8704d2a2cec339db7b7"
+
+# needed when we modify grammar.y with patches
+DEPENDS += "bison-native flex-native"
+
+UPSTREAM_CHECK_GITTAGREGEX = "^v(?P<pver>\d+(\.\d+)+)$"
+
+inherit autotools pkgconfig
+
+PACKAGE_BEFORE_PN = "${PN}++"
+FILES:${PN}++ = "${libdir}/${BPN}++*${SOLIBS}"
+
+# remove autogenerated files which seem to trigger reproducibility issues
+do_compile:prepend() {
+    rm -f ${S}/lib/grammar.[ch]
+    rm -f ${S}/lib/scanner.[ch]
+}
Signature · 1 line
2.47.3
#1 lore raw

PATCH v4 2/2 mesa: drop freedreno-fdperf PACKAGECONFIG

With libconfig being a part of OE-Core, we can now drop separate freedreno-fdperf config option and merge the dependency into other freedreno tools dependencies.

---
 meta/recipes-graphics/mesa/mesa.inc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +1 -5
index 6a36aea259f0..fe778e58ee4d 100644
@@ -148,11 +148,7 @@ TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
 TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
 
 # dependencies for tools.
-TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
-
-# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
-# treatment in addition to the usual 'freedreno tools'.
-PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libconfig libxml2 ', '', d)}"
 
 PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
 PACKAGECONFIG[xmlconfig] = "-Dxmlconfig=enabled, -Dxmlconfig=disabled, expat"
Signature · 1 line
2.47.3
#2 lore raw

Re: [OE-core] [PATCH v4 2/2] mesa: drop freedreno-fdperf PACKAGECONFIG

meta/recipes-graphics/mesa/mesa.inc TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"

Quoted 11 lines · Dmitry Baryshkov via lists.openembedded.org
# dependencies for tools.
meta/recipes-graphics/mesa/mesa.inc +1 -5
-TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
-
-# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
-# treatment in addition to the usual 'freedreno tools'.
-PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libconfig libxml2 ', '', d)}”

TOOLS_DEPS is just set as this now:

TOOLS_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}”

So just merge those together instead of having two assignments for the same configuration.

Ross

#3 lore raw

Re: [OE-core] [PATCH v4 2/2] mesa: drop freedreno-fdperf PACKAGECONFIG

Quoted 14 lines · Ross Burton

meta/recipes-graphics/mesa/mesa.inc TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"

Quoted 11 lines · Dmitry Baryshkov via lists.openembedded.org
# dependencies for tools.
meta/recipes-graphics/mesa/mesa.inc +1 -5
-TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
-
-# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
-# treatment in addition to the usual 'freedreno tools'.
-PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libconfig libxml2 ', '', d)}”

TOOLS_DEPS is just set as this now:

Quoted 3 lines

TOOLS_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}”

So just merge those together instead of having two assignments for the same configuration.

This is exactly what should happen. The first line is removed by the patch.

Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

Re: [OE-core] [PATCH v4 2/2] mesa: drop freedreno-fdperf PACKAGECONFIG

Hi Dmitry,

Quoted 18 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 17 lines · Ross Burton
Quoted 13 lines · Dmitry Baryshkov via lists.openembedded.org
# dependencies for tools.
-TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 
'freedreno', ' ncurses libxml2 ', '', d)}"
(quoted diff) +0 -2
-
-# the fdperf tool requires libconfig (a part of meta-oe) so it needs 

special

meta/recipes-graphics/mesa/mesa.inc +1 -2
-# treatment in addition to the usual 'freedreno tools'.
-PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
+TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 
Quoted 1 line

'freedreno', ' ncurses libconfig libxml2 ', '', d)}”

TOOLS_DEPS is just set as this now:

Quoted 6 lines
Quoted 3 lines

TOOLS_DEPS = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}”

So just merge those together instead of having two assignments for the same configuration.

This is exactly what should happen. The first line is removed by the patch.

Please rebase, we don't have TOOL_DEPS:append anymore so this won't apply.

The change is fine otherwise.

Cheers,
Quentin

#5 lore raw
In reply to Dmitry Baryshkov
Quoted 4 lines · Dmitry Baryshkov via lists.openembedded.org

One of the freedreno tools in the Mesa package depends on libconfig. Recipes from other layers also depend on libconfig. It makes sense to move libconfig to OE-Core in order to reduce inter-layer dependencies.

Quoted 8 lines

Changes between meta-oe and this recipe:
- Upgraded to 1.8.1
- Switched to UPSTREAM_CHECK_GITTAGREGEX
- Switched from autotools-brokensep to autotools
- Added a patch fixing reproducibility issues

---

Hi Dmitry,

I still have to launch a full test session, but on the reproducibility side, it looks correct now:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2806

Thanks,
Mathieu

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw
Quoted 15 lines · Mathieu Dubois-Briand
Quoted 4 lines · Dmitry Baryshkov via lists.openembedded.org

One of the freedreno tools in the Mesa package depends on libconfig. Recipes from other layers also depend on libconfig. It makes sense to move libconfig to OE-Core in order to reduce inter-layer dependencies.

Quoted 8 lines

Changes between meta-oe and this recipe:
- Upgraded to 1.8.1
- Switched to UPSTREAM_CHECK_GITTAGREGEX
- Switched from autotools-brokensep to autotools
- Added a patch fixing reproducibility issues

---

Quoted 6 lines

Hi Dmitry,

I still have to launch a full test session, but on the reproducibility side, it looks correct now:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/37/builds/2806

Great, thanks!

Signature · 2 lines
With best wishes
Dmitry
#7 lore raw
In reply to Dmitry Baryshkov
Quoted 10 lines · Dmitry Baryshkov

One of the freedreno tools in the Mesa package depends on libconfig. Recipes from other layers also depend on libconfig. It makes sense to move libconfig to OE-Core in order to reduce inter-layer dependencies.

Changes between meta-oe and this recipe:
- Upgraded to 1.8.1
- Switched to UPSTREAM_CHECK_GITTAGREGEX
- Switched from autotools-brokensep to autotools
- Added a patch fixing reproducibility issues

Quoted 9 lines
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 ...Add-missing-dependency-for-scanner.h.patch | 33 +++++++++++++++++++
 .../libconfig/libconfig_1.8.1.bb              | 30 +++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-extended/libconfig/libconfig/0001-Add-missing-dependency-for-scanner.h.patch
 create mode 100644 meta/recipes-extended/libconfig/libconfig_1.8.1.bb

I see that these patches were a part of master-next and then were silently dropped. Could you please comment, why? Were there any remaining issues with them?

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw
Quoted 3 lines · Dmitry Baryshkov via lists.openembedded.org

I see that these patches were a part of master-next and then were silently dropped. Could you please comment, why? Were there any remaining issues with them?

We're deep into feature freeze, we're late, and struggling to get the release out. At this point new features like this really don't belong in master-next, but the patches are still in Mathieu's staging branch.

If you want them to land in master sooner, help with resolving the remaining release blockers would be appreciated. See the weekly status report later today, and join the tech call in 3.5 hours.

Alex

#9 lore raw
Quoted 11 lines · Alexander Kanavin
Quoted 3 lines · Dmitry Baryshkov via lists.openembedded.org

I see that these patches were a part of master-next and then were silently dropped. Could you please comment, why? Were there any remaining issues with them?

We're deep into feature freeze, we're late, and struggling to get the release out. At this point new features like this really don't belong in master-next, but the patches are still in Mathieu's staging branch.

Alexander, thanks for the explanation. I was surprised by the lack of any emails regarding them

Quoted 4 lines

If you want them to land in master sooner, help with resolving the remaining release blockers would be appreciated. See the weekly status report later today, and join the tech call in 3.5 hours.

Sure :-)

Signature · 2 lines
With best wishes
Dmitry