Re: macos ventura SDK spews warnings

2022-10-16 Thread Tom Lane
Andres Freund writes: > On 2022-10-16 16:45:24 -0400, Tom Lane wrote: >> What I *am* seeing, in the 9.5 and 9.6 branches, is a ton of >> >> ld: warning: -undefined dynamic_lookup may not work with chained fixups >> >> apparently because we are specifying -Wl,-undefined,dynamic_lookup >> which th

Re: macos ventura SDK spews warnings

2022-10-16 Thread Andres Freund
Hi, On 2022-10-16 16:45:24 -0400, Tom Lane wrote: > I wrote: > > I think the correct, future-proof fix is to s/REF/REF_P/ in the > > grammar. > > Done like that, after which I found that the pre-v12 branches are > compiling perfectly warning-free with the 13.0 SDK, despite nothing > having been do

Re: macos ventura SDK spews warnings

2022-10-16 Thread Tom Lane
I wrote: > I think the correct, future-proof fix is to s/REF/REF_P/ in the > grammar. Done like that, after which I found that the pre-v12 branches are compiling perfectly warning-free with the 13.0 SDK, despite nothing having been done about sprintf. This confused me mightily, but after digging

Re: macos ventura SDK spews warnings

2022-10-16 Thread Tom Lane
I wrote: > So I pushed (1), but on the way to testing (2), I discovered a totally > independent problem with the 13.0 SDK in older branches: > In file included from ../../../src/include/postgres.h:46: > In file included from ../../../src/include/c.h:1387: > In file included from ../../../src/inclu

Re: macos ventura SDK spews warnings

2022-10-16 Thread Tom Lane
Andres Freund writes: > On 2022-10-15 21:00:00 -0400, Tom Lane wrote: >> After further thought, I think the best compromise is just that: >> >> (1) apply s/sprintf/snprintf/ patch in branches back to v12, where >> we began to require C99. >> >> (2) in v11 and back to 9.2, enable -Wno-deprecated

Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 21:00:00 -0400, Tom Lane wrote: > I wrote: > > snprintf is required by POSIX going back to SUSv2, so it's pretty darn > > hard to imagine any currently-used platform that hasn't got it. Even > > my now-extinct dinosaur gaur had it (per digging in backup files). > > I think we co

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
I wrote: > snprintf is required by POSIX going back to SUSv2, so it's pretty darn > hard to imagine any currently-used platform that hasn't got it. Even > my now-extinct dinosaur gaur had it (per digging in backup files). > I think we could certainly assume its presence in the branches that > requ

Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
On 2022-10-15 14:19:55 -0700, Andres Freund wrote: > 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

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
Andres Freund writes: > On 2022-10-15 18:47:16 -0400, Tom Lane wrote: >>> Originally we used the platform's sprintf there because we couldn't >>> rely on platforms having functional snprintf. That's no longer the case, >>> I imagine, so we could just switch these calls over to snprintf. > Is the

Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 18:47:16 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> [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 compatibil

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
I wrote: > Andres Freund writes: >> [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 t

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
Andres Freund writes: > 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 > depreca

macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
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 f