Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects - Mailing list pgsql-hackers

From John Naylor
Subject Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Date
Msg-id CANWCAZZVVhymm2eqzxQczi9pX7C6sKDzdsOT89v9CtZB__+p+g@mail.gmail.com
Whole thread
In response to Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
List pgsql-hackers
On Wed, Apr 29, 2026 at 3:32 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Tue, Apr 28, 2026 at 09:09:09AM -0500, Nathan Bossart wrote:
> > On Tue, Apr 28, 2026 at 09:29:41AM -0400, Tom Lane wrote:
> >> If we do care, a low-tech solution could be to have a dummy symbol
> >> declared in each file, along the lines of
> >>
> >> #if HAVE_X86_64_POPCNTQ
> >> // code for popcntq case
> >> #elif HAVE_FROBNITZ
> >> // code for frobnitz case
> >> ...
> >> #else
> >> /* prevent linker complaints about empty module */
> >> extern int pg_cpu_x86_dummy_variable;
> >> int  pg_cpu_x86_dummy_variable = 0;
> >> #endif
> >>
> >> Actually then we'd not need to change the build systems either...
> >
> > I've been trying to avoid doing that, but it's a far simpler solution, and
> > in theory it should fix the problem for all platforms, too.  So, it's
> > probably the way to go.
>
> Here's a full set of patches for back-patching purposes.

+1

-#endif           /* USE_NEON */
+#else
...
+#endif

Is the removal of the comment intentional?

--
John Naylor
Amazon Web Services



pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: Bug in ALTER SUBSCRIPTION ... SERVER / ... CONNECTION with broken old server
Next
From: Peter Smith
Date:
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications