pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[Patch] Add missing libraries to Libs.private of libpq.pc
4+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2020-09-10 beff361bc1 Add libpq's openssl dependencies to pkg-config file
* [Patch] Add missing libraries to Libs.private of libpq.pc
@ 2020-04-08 09:38 Sandro Mani <manisandro@gmail.com>
2020-07-01 20:54 ` Re: [Patch] Add missing libraries to Libs.private of libpq.pc Tom Lane <tgl@sss.pgh.pa.us>
2020-07-10 19:47 ` Re: [Patch] Add missing libraries to Libs.private of libpq.pc Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 2 replies; 4+ messages in thread
From: Sandro Mani @ 2020-04-08 09:38 UTC (permalink / raw)
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Patch] Add missing libraries to Libs.private of libpq.pc
2020-04-08 09:38 [Patch] Add missing libraries to Libs.private of libpq.pc Sandro Mani <manisandro@gmail.com>
@ 2020-07-01 20:54 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2020-07-01 20:54 UTC (permalink / raw)
To: Sandro Mani <manisandro@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Sandro Mani <manisandro@gmail.com> writes:
> 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:
TBH, I think we should just reject this patch. We do not encourage or
support statically linking libpq (and I thought that was against
distro-level policies in Fedora, as well --- such policies certainly
existed when I worked for Red Hat). Moreover, the proposed patch
requires us to absorb assumptions about the dependencies of external
libraries that we really shouldn't be making. I fear that it risks
causing new problems on other platforms, or at the very least
unnecessarily bloating libpq's dependency footprint. In particular,
creating a hard dependency on -liconv regardless of build options
seems right out.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Patch] Add missing libraries to Libs.private of libpq.pc
2020-04-08 09:38 [Patch] Add missing libraries to Libs.private of libpq.pc Sandro Mani <manisandro@gmail.com>
@ 2020-07-10 19:47 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-09-10 13:56 ` Re: [Patch] Add missing libraries to Libs.private of libpq.pc Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
1 sibling, 1 reply; 4+ messages in thread
From: Peter Eisentraut @ 2020-07-10 19:47 UTC (permalink / raw)
To: Sandro Mani <manisandro@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
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.
> -liconv: is required by -lintl (though possibly depends on whether
> gettext was compiled with iconv support)
Yeah, in both of these cases it depends on what libssl or libintl
variant you actually got. It could be the OS one or a separately
installed one, it could be one with or without pkg-config support. I'm
not sure what a robust solution would be.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [Patch] Add missing libraries to Libs.private of libpq.pc
2020-04-08 09:38 [Patch] Add missing libraries to Libs.private of libpq.pc Sandro Mani <manisandro@gmail.com>
2020-07-10 19:47 ` Re: [Patch] Add missing libraries to Libs.private of libpq.pc Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2020-09-10 13:56 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 0 replies; 4+ messages in thread
From: Peter Eisentraut @ 2020-09-10 13:56 UTC (permalink / raw)
To: Sandro Mani <manisandro@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On 2020-09-04 22:07, Peter Eisentraut wrote:
> 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.
committed
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2020-09-10 13:56 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-04-08 09:38 [Patch] Add missing libraries to Libs.private of libpq.pc Sandro Mani <manisandro@gmail.com>
2020-07-01 20:54 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-07-10 19:47 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2020-09-10 13:56 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
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