[lfs-dev] glibc-2.25 compile error

Ken Moffat zarniwhoop at ntlworld.com
Thu Feb 23 09:28:39 PST 2017

On Thu, Feb 23, 2017 at 06:02:53PM +0300, Vladislav Dembskiy wrote:
> Dear colleagues,
> I decided to rebuild glib-2.25 according to current development version of LFS Book systemd using kernel headers 4.9.11
> I have got the following error during compilation:
> /sources/glibc-2.25/build/posix/sched_cpucount.o.dt -MT /sources/glibc-2.25/build/posix/sched_cpucount.o
> In file included from regex.c:67:0:
> regexec.c: In function ‘check_node_accept_bytes’:
> regexec.c:3856:29: error: ‘extra’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
>         const unsigned char *coll_sym = extra + cset->coll_syms[i];
>                              ^~~~~~~~
> I have to add —disable-werror option to continue compilation. The only deviation from the book only I use —enable-kernel=4.9.6  because my host Gentoo use this kernel.
> Kind regards,
> Vladislav

No idea, but rebuilding glibc is a dangerous procedure and most
people will not need to do it.  I've done it a few times in the past
(once for an issue in sound, I think, and then fixing a
vulnerability across all ny systens).

I'd like to make two comments:

1. I've built current svn (sysv) with 4.9.11 headers on two
machines. One was running 4.10-rc7 for the build, and that was all
fine. The other was running 4.10.0, and there the gettext tests
stalled at the start using all cores and I ended up not running
those tests. So, 4.9.11 headers worked fine for me having to disable
Werror, but as with all deviation it may introduce new problems.

2. I think using --enable-kernel is somewhat untested for stable
releases of recent kernels. Possibly, specifying 4.9.0 might be
safer.  There are two definite downsides to specifying a very recent

(i) If you hit a kernel problem and need to bisect, some of the
kernels might claim to be older than what your glibc supports
(probably only if you build a newer kernel)

(ii) You also need to look at your rescue options - if your host
system is not ok, will a rescue CD or similar be new enough ?  I see
that I am still using --enable-kernel=3.9.0 (yes, three) because the
SystemRescueCD I use was running that.

`I shall take my mountains', said Lu-Tze. `The climate will be good
for them.'     -- Small Gods

More information about the lfs-dev mailing list