Re: Failure building libpq v18.0 on old aarch64 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Failure building libpq v18.0 on old aarch64
Date
Msg-id 90914.1760320451@sss.pgh.pa.us
Whole thread Raw
In response to Failure building libpq v18.0 on old aarch64  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List pgsql-hackers
Daniele Varrazzo <daniele.varrazzo@gmail.com> writes:
> 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.

Hm.  So it seems we should do one or both of

(1) add #ifdef guards checking that HWCAP_CRC32/HWCAP2_CRC32 is
available;

(2) figure out what we need to do to #include that header you found.

(1) seems like a good idea in any case.  Given that this is such an
old system, I'm not that excited about (2), but maybe it's worth
troubling over?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Improve docs for n_distinct_inherited
Next
From: Xuneng Zhou
Date:
Subject: pgstattuple: Use streaming read API in pgstatindex functions