Re: static libpq (and other libraries) overwritten on aix

2022-08-24 Thread Noah Misch
On Wed, Aug 24, 2022 at 08:43:04PM -0700, Andres Freund wrote: > On 2022-08-20 10:42:13 -0700, Andres Freund wrote: > > 0004 aix: when building with gcc, tell gcc we're building a shared library > > > > That's the gcc -shared issue I explained in the email I'm replying to. > > > > We should p

Re: static libpq (and other libraries) overwritten on aix

2022-08-24 Thread Andres Freund
Hi, On 2022-08-20 10:42:13 -0700, Andres Freund wrote: > On 2022-08-20 01:35:22 -0700, Andres Freund wrote: > > I'll send in a patch series tomorrow, too tired for today. > > Here it goes. > 0001 aix: Fix SHLIB_EXPORTS reference in VPATH builds > > That's mostly so I could even build. It's no

Re: static libpq (and other libraries) overwritten on aix

2022-08-20 Thread Andres Freund
Hi, On 2022-08-20 01:35:22 -0700, Andres Freund wrote: > I'll send in a patch series tomorrow, too tired for today. Here it goes. 0001 aix: Fix SHLIB_EXPORTS reference in VPATH builds That's mostly so I could even build. It's not quite right in the sense that we don't depend on the file, bu

Re: static libpq (and other libraries) overwritten on aix

2022-08-20 Thread Noah Misch
On Sat, Aug 20, 2022 at 01:35:22AM -0700, Andres Freund wrote: > Afaict there's no reason to generate lib.a for extension .so's, right? Right. We install cube.so, not any *cube.a file.

Re: static libpq (and other libraries) overwritten on aix

2022-08-20 Thread Andres Freund
Hi, On 2022-08-18 22:56:43 -0700, Noah Misch wrote: > > On 2022-08-17 21:59:29 -0700, Noah Misch wrote: > > > Along the lines of Robert's comment, it could be a nice code > > > beautification to > > > use a different suffix for the short-lived .a file. Perhaps _so_inputs.a. > > > > Agreed, it'd

Re: static libpq (and other libraries) overwritten on aix

2022-08-18 Thread Noah Misch
On Thu, Aug 18, 2022 at 09:03:57AM -0700, Andres Freund wrote: > My point is that we currently, across most of the other platforms, support > building a "proper" static library, and install it too. But on AIX (and I > think mingw), we don't, but without an explicit comment about not doing so. In >

Re: static libpq (and other libraries) overwritten on aix

2022-08-18 Thread Andres Freund
Hi, On 2022-08-17 21:59:29 -0700, Noah Misch wrote: > The AIX sections of Makefile.shlib misuse the terms "static" and "shared". > > Imagine s/static library/library ending in .a/ and s/shared library/library > ending in .so/. That yields an accurate description of the makefile rules. I realize

Re: static libpq (and other libraries) overwritten on aix

2022-08-18 Thread Andrew Dunstan
On 2022-08-18 Th 10:10, Robert Haas wrote: > On Thu, Aug 18, 2022 at 12:59 AM Noah Misch wrote: >> Along the lines of Robert's comment, it could be a nice code beautification >> to >> use a different suffix for the short-lived .a file. Perhaps _so_inputs.a. > Yeah, this is the kind of thing I

Re: static libpq (and other libraries) overwritten on aix

2022-08-18 Thread Robert Haas
On Thu, Aug 18, 2022 at 12:59 AM Noah Misch wrote: > Along the lines of Robert's comment, it could be a nice code beautification to > use a different suffix for the short-lived .a file. Perhaps _so_inputs.a. Yeah, this is the kind of thing I was thinking about. -- Robert Haas EDB: http://www.e

Re: static libpq (and other libraries) overwritten on aix

2022-08-17 Thread Noah Misch
The AIX sections of Makefile.shlib misuse the terms "static" and "shared". Imagine s/static library/library ending in .a/ and s/shared library/library ending in .so/. That yields an accurate description of the makefile rules. On Wed, Aug 17, 2022 at 12:01:54PM -0700, Andres Freund wrote: > Two qu

Re: static libpq (and other libraries) overwritten on aix

2022-08-17 Thread Andres Freund
Hi, On 2022-08-17 15:28:18 -0400, Robert Haas wrote: > On Wed, Aug 17, 2022 at 3:02 PM Andres Freund wrote: > > 2) Do we care about static libraries not suriving on AIX? There could also > > be > >a race in the buildrules leading to sometimes static libs sometimes > > shared > >libs win

Re: static libpq (and other libraries) overwritten on aix

2022-08-17 Thread Robert Haas
On Wed, Aug 17, 2022 at 3:02 PM Andres Freund wrote: > 2) Do we care about static libraries not suriving on AIX? There could also be >a race in the buildrules leading to sometimes static libs sometimes shared >libs winning, I think. Instead of overwriting the same file, can we not use dif

static libpq (and other libraries) overwritten on aix

2022-08-17 Thread Andres Freund
Hi, I was hacking in making aix work with the meson patchset last night when I noticed this delightful bit: gmake -C src/interfaces/libpq ... rm -f libpq.a ar crs libpq.a fe-auth-scram.o fe-connect.o fe-exec.o fe-lobj.o fe-misc.o fe-print.o fe-protocol3.o fe-secure.o fe-trace.o legacy-pqsignal.