Re: BUG #18610: llvm error: __aarch64_swp4_acq_rel which could not be resolved

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: a(dot)kozhemyakin(at)postgrespro(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18610: llvm error: __aarch64_swp4_acq_rel which could not be resolved
Date: 2024-09-11 09:55:45
Message-ID: CA+hUKGKwzv9bbDD2c=Ugv62PVinVUopxRgL8pKxyiBPHsrgWog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Sep 11, 2024 at 7:58 PM PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> FATAL: fatal llvm error: Program used external function
> '__aarch64_swp4_acq_rel' which could not be resolved!

Hmm, I think it is inlining spinlock code from
pg_last_wal_receive_lsn()'s call to GetWalRcvFlushRecPtr(), and then
failing to find fallbacks for pre-ARMv8.1 systems that didn't have the
LSE atomic instructions. I wonder if there could be some mismatch in
the default -march for parts of your toolchain, so that it doesn't
link the library that has that stuff, but then the clang that built
walreceiverfuncs.bc expects it to be found. I wonder if it goes away
if you add "-mno-outline-atomics" or "-march=armv8.1-a" or
"-march=armv8-a+lse" to BITCODE_CXXFLAGS (not saying that's a fix,
just trying to understand what's happening...). Assuming you're using
GCC, maybe "gcc -Q --help=target | grep march" could show what Ubuntu
24 has set as the baseline, and "clang -### -c -x c /dev/null" might
show what clang is selecting... just ideas, I'm not sure, I don't have
such a system, I just noticed a few distros cranking up the baseline
instruction sets recently...

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andrew Dunstan 2024-09-11 11:36:33 Re: pl/perl extension fails on Windows
Previous Message Daniel Gustafsson 2024-09-11 08:01:22 Re: BUG #18609: Repeated installcheck failure in test_pg_dump due to existing role