Re: Fix pkg-config file for static linking

From: Filip Gospodinov <f(at)gospodinov(dot)ch>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Fix pkg-config file for static linking
Date: 2021-07-20 20:04:02
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 06.07.21 15:13, Peter Eisentraut wrote:
> This doesn't work.
> This patch adds libpgcommon and libpgport to Requires.private.  But they
> are not pkg-config names but library names, so they should be added to
> Libs.private.

Then, I must admit that I have misunderstood this patch at first

My impression was that PKG_CONFIG_REQUIRES_PRIVATE ends up in
Libs.private because of this line

After taking a second look, I've noticed that
PKG_CONFIG_REQUIRES_PRIVATE is *filtered out*. But unfortunately, this
currently doesn't work as intended because PKG_CONFIG_REQUIRES_PRIVATE
seems to be unset in Makefile.shlib which leaves Requires.private empty
and doesn't filter out -lcrypto and -lssl for Libs.private.
That must be also the reason why I first believed that
PKG_CONFIG_REQUIRES_PRIVATE is used to populate Libs.private.

Anyway, this issue is orthogonal to my original patch. I'm proposing to
hardcode -lpgcommon and -lpgport in Libs.private instead. Patch is attached.

Attachment Content-Type Size
pkgconfig-v2.patch text/x-patch 821 bytes

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-07-20 20:13:21 Re: Rename of triggers for partitioned tables
Previous Message Mark Dilger 2021-07-20 20:03:40 Re: refactoring basebackup.c