Re: Compile error on the aarch64 platform: Missing asm/hwcap.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Compile error on the aarch64 platform: Missing asm/hwcap.h
Date
Msg-id 3225796.1763149068@sss.pgh.pa.us
Whole thread Raw
In response to Re: Compile error on the aarch64 platform: Missing asm/hwcap.h  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> I wonder if the "&& !defined(__aarch64__)" bit needs to be removed.

No, that idea is off-track.  Looking at the following code, the
HWCAP2_CRC32 flag is only relevant on ARM32, so we don't need to
worry about obtaining a definition for it on aarch64 (and we'd likely
not find one anyway).  The OP is seemingly building on ARM32, else
it shouldn't try to reference this symbol.

I checked an old ARM32 Red Hat installation (Fedora 30, so it's
not as old as RHEL7, but it's the oldest image I've got) and
verified that <asm/hwcap.h> exists, and it defines HWCAP2_CRC32,
and our current code builds fine on it.

> But yeah, the real question is what is the difference between the
> OP's machine and everyplace else where this code works fine ...

After staring at the code for awhile, it appears to me that the
only way to explain this report is that "defined(__linux__)"
isn't true on the OP's machine.  Which is quite hard to believe,
and if it's the case then it's not something to fix on our side.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Uncommented GUC in postgresql.conf.sample
Next
From: Oleg Tkachenko
Date:
Subject: [BUG] pg_basebackup produces wrong incremental files after relation truncation in segmented tables