public inbox for [email protected]  
help / color / mirror / Atom feed
From: ALBERTO CABELLO SÁNCHEZ <[email protected]>
To: Marco Bambini <[email protected]>
To: [email protected] <[email protected]>
Subject: RE: Libpq linked statically linked to OpenSSL/LibreSSL
Date: Mon, 5 Dec 2022 12:48:51 +0000
Message-ID: <PA4PR05MB8969E8C20AC8EC343149E0F8A7189@PA4PR05MB8969.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> Hi all,
>
> After several attempts, I am asking for help with how to compile libpq with OpenSSL
> statically linked.
> I need to have libpq linked with LibreSSL, but if I could statically link OpenSSL, I think
> I could switch the TLS libraries at compile time.

Hi,

I'm not sure if it will work this way, but I think you could build libpq from source, then
enter src/interfaces/libpq and rebuild the final libpq manually including libssl.a, so redo
the step which creates libpq.so

gcc (blah blah blah) -o libpq.so.5.15 (more blah blah)

appending your libssl.a location (mine is /usr/lib/x86_64-linux-gnu/libssl.a) at the end.
It look prettier if you add it to the list of input ".o" files. You'll end with a bigger libpq.so.

That "15" is the PostgreSQL major version number. Yours could be different.

Hope that helps.




view thread (10+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: RE: Libpq linked statically linked to OpenSSL/LibreSSL
  In-Reply-To: <PA4PR05MB8969E8C20AC8EC343149E0F8A7189@PA4PR05MB8969.eurprd05.prod.outlook.com>

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

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox