Hello,
libpq v18 fails to build on aarch64 on rather old Centos versions. The error is:
pg_crc32c_armv8_choose.c: In function ‘pg_crc32c_armv8_available’:
pg_crc32c_armv8_choose.c:58:32: error: ‘HWCAP_CRC32’ undeclared
(first use in this function)
58 | return (getauxval(AT_HWCAP) & HWCAP_CRC32) != 0;
| ^~~~~~~~~~~
and is related to the change in aac831cafa6f3106dfcbd3298757801c299351fc.
The error affects the "manylinux2014" image, running Centos 7, used to
build Python packages with glibc 2.17 ABI compatibility. Centos 7 was
EOL'd in 2024, therefore, if your decision is to not support it
anymore, it is understandable; this is a FYI in case the breakage was
unexpected and a workaround is possible.
In Psycopg CI, where I have found the breakage, I have updated the
build image to manylinux_2_28 (AlmaLinux 8, glibc 2.28 ABI
compatibility), which took some effort [1] but now it's done, so the
issue should not be a blocker.
More info about the manylinux build images is at
<https://github.com/pypa/manylinux>.
The image where build fails contains:
$ docker run --rm quay.io/pypa/manylinux2014_aarch64 sh -c "cat
/etc/centos-release && grep -r HWCAP_CRC32 /usr/include"
CentOS Linux release 7.9.2009 (AltArch)
/usr/include/asm/hwcap.h:#define HWCAP_CRC32 (1 << 7)
Build succeeds on the following image:
$ docker run --rm quay.io/pypa/manylinux_2_28_aarch64 sh -c "cat
/etc/centos-release && grep -r HWCAP_CRC32 /usr/include"
AlmaLinux release 8.10 (Cerulean Leopard)
/usr/include/asm/hwcap.h:#define HWCAP_CRC32 (1 << 7)
/usr/include/bits/hwcap.h:#define HWCAP_CRC32 (1 << 7)
Cheers
-- Daniele
[1] https://fosstodon.org/@psycopg/115353111198001859