Re: static libpq (and other libraries) overwritten on aix - Mailing list pgsql-hackers

From Noah Misch
Subject Re: static libpq (and other libraries) overwritten on aix
Date
Msg-id 20220818045929.GB410601@rfd.leadboat.com
Whole thread Raw
In response to static libpq (and other libraries) overwritten on aix  (Andres Freund <andres@anarazel.de>)
Responses Re: static libpq (and other libraries) overwritten on aix
Re: static libpq (and other libraries) overwritten on aix
List pgsql-hackers
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 questions:
> 1) Do we continue building static libraries for libpq etc?

Essentially, we don't build static libpq today, and we should continue not
building it.  (The first-built libpq.a is static, but that file is an
implementation detail of the makefile rules.  The surviving libpq.a is a
normal AIX shared library.)

> 2) Do we care about static libraries not suriving on AIX?

No.

>    There could also be
>    a race in the buildrules leading to sometimes static libs sometimes shared
>    libs winning, I think.

Not since commit e8564ef, to my knowledge.


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.

I found this useful years ago:
https://web.archive.org/web/20151003130212/http://seriousbirder.com/blogs/aix-shared-and-static-libraries-explained/



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PATCH] Clarify the comments about varlena header encoding
Next
From: Justin Pryzby
Date:
Subject: Re: shadow variables - pg15 edition