Re: [BUG?] macOS (Intel) build warnings: "ranlib: file … has no symbols" for aarch64 objects
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter@eisentraut.org>, Zhang Mingli <zmlpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, johncnaylorls@gmail.com
Date: 2026-04-27T19:43:20Z
Lists: pgsql-hackers
Attachments
- v1-0001-avoid-ranlib-warnings-on-macOS.patch (text/plain)
On Sun, Apr 26, 2026 at 09:31:37PM -0500, Nathan Bossart wrote: > On Sun, Apr 26, 2026 at 10:18:33PM -0400, Tom Lane wrote: >> I previously suggested that we should teach the build systems not >> to build the foo_x86 and foo_aarch64 modules when not on those >> architectures. That was shot down for reasons that made no great >> amount of sense to me, but I think it'd be fairly easy and clean. > > Yeah, AFAICT that's our best bet. Will write it up in the morning. Here's what I have so far. Two notes: * Since pg_popcount_aarch64.c only builds symbols when USE_NEON is defined, I needed to teach the build code about that #define. So, this patch effectively moves USE_NEON and USE_SSE2 from c.h to pg_config.h, which happens to be the first #include within c.h. The reason that I bring this up is because back-patching it seems a little scary, although I don't see any concrete reasons it would be unsafe. * pg_cpu_x86.c has a similar problem, which I haven't fixed yet. Presumably a similar approach will work there. I've added John Naylor to this thread for his thoughts. -- nathan
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Suppress "has no symbols" linker warnings on macOS.
- f00cccb79870 18.4 landed
- 7a8e35a4c964 16.14 landed
- 76cdf922b0e7 15.18 landed
- 5367c28c875c 14.23 landed
- 455ddabc8d9e 17.10 landed
- 3dd42ee97b81 19 (unreleased) landed
- 05f6c9ec2c47 13 (unreleased) landed
-
Fix two error messages in extended_stats_funcs.c
- 740a1494f4bf 19 (unreleased) cited