Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private

From: Pyry Kontio <pyry(dot)kontio(at)drasa(dot)eu>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Adding libpgcommon and libpgcore to libpq pkg-config's Requires.private
Date: 2020-02-17 10:37:49
Message-ID: CACS8yHJv+kUdGp0BjOpNCWC+MWU8iUjmFpHFOXv0GXMbLTOZUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Devrim Gündüz 2020-02-17 11:07:22 Re: BUG #16257: 12.2 rpm packages size increase vs 12.1
Previous Message Tom Lane 2020-02-16 22:11:19 Re: BUG #16260: Repetitive accessing to partitioned table inside transaction causes server process crash