[Buildroot] [PATCH v2 1/1] package/util-linux: fix libuuid build without pthread

Peter Korsgaard peter at korsgaard.com
Tue Feb 4 13:14:33 UTC 2025


>>>>> "Julien" == Julien Olivain <ju.o at free.fr> writes:

 > Since Buildroot commit [1], util-linux libuuid is failing to build
 > with uclibc toolchains, when there is no thread support
 > (that is, when BR2_PTHREADS_NONE=y).

 > Builds are failing with error:

 >     libuuid/src/gen_uuid.c:83:10: fatal error: pthread.h: No such file or directory
 >        83 | #include <pthread.h>
 >           |          ^~~~~~~~~~~

 > This failure is due to the upstream commit [2], which introduced the
 > pthread dependency.

 > This commit fixes the issue by adding package patches, disabling
 > the uuidd cache in case the libptread (or the pthread_atfork function)
 > is not available.

 > Fixes:
 > https://autobuild.buildroot.org/results/e5856cf6f3b8512ededa17d20db2b330a478dd8e/

 > [1] https://gitlab.com/buildroot.org/buildroot/-/commit/f14929c657a7b1794dcd39ac469d2ad826465d98
 > [2] https://github.com/util-linux/util-linux/commit/25bd5396ab700623134b491f42a3280556cb674c

 > Signed-off-by: Julien Olivain <ju.o at free.fr>
 > ---
 > Changes v1 -> v2:
 > changed package patches:
 > v1 was using https://github.com/util-linux/util-linux/pull/3375
 > v2 is using https://github.com/util-linux/util-linux/pull/3383
 > ---
 > Patch tested in:
 > https://gitlab.com/jolivain/buildroot/-/pipelines/1645583168

 > Note: there is two build failures, unrelated to this patch.
 > ---
 >  .../0002-c.h-consolidate-THREAD_LOCAL.patch   | 65 +++++++++++++++
 >  ...ine-HAVE_LIBPTHREAD-and-PTHREAD_LIBS.patch | 47 +++++++++++
 >  .../0004-meson-add-HAVE_LIBPTHREAD.patch      | 27 ++++++

I guess the meson patch is not strictly needed, but OK - Maybe makes
more sense to use the entire patch series and it will go away anyway
once we move to the next release.

Committed, thanks.

-- 
Bye, Peter Korsgaard


More information about the buildroot mailing list