pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Sandro Mani <manisandro@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [Patch] Add missing libraries to Libs.private of libpq.pc
Date: Fri, 4 Sep 2020 22:07:00 +0200
Message-ID: <1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com> (raw)
In-Reply-To: <033443ae-cccc-ad2f-51f6-8b5c25cc2d2c@2ndquadrant.com>
References: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com>
	<033443ae-cccc-ad2f-51f6-8b5c25cc2d2c@2ndquadrant.com>

On 2020-07-10 21:47, Peter Eisentraut wrote:
> On 2020-04-08 11:38, Sandro Mani wrote:
>> The following patch, which we added to build mingw-postgresql on Fedora,
>> adds some missing libraries to Libs.private of libpq.pc, discovered when
>> attempting to statically link with libpq:
>>
>> -lz: is required by -lcrypto
> 
> I think the correct fix for that would be to add libssl to libpq's
> Requires.private.

For that, I propose the attached patch.

>> -liconv: is required by -lintl (though possibly depends on whether
>> gettext was compiled with iconv support)

I think the solution here would be to have gettext provide a pkg-config 
file.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

0001-Add-libpq-s-openssl-dependencies-to-pkg-config-file.patch (text/plain, 1.0K) download From 358e23268fbd42989a64d3326678c2c83326aa77 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter@eisentraut.org> Date: Fri, 4 Sep 2020 22:03:49 +0200 Subject: [PATCH] Add libpq's openssl dependencies to pkg-config file Add libssl and libcrypto to libpq.pc's Requires.private. This allow static linking to work if those libssl or libcrypto themselves have dependencies in their *.private fields, such as -lz in some cases. Reported-by: Sandro Mani <manisandro@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com --- src/interfaces/libpq/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index d4919970f8..4ac5f4b340 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -89,6 +89,8 @@ SHLIB_PREREQS = submake-libpgport SHLIB_EXPORTS = exports.txt +PKG_CONFIG_REQUIRES_PRIVATE = libssl libcrypto + all: all-lib # Shared library stuff -- 2.28.0

Message-ID: <1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com>
Permalink:  ../1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com/
Also on:    postgresql.org/message-id/1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, manisandro@gmail.com
  Subject: Re: [Patch] Add missing libraries to Libs.private of libpq.pc
  In-Reply-To: <1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com>
  References: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com> <033443ae-cccc-ad2f-51f6-8b5c25cc2d2c@2ndquadrant.com> <1c12e077-c7c3-7a84-4aba-b6c808d83fb8@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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