[Buildroot] [PATCH 1/1] package/ustr: Fix musl build by forcing glibc detection to true

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sun May 22 20:42:16 UTC 2016


Hello,

On Sat, 21 May 2016 18:28:17 +0200, Bernd Kuhls wrote:

> +--- ustr-1.0.4/configure.ac.orig	2016-05-21 18:08:02.000000000 +0200
> ++++ ustr-1.0.4/configure.ac	2016-05-21 18:18:47.170881727 +0200
> +@@ -24,7 +24,7 @@
> + int version = __GLIBC__;
> + 	]])],
> + 	[AC_MSG_RESULT([yes]); GLIBC_USED=1;],
> +-	[AC_MSG_RESULT([no]); GLIBC_USED=0;])
> ++	[AC_MSG_RESULT([no]); GLIBC_USED=1;])

I know this is the easiest/shortest fix, but it's not very pretty. The
good solution IMHO is to remove this glibc check completely, and
instead use AC_CACHE_VAL() so that a cache variable allows to override
the result of the AC_TRY_RUN() test.

That being said, you said in a reply that libsemanage, which is the
only package that uses ustr, does not build with musl due to
getpwent_r() being missing. getpwent_r() is a glibc-specific extension,
so it will most likely not be implemented by musl. So either
libsemanage can be changed to use getpwent() (making sure that
libsemanage didn't need the reentrant characteristic of getpwent_r), or
we should simply make libsemanage/ustr not available on musl.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list