Skip to contentSkip to conversation

package/libdill: autoreconf needs host-pkgconf

PATCH In review Bernd Kuhls 2 participants 3 messages May 30

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 package/libdill: autoreconf needs host-pkgconf

Buildroot commit 106e2b448c5249aa905aeaa0a5a1d1f87cf8f694 bumped libdill to include an upstream commit:
https://github.com/sustrik/libdill/commit/b3b81d2c7bf4daf8a57925ddd40f5b6f13484187
which added PKG_CHECK_MODULES to configure.ac causing an error during autoreconf when openssl, with host-pkgconf added as optional dependency, is not selected:

configure.ac:119: error: possibly undefined macro: AC_CHECK_LIB
If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.
configure.ac:127: error: possibly undefined macro: AC_MSG_ERROR

Fixes:
https://autobuild.buildroot.net/results/05c/05c6a3f5a9290f1e5e4f62fea13a0f4cb1278c04/

The first build error of this kind occured on 2022-08-21:
https://autobuild.buildroot.net/results/a29/a294492db81b6fd105dac88d8f5c8bc1a222bb8e/

---
v2: Series passes Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2563402770

with the exception of bootlin-x86-i686-musl for which I could not find a fix: https://gitlab.com/bkuhls/buildroot/-/jobs/14613121682

This build error was masked by the other bugs which are fixed by this series. It can be reproduced with this gcc-14.x-based defconfig on the master branch with the autoconf-fix added:

BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_PACKAGE_LIBDILL=y

 package/libdill/libdill.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/libdill/libdill.mk +2 -1
index 9dda81d085..bea9aaeecb 100644
@@ -10,6 +10,7 @@ LIBDILL_LICENSE = MIT
 LIBDILL_LICENSE_FILES = COPYING
 LIBDILL_INSTALL_STAGING = YES
 # Fetched from Github, with no configure script
+LIBDILL_DEPENDENCIES = host-pkgconf
 LIBDILL_AUTORECONF = YES
 
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
@@ -19,7 +20,7 @@ LIBDILL_CONF_OPTS += --disable-threads
 endif
 
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
-LIBDILL_DEPENDENCIES += host-pkgconf openssl
+LIBDILL_DEPENDENCIES += openssl
 LIBDILL_CONF_OPTS += --enable-tls
 else
 LIBDILL_CONF_OPTS += --disable-tls
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 2/2 package/libdill: fix build with gcc-15.x

Updated project URL: https://github.com/sustrik/libdill/pull/228

Adding -std=gnu17 was recommended in upstream PR:
https://github.com/sustrik/libdill/issues/229#issuecomment-2865524080

Fixes:
https://autobuild.buildroot.net/results/1a5/1a5e9d7df6c83a921cae39b4dc4b601be4d18e36/

---
v2: Series passes Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/pipelines/2563402770

with the exception of bootlin-x86-i686-musl for which I could not find a fix: https://gitlab.com/bkuhls/buildroot/-/jobs/14613121682

This build error was masked by the other bugs which are fixed by this series. It can be reproduced with this gcc-14.x-based defconfig on the master branch with the autoconf-fix added:

BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_PACKAGE_LIBDILL=y

 package/libdill/libdill.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/libdill/libdill.mk +7 -0
index bea9aaeecb..453031a471 100644
@@ -13,6 +13,13 @@ LIBDILL_INSTALL_STAGING = YES
 LIBDILL_DEPENDENCIES = host-pkgconf
 LIBDILL_AUTORECONF = YES
 
+# gcc-15 defaults to -std=gnu23 which introduces build failures.
+# We force "-std=gnu17" for gcc version supporting it. Earlier gcc
+# versions will work, since they are using the older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+LIBDILL_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 LIBDILL_CONF_OPTS += --enable-threads
 else
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH v2 2/2] package/libdill: fix build with gcc-15.x

Quoted 1 line · Bernd Kuhls

Updated project URL: https://github.com/sustrik/libdill/pull/228

This part was actually already committed months ago, so I updated the commit
message and applied both to master, thanks.

Quoted 10 lines

Adding -std=gnu17 was recommended in upstream PR:
https://github.com/sustrik/libdill/issues/229#issuecomment-2865524080

Fixes:
https://autobuild.buildroot.net/results/1a5/1a5e9d7df6c83a921cae39b4dc4b601be4d18e36/

---
v2: Series passes Gitlab pipelines:

It's actually v4 already...

Regards,
Arnout

Quoted 23 lines

https://gitlab.com/bkuhls/buildroot/-/pipelines/2563402770

with the exception of bootlin-x86-i686-musl for which I could not find a fix: https://gitlab.com/bkuhls/buildroot/-/jobs/14613121682

This build error was masked by the other bugs which are fixed by this series. It can be reproduced with this gcc-14.x-based defconfig on the master branch with the autoconf-fix added:

BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_PACKAGE_LIBDILL=y

  package/libdill/libdill.mk | 7 +++++++
  1 file changed, 7 insertions(+)
package/libdill/libdill.mk +0 -0
index bea9aaeecb..453031a471 100644
@@ -13,6 +13,13 @@ LIBDILL_INSTALL_STAGING = YES
  LIBDILL_DEPENDENCIES = host-pkgconf
  LIBDILL_AUTORECONF = YES
 

package/libdill/libdill.mk LIBDILL_INSTALL_STAGING = YES · line 25

Quoted 10 lines
package/libdill/libdill.mk +7 -0
+# gcc-15 defaults to -std=gnu23 which introduces build failures.
+# We force "-std=gnu17" for gcc version supporting it. Earlier gcc
+# versions will work, since they are using the older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+LIBDILL_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
  ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
  LIBDILL_CONF_OPTS += --enable-threads
  else

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot