All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/util-linux: fix non-MMU build
@ 2026-04-26 10:22 Bernd Kuhls
  2026-05-29 18:25 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-04-26 10:22 UTC (permalink / raw)
  To: buildroot; +Cc: Giulio Benetti

Buildroot commit 31af509b4f4fe52f67bd9109b8732a55b8f9cd2d bumped the
package from 2.40.2 to 2.41.1. This bump includes upstream commit
https://github.com/util-linux/util-linux/commit/a3f1255f1891ddbaf3bb6a32af28569c0e6f3b91
which was added to version 2.41 and includes the usage of
pthread_atfork() causing build errors on non-MMU platforms:

libuuid/src/gen_uuid.c: In function 'uuid_generate_time_generic':
libuuid/src/gen_uuid.c:629:17: error: implicit declaration of function
 'pthread_atfork'; did you mean 'pthread_join'?
 [-Wimplicit-function-declaration]
  629 |                 pthread_atfork(NULL, NULL, reset_uuidd_cache);

The oldest build error of this kind can be found on the 2025.11.x
branch with version 2.41.1:
https://autobuild.buildroot.net/results/87c/87c74435be14956fd45f730269eac102e70d56da/

A backport of this patch to the LTS branches should be considered.

Fixes:
https://autobuild.buildroot.org/results/a21e81e64eccc866b575a4f3b1376c50f2ffd837/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 package/util-linux/util-linux.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
index 1271bc7dc0..99a6be976e 100644
--- a/package/util-linux/util-linux.mk
+++ b/package/util-linux/util-linux.mk
@@ -130,6 +130,11 @@ UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
 UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LINK_LIBS)"
 UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LINK_LIBS)"
 
+# pthread support uses pthread_atfork, which is not available on nommu
+ifneq ($(BR2_USE_MMU),y)
+UTIL_LINUX_CONF_ENV += ac_cv_lib_pthread_pthread_atfork=no
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 UTIL_LINUX_DEPENDENCIES += libselinux
 UTIL_LINUX_CONF_OPTS += --with-selinux
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/util-linux: fix non-MMU build
  2026-04-26 10:22 [Buildroot] [PATCH 1/1] package/util-linux: fix non-MMU build Bernd Kuhls
@ 2026-05-29 18:25 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-05-29 18:25 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot, Giulio Benetti

Hello Bernd,

On Sun, Apr 26, 2026 at 12:22:15PM +0200, Bernd Kuhls wrote:
> Buildroot commit 31af509b4f4fe52f67bd9109b8732a55b8f9cd2d bumped the
> package from 2.40.2 to 2.41.1. This bump includes upstream commit
> https://github.com/util-linux/util-linux/commit/a3f1255f1891ddbaf3bb6a32af28569c0e6f3b91
> which was added to version 2.41 and includes the usage of
> pthread_atfork() causing build errors on non-MMU platforms:
> 
> libuuid/src/gen_uuid.c: In function 'uuid_generate_time_generic':
> libuuid/src/gen_uuid.c:629:17: error: implicit declaration of function
>  'pthread_atfork'; did you mean 'pthread_join'?
>  [-Wimplicit-function-declaration]
>   629 |                 pthread_atfork(NULL, NULL, reset_uuidd_cache);
> 
> The oldest build error of this kind can be found on the 2025.11.x
> branch with version 2.41.1:
> https://autobuild.buildroot.net/results/87c/87c74435be14956fd45f730269eac102e70d56da/
> 
> A backport of this patch to the LTS branches should be considered.
> 
> Fixes:
> https://autobuild.buildroot.org/results/a21e81e64eccc866b575a4f3b1376c50f2ffd837/
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
>  package/util-linux/util-linux.mk | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk
> index 1271bc7dc0..99a6be976e 100644
> --- a/package/util-linux/util-linux.mk
> +++ b/package/util-linux/util-linux.mk
> @@ -130,6 +130,11 @@ UTIL_LINUX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -Dstatic_assert=_Static_assert"
>  UTIL_LINUX_CONF_ENV += LIBS="$(UTIL_LINUX_LINK_LIBS)"
>  UTIL_LINUX_MAKE_OPTS += LIBS="$(UTIL_LINUX_LINK_LIBS)"
>  
> +# pthread support uses pthread_atfork, which is not available on nommu
> +ifneq ($(BR2_USE_MMU),y)
> +UTIL_LINUX_CONF_ENV += ac_cv_lib_pthread_pthread_atfork=no
> +endif

Thanks for the patch and the detailed explanation. However, the
configure script has a check to see if pthread_atfork() is available
or not. Why is this configure check finding that pthread_atfork()
exists... and the build then fails because it doesn't exist?

Basically, your patch is papering over the real problem/question of
why the configure check is not working as it should.

I've started a build to have a look, but if you have some insights,
I'm interested.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-05-29 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26 10:22 [Buildroot] [PATCH 1/1] package/util-linux: fix non-MMU build Bernd Kuhls
2026-05-29 18:25 ` Thomas Petazzoni via buildroot

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.