public inbox for [email protected]
help / color / mirror / Atom feedFrom: Marco Bambini <[email protected]>
To: ALBERTO CABELLO SÁNCHEZ <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Libpq linked statically linked to OpenSSL/LibreSSL
Date: Mon, 5 Dec 2022 17:47:07 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <PA4PR05MB896952E77CAFA3AD5CB188EBA7189@PA4PR05MB8969.eurprd05.prod.outlook.com>
References: <[email protected]>
<PA4PR05MB8969E8C20AC8EC343149E0F8A7189@PA4PR05MB8969.eurprd05.prod.outlook.com>
<PA4PR05MB896952E77CAFA3AD5CB188EBA7189@PA4PR05MB8969.eurprd05.prod.outlook.com>
Thanks Alberto,
This is a very promising approach.
I tried to modify the Makefile in src/interfaces/libpq/Makefile and I replaced the occurrences of -lssl and -lcrypto with:
/root/rothsoft/libressl-3.6.1/ssl/.libs/libssl.a
/root/rothsoft/libressl-3.6.1/crypto/.libs/libcrypto.a
The compilation process is OK but when I tried to execute the test app I receive a link error:
Error loading DLL: /root/rothsoft/engines/postgreSQL/Linux/postgresql/libpq.so: undefined symbol: GENERAL_NAME_free
GENERAL_NAME_free usually means that libcrypto is missed.
Any help would be really appreciated.
Please note that I also tried with:
-l:/root/rothsoft/libressl-3.6.1/ssl/.libs/libssl.a
-l:/root/rothsoft/libressl-3.6.1/crypto/.libs/libcrypto.a
Thanks,
Marco
> On 5 Dec 2022, at 14:10, ALBERTO CABELLO SÁNCHEZ <[email protected]> wrote:
>
>>> 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.
>>
>> redo the step which creates libpq.so appending your libssl.a location
>> (mine is /usr/lib/x86_64-linux-gnu/libssl.a) at the end.
>
> Just wanted to correct: you also have to remove "-lssl". So I guess you can just
> substitute "-lssl" for libssl.a location in src/interfaces/libpq/Makefile (two occurrences)
> and build as usual.
>
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: <[email protected]>
* 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