Packaging patch that unbreaks the musllinux (Alpine) Python wheels and adds
guardrails so the same regression cannot ship again. No source or API
changes; glibc, macOS, FreeBSD, and Windows builds are byte-for-byte
unaffected.
Bug Fixes
regopymusllinux wheels for 1.4.0 through 1.5.1 failed to load on Alpine
withError relocating librego_shared.so: __cxa_thread_atexit_impl: symbol not found. On non-glibc Linux, the snmalloc thread-teardown mode is now
forced toPTHREAD_DESTRUCTORS, which does not depend on the glibc-only
__cxa_thread_atexit_implsymbol. The resulting library loads cleanly on
Alpine and other musl-based distributions.
Build / Packaging
- Root
CMakeLists.txtprobes the target libc via<features.h>and
exposes the result asREGOCPP_HAVE_GLIBC. The probe runs on every
configure so a toolchain switch in an existing build directory is not
answered from a stale cache. src/CMakeLists.txtadds aPOST_BUILDsymbol assertion on
librego_shared.sowhen building for a non-glibc Linux, driven by a new
cmake/check_forbidden_symbols.cmakehelper. A future dependency that
reintroduces a glibc-only undefined reference fails the build rather than
the end user'sdlopen.- The
SNMALLOC_CLEANUPoverride transparently overwrites a stale
CXX11_THREAD_ATEXIT_DIRECTcache value from an earlier configure, so
developers iterating in the same build directory do not need to wipe it.
CI
pr_gate.ymlgains alinux-musllinux-loadjob that rebuilds
librego_shared.soinsidequay.io/pypa/musllinux_1_2_x86_64and
dlopens it in a plainpython:3.13-alpine, catching any glibc-only
undefined symbol on every PR.build_wheels.ymlgains asmoke_test_musllinuxjob that installs each
built musllinux wheel by explicit path (with a wheel-count assertion) in
the matchingpython:X-alpineimage and exercisesInterpreter().query
from both the main thread and a worker thread, verifying that snmalloc's
pthread-key teardown runs cleanly.