Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private - Mailing list pgsql-bugs

From Pyry Kontio
Subject Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private
Date
Msg-id CACS8yHJv+kUdGp0BjOpNCWC+MWU8iUjmFpHFOXv0GXMbLTOZUQ@mail.gmail.com
Whole thread Raw
Responses Re: Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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%40mail.gmail.com)

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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16260: Repetitive accessing to partitioned table inside transaction causes server process crash
Next
From: Devrim Gündüz
Date:
Subject: Re: BUG #16257: 12.2 rpm packages size increase vs 12.1