You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build fails with glibc 2.13 after static_assert fallback regression #160704
Building CPython 3.15.2 against glibc 2.13 fails with an implicit declaration of static_assert.
gcc -pthread -c -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I/usr/local/src/python/Include/internal -I/usr/local/src/python/Include/internal/mimalloc -IObjects -IInclude -IPython -I. -I/usr/local/src/python/Include -DPy_BUILD_CORE -o Objects/longobject.o /usr/local/src/python/Objects/longobject.c
In file included from /usr/local/src/python/Include/Python.h:70,
from /usr/local/src/python/Objects/longobject.c:5:
/usr/local/src/python/Include/internal/pycore_bitutils.h: In function '_Py_popcount32':
/usr/local/src/python/Include/pymacro.h:175:13: error: implicit declaration of function 'static_assert' [-Wimplicit-function-declaration]
175 | static_assert((cond), #cond); \
| ^~~~~~~~~~~~~
/usr/local/src/python/Include/internal/pycore_bitutils.h:100:5: note: in expansion of macro 'Py_BUILD_ASSERT'
100 | Py_BUILD_ASSERT(sizeof(x) <= sizeof(unsigned int));
| ^~~~~~~~~~~~~~~
make: *** [Makefile:3407: Objects/longobject.o] Error 1
This is a regression introduced by #160376 and backported to 3.15 in #160437. The change in Include/pymacro.h makes the static_assert fallback conditional on:
Activity