Re: Annoying build warnings from latest Apple toolchain

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, Peter Eisentraut <peter@eisentraut.org>, Noah Misch <noah@leadboat.com>, pgsql-hackers@lists.postgresql.org
Date: 2023-12-01T02:24:21Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2023-11-28 10:48:04 -0500, Robert Haas wrote:
>> What a stupid, annoying decision on Apple's part. It seems like
>> -Wl,-undefined,error is the default behavior, so they could have just
>> ignored that flag if present, but instead they complain about being
>> asked to do what they were going to do anyway.

> Especially because I think it didn't actually use to be the default when
> building a dylib.

Indeed.  Whoever's in charge of their linker now seems to be quite
clueless, or at least aggressively anti-backwards-compatibility.

> While not helpful for this, I just noticed that there is
> -no_warn_duplicate_libraries, which would at least get rid of the
>   ld: warning: ignoring duplicate libraries: '-lxml2'
> style warnings.

Oh!  If that's been there long enough to rely on, that does seem
very helpful.

			regards, tom lane



Commits

  1. meson: macos: Avoid warnings on Sonoma

  2. Restore proper linkage of pg_char_to_encoding() and friends.

  3. meson: macos: Correct -exported_symbols_list syntax for Sonoma compat

  4. Suppress macOS warnings about duplicate libraries in link commands.

  5. Stop using "-multiply_defined suppress" on macOS.

  6. Fix the inadvertent libpq ABI breakage discovered by Martin Pitt: the

  7. Cause libpq and ecpg libraries to be built as proper shared libraries