Re: Compile error on the aarch64 platform: Missing asm/hwcap.h
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: John Naylor <johncnaylorls@gmail.com>
Cc: 高增琦 <pgf00a@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-14T15:02:29Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix pg_popcount_aarch64.c to build with ancient glibc releases.
- 6a5170755127 18.2 landed
- 3e83bdd35a5f 19 (unreleased) landed
-
Fix pg_crc32c_armv8_choose.c to build with ancient glibc releases.
- db4eba15266e 18.2 landed
- 6d969ca687b4 19 (unreleased) landed
John Naylor <johncnaylorls@gmail.com> writes: > We already have the following, so I'm not sure what you mean (or even > what architecture you're running on): > #if defined(HAVE_ELF_AUX_INFO) || defined(HAVE_GETAUXVAL) > #include <sys/auxv.h> > #if defined(__linux__) && !defined(__aarch64__) && !defined(HWCAP2_CRC32) > #include <asm/hwcap.h> > #endif > #endif I wonder if the "&& !defined(__aarch64__)" bit needs to be removed. But yeah, the real question is what is the difference between the OP's machine and everyplace else where this code works fine ... regards, tom lane