macos ventura SDK spews warnings
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
Date: 2022-10-15T21:19:55Z
Lists: pgsql-hackers
Attachments
Hi
I had recently updated the M1 mini that I use to test macOS stuff on. Just
tried to test a change on it and was greeted with a lot of
warnings. Apparently the update brought in a newer SDK (MacOSX13.0.sdk), even
though the OS is still Monterey.
One class of warnings is specific to meson (see further down), but the other
is common between autoconf and meson:
[24/2258] Compiling C object src/port/libpgport_srv.a.p/snprintf.c.o
../../../src/postgres/src/port/snprintf.c:1002:11: warning: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
vallen = sprintf(convert, "%p", value);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
the same warning is repeated for a bunch of different lines in the same file,
and then over the three versions of libpgport that we build.
This is pretty noisy.
The meson specific warning is
[972/1027] Linking target src/backend/replication/libpqwalreceiver/libpqwalreceiver.dylib
ld: warning: -undefined dynamic_lookup may not work with chained fixups
Which is caused by meson defaulting to -Wl,-undefined,dynamic_lookup for
modules. But we don't need that because we use -bund-loader. Adding
-Wl,-undefined,error as in the attached fixes it.
Greetings,
Andres Freund
Commits
-
Rename parser token REF to REF_P to avoid a symbol conflict.
- fec443414bbe 9.2 (unreleased) landed
- ee4c44014400 9.3 (unreleased) landed
- bc7a40b42eef 13.9 landed
- 9bfa043a1379 9.6 (unreleased) landed
- 717ec1aae90b 16.0 landed
- 6618c276b7a0 11.18 landed
- 57dfb6ce61e0 9.4 (unreleased) landed
- 3d7df87c4bba 12.13 landed
- 377b37cf7bf3 9.5 (unreleased) landed
- 24c4c2617138 15.1 landed
- 18e60712dd85 14.6 landed
- 02d074e3ebca 10.23 landed
-
Use libc's snprintf, not sprintf, for special cases in snprintf.c.
- d33ac1ec2af5 12.13 landed
- bd4b2926ecc2 15.1 landed
- a2acafc7be7a 13.9 landed
- 6fa431d84a04 14.6 landed
- 450ee701261a 16.0 landed
-
meson: macos: Use -Wl,-undefined,error for modules
- 9a95a510adf3 16.0 landed
-
Clean up messy API for src/port/thread.c.
- 98e93a1fc93e 15.0 cited