Fedora Account System
Red Hat Associate
Red Hat Customer
Regression window (glibc): - Last known good: glibc-2.42.9000-5.fc44 → Mesa builds OK (Rawhide x86_64 still has -5). - First bad: glibc-2.42.9000-6.fc44 → Mesa FTBFS. - Still bad: glibc-2.42.9000-7.fc44 → Mesa FTBFS (seen on i386). Scope: reproducible on all arches that updated to glibc ≥ 2.42.9000-6.fc44. How I verified: - mock x86_64 uses glibc-2.42.9000-5.fc44 → build succeeds. - mock i386 pulls glibc-2.42.9000-7.fc44 → build fails with the same error. - Locally exposed glibc-2.42.9000-6.fc44 to x86_64 via a repo → same FTBFS as on i386. Error excerpt: src/c11/threads.h:121:25: error: conflicting types for 'once_flag'; have 'pthread_once_t' (aka 'int') .../bits/types/once_flag.h:24:21: note: previous declaration of 'once_flag' Observation: glibc ≥ 2.42 exposes C11 thread types (e.g. 'once_flag'), while Mesa's C11 shim also defines them, leading to a header-level redefinition conflict.
Created attachment 2110373 [details] bad - build.log
Created attachment 2110374 [details] good - build.log
(In reply to Mikhail from comment #0) > Error excerpt: > src/c11/threads.h:121:25: error: conflicting types for 'once_flag'; have > 'pthread_once_t' (aka 'int') > .../bits/types/once_flag.h:24:21: note: previous declaration of 'once_flag' Interesting. Mesa is compiling with -std=c11. As of October 1st glibc is providing these for C23 and so for C11 they also show up in stdlib.h. ~~~ commit a7ddbf456d97ac8d1aa7afd735e196a1488bd874 Author: Joseph Myers <josmyers> Date: Wed Oct 1 15:15:15 2025 +0000 Add once_flag, ONCE_FLAG_INIT and call_once to stdlib.h for C23 C23 adds once_flag, ONCE_FLAG_INIT and call_once to stdlib.h (in C11 they were only in threads.h, in C23 they are in both headers; this change came from N2840). Implement this change, with a bits/types/once_flag.h header for the common type and initializer definitions. Note that there's an omnibus bug (bug 33001) that covers more than just these missing definitions. This doesn't seem a significant enough feature to be worth mentioning in NEWS. ISO C is not concerned with whether functions are in libc or libpthread, but POSIX links this to what header they are declared in, so functions declared in stdlib.h are supposed to be in libc. However, the current edition of POSIX is based on C17; hopefully Hurd glibc will have completed the merge of libpthread into libc (in particular, moving call_once) well before a future edition of POSIX based on C23 (or a later version of ISO C) is released. Tested for x86_64 and x86. ~~~ Joseph, Is there anything we want to do for source-level compatibility? > Observation: > glibc ≥ 2.42 exposes C11 thread types (e.g. 'once_flag'), while Mesa's C11 > shim also defines them, > leading to a header-level redefinition conflict. Mesa's C11 shim may need reworking as C23 support arrives.
This build log is using -D_GNU_SOURCE, so it's expected that new symbols from any standard (in this case: pre-existing symbols now added to another header) will appear. As this is apparently a shim for C11 threads support, using glibc's version of C11 threads.h (supported since glibc 2.28) might be an option (I don't know if that would affect API or ABI compatibility for Mesa at all).
Moving to mesa for evaluation and possibly follow up upstream work.
Possibly tripped up latest FF build in rawhide: https://koji.fedoraproject.org/koji/buildinfo?buildID=2852168
Closing this bug as the issues was solved upstream by Dave Airlie and it is incorporated in Fedora: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38298
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days or the product is inactive and locked