You have to build in manylinux. Manylinux requires only small subset of system libraries and an old GLIBC. The manylinux image uses RHEL's developer kit to provide a newer version of GCC that only links with the older GLIBC. The manylinux docker image is at quay.io/pypa/manylinux2014_x86_64:latest. manylinux2014 is GLIBC 2.17 based, which is much older than ubuntu 18.04 (2.27). If you used manylinux_2_28 (which is GLIBC 2.28) in cibuildwheel, then your 18.04 one might work. But don't do that, just build everything inside manylinux.
Originally posted by @henryiii in #1556 (comment)
Is it really required to build in manylinux or will it also work to build in the underlying docker container? E.g. manylinux_2_28 is based on almalinux 8 (see https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux_2_28-almalinux-8-based), so would the almalinux 8 image be sufficient?
Originally posted by @henryiii in #1556 (comment)
Is it really required to build in manylinux or will it also work to build in the underlying docker container? E.g. manylinux_2_28 is based on almalinux 8 (see https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux_2_28-almalinux-8-based), so would the almalinux 8 image be sufficient?