Re: Libpq linked to LibreSSL - Mailing list pgsql-general

From Michael Paquier
Subject Re: Libpq linked to LibreSSL
Date
Msg-id Y41GDCU3A+3y1yzg@paquier.xyz
Whole thread Raw
In response to Libpq linked to LibreSSL  (Marco Bambini <marco@creolabs.com>)
Responses Re: Libpq linked to LibreSSL  (Marco Bambini <marco@creolabs.com>)
List pgsql-general
On Sun, Dec 04, 2022 at 09:02:07AM +0100, Marco Bambini wrote:
> After several attempts (and runtime crashes), I am asking for help
> with how to compile libpq with LibreSSL support (both dynamic and
> static links would be OK to me).
> I know how to compile libpq with OpenSSL support, but I need to
> force it to link to LibreSSL.

LibreSSL is rather close to OpenSSL in terms of API compatibility as
far as I recall, OpenBSD using it.  Note that we have two buildfarm
members that I guess are doing so (adding Mikael in CC to confirm
here): morepork and plover.

The configure option --with-openssl would be the one to use, but you'd
better be sure that CFLAGS is pointing at the path(s) of the headers
of LibreSSL and that LDFLAGS points to the libraries of LibreSSL if
you have an environment mixing both.  Then at run-time, you could
force LD_LIBRARY_PATH to load the right thing.

There may be trickier things like building with OpenLDAP for example,
as Postgres built with --with-ldap could link to a version of OpenLDAP
linking to OpenSSL, but you'd want LibreSSL for a full consistency, so
be careful..  The same could happen with Python, but without knowing
what kind of environment you are using it will be hard to reach a
clear conclusion without at least more details.
--
Michael

Attachment

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Q: error on updating collation version information
Next
From: Ludwig Isaac Lim
Date:
Subject: Re: print in plpython not appearing in logs