pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sandro Mani <manisandro@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: [Patch] Add missing libraries to Libs.private of libpq.pc
Date: Wed, 8 Apr 2020 11:38:50 +0200
Message-ID: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com> (raw)

Hello

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
-liconv: is required by -lintl (though possibly depends on whether 
gettext was compiled with iconv support)

Thanks
Sandro


diff -rupN postgresql-11.5/src/interfaces/libpq/Makefile 
postgresql-11.5-new/src/interfaces/libpq/Makefile
--- postgresql-11.5/src/interfaces/libpq/Makefile    2019-08-05 
23:14:59.000000000 +0200
+++ postgresql-11.5-new/src/interfaces/libpq/Makefile 2020-04-07 
13:49:00.801203610 +0200
@@ -80,10 +80,10 @@ endif
  ifneq ($(PORTNAME), win32)
  SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto 
-lkrb5 -lgssapi_krb5 -lgss -lgssapi -lssl -lsocket -lnsl -lresolv 
-lintl, $(LIBS)) $(LDAP_LIBS_FE) $(PTHREAD_LIBS)
  else
-SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto 
-lkrb5 -lgssapi32 -lssl -lsocket -lnsl -lresolv -lintl $(PTHREAD_LIBS), 
$(LIBS)) $(LDAP_LIBS_FE)
+SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lz -lk5crypto 
-lkrb5 -lgssapi32 -lssl -lsocket -lnsl -lresolv -lintl $(PTHREAD_LIBS), 
$(LIBS)) $(LDAP_LIBS_FE)
  endif
  ifeq ($(PORTNAME), win32)
-SHLIB_LINK += -lshell32 -lws2_32 -lsecur32 $(filter -leay32 -lssleay32 
-lcomerr32 -lkrb5_32, $(LIBS))
+SHLIB_LINK += -lshell32 -lws2_32 -lsecur32 -liconv $(filter -leay32 
-lssleay32 -lcomerr32 -lkrb5_32, $(LIBS))
  endif

  SHLIB_EXPORTS = exports.txt






view thread (4+ messages)  latest in thread

Message-ID: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com>
Permalink:  ../837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com/
Also on:    postgresql.org/message-id/837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.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: manisandro@gmail.com
  Subject: Re: [Patch] Add missing libraries to Libs.private of libpq.pc
  In-Reply-To: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.com>
  References: <837d1dcf-2fca-ee6e-0d7e-6bce1a1bac75@gmail.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