Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding' - Mailing list pgsql-hackers

From Mikael Sand
Subject Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding'
Date
Msg-id CAAwAxZf8kgnGNtGCM2j_x7dXTtfA24XHa5QOUSTWC_R3MBAC0A@mail.gmail.com
Whole thread Raw
In response to Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Well for getting the potential benefits of link-time optimization into more places, and slightly improved developer ergonomics, and perhaps mostly to eliminate potential confusion if one needs pg_common and pg_ports or the shared library version when compiling statically. 
Would you happen to know if it is possible?

regards, mikael sand

On Fri, Oct 11, 2024 at 12:12 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Mikael Sand <msand@seaber.io> writes:
> I wonder if it would be possible to link pgcommon_shlib and pgport_shlib
> statically into pq and do LTO already at that point, such that consumers of
> libpq could merely link against libpq.a and that would be enough?

What would be the point?  A typical build will still have a pile of
outside dependencies that static-link consumers will have to track
manually (openssl and so forth).  So I don't see how this'd move
the needle much.

                        regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding'
Next
From: Tom Lane
Date:
Subject: Re: sunsetting md5 password support