Annoying build warnings from latest Apple toolchain
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2023-09-26T22:23:18Z
Lists: pgsql-hackers
Since updating to Xcode 15.0, my macOS machines have been spitting a bunch of linker-generated warnings. There seems to be one instance of ld: warning: -multiply_defined is obsolete for each loadable module we link, and some program links complain ld: warning: ignoring duplicate libraries: '-lpgcommon', '-lpgport' You can see these in the build logs for both sifaka [1] and indri [2], so MacPorts isn't affecting it. I'd held out some hope that this was a transient problem due to the underlying OS still being Ventura, but I just updated another machine to shiny new Sonoma (14.0), and it's still doing it. Guess we gotta do something about it. We used to need "-multiply_defined suppress" to suppress other linker warnings. I tried removing that from the Makefile.shlib recipes for Darwin, and those complaints go away while no new ones appear, so that's good --- but I wonder whether slightly older toolchain versions will still want it. As for the duplicate libraries, yup guilty as charged, but I think we were doing that intentionally to satisfy some other old toolchains. I wonder whether removing the duplication will create new problems. regards, tom lane [1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=sifaka&dt=2023-09-26%2021%3A09%3A01&stg=build [2] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=indri&dt=2023-09-26%2021%3A42%3A17&stg=build
Commits
-
meson: macos: Avoid warnings on Sonoma
- a3da95deee38 17.0 landed
- 9158e4b9eb99 16.3 landed
-
Restore proper linkage of pg_char_to_encoding() and friends.
- b6c7cfac88c4 17.0 landed
-
meson: macos: Correct -exported_symbols_list syntax for Sonoma compat
- d5c5312dc8b6 16.1 landed
- b1a8dc846da4 17.0 landed
-
Suppress macOS warnings about duplicate libraries in link commands.
- e9d1560d3e4d 14.10 landed
- d8ceb98e4cb0 12.17 landed
- be3398ea155c 15.5 landed
- 75c562653cbe 16.1 landed
- 4d10fda52042 11.22 landed
- 1b64e374c981 13.13 landed
- 06843df4abc5 17.0 landed
-
Stop using "-multiply_defined suppress" on macOS.
- e73d6a0df42c 16.1 landed
- abe423712a12 12.17 landed
- 78f17fb97a7e 15.5 landed
- 5d60e8ed3f18 14.10 landed
- 53cc19bfa807 13.13 landed
- 3aa021b29b0e 17.0 landed
- 0e0de20c88b9 11.22 landed
-
Fix the inadvertent libpq ABI breakage discovered by Martin Pitt: the
- 8468146b03c8 8.3.0 cited
-
Cause libpq and ecpg libraries to be built as proper shared libraries
- 9df30869725a 8.0.0 cited