pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private
2+ messages / 2 participants
[nested] [flat]

* Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private
@ 2020-02-17 10:37  Pyry Kontio <pyry.kontio@drasa.eu>
  0 siblings, 1 reply; 2+ messages in thread

From: Pyry Kontio @ 2020-02-17 10:37 UTC (permalink / raw)
  To: pgsql-bugs

Hi,

I recently investigated a build with statically linked libpq
that broke on update to PostgreSQL 12.0.

The problem was that starting from 12.0, libpq doesn't
include some required files via symlinks anymore,
and needs to be linked against libpgcommon and
libpgcore. (When dynamically linking, this problem
doesn't manifest.)

(Ref: my earlier mail.
https://www.postgresql.org/message-id/CACS8yHL0gbL3ECONrDygcBioTQBY%3DoVG-KGWB6%2BN7spG%2BeSMQw%40ma...)

However, the pkg-config file for libpq doesn't reflect that fact.
I think that this should be considered as a bug; I think that
libpq's pkg-config file should be have libpgcommon and libpgcore
on the Libs.private row like this:

Libs.private: -L/musl/lib/ -lm -lpgcommon -lpgport

That would allow scripts that get their linking flags from
pkg-config to correctly build libpq even when doing a static build.

Let me hear what you think.

All the best,
Pyry Kontio





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private
@ 2020-02-17 14:04  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Pyry Kontio <pyry.kontio@drasa.eu>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2020-02-17 14:04 UTC (permalink / raw)
  To: Pyry Kontio <pyry.kontio@drasa.eu>; +Cc: pgsql-bugs

Pyry Kontio <pyry.kontio@drasa.eu> writes:
> I recently investigated a build with statically linked libpq
> that broke on update to PostgreSQL 12.0.

> The problem was that starting from 12.0, libpq doesn't
> include some required files via symlinks anymore,
> and needs to be linked against libpgcommon and
> libpgcore. (When dynamically linking, this problem
> doesn't manifest.)

Correct.

> However, the pkg-config file for libpq doesn't reflect that fact.
> I think that this should be considered as a bug;

We do not support statically-linked libpq, so this is not a bug.

If you are going to distribute a statically-linked libpq, you can
distribute a modified pkg-config file alongside it, but please
make clear to your users that such a configuration is not standard
Postgres and is not supported or approved by upstream.

The primary reason why I'm pushing back so hard against this is
that in the configuration you suggest, there's no way to avoid
exposing all the cruft in libpgcommon and libpgport to client
applications.  That's a horrible situation and will inevitably
lead to ABI problems.  Which we will *NOT* acknowledge as being
our bug to deal with, and we are not going to be happy that
you made it possible.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-02-17 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 10:37 Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private Pyry Kontio <pyry.kontio@drasa.eu>
2020-02-17 14:04 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox