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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: 高增琦 <pgf00a(at)gmail(dot)com>, 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 15:02:29
Message-ID: 3135693.1763132549@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <johncnaylorls(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-11-14 15:02:36 Re: [Patch] Mention md5 is deprecated in postgresql.conf.sample
Previous Message Nathan Bossart 2025-11-14 14:57:46 Re: Uncommented GUC in postgresql.conf.sample