Re: Compile error on the aarch64 platform: Missing asm/hwcap.h

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: 高增琦 <pgf00a(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Compile error on the aarch64 platform: Missing asm/hwcap.h
Date: 2025-11-14 05:06:08
Message-ID: CANWCAZbgJVBTPuuV_NpYFZA3bkw1y7nc0cMY5BXHdfnFVNanJQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 14, 2025 at 11:02 AM 高增琦 <pgf00a(at)gmail(dot)com> wrote:
> Compile error on CentOS Linux release 7.6.1810 (AltArch) with the message “‘HWCAP_CRC32’ undeclared”.

We still have at least one CentOS 7 aarch64 machine that gets regular
testing (not sure of the reason, since it's been EOL for a year and a
half IIUC), and it builds fine:

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=arowana&dt=2025-11-04%2004%3A56%3A57

> After modifying the code to add `include <asm/hwcap.h>`, the compilation succeeded.

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

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2025-11-14 05:13:09 Re: DOCS: Missing <structfield> tags for some SEQUENCE fields
Previous Message Peter Smith 2025-11-14 04:24:11 Re: [WIP]Vertical Clustered Index (columnar store extension) - take2