RE: Libpq linked statically linked to OpenSSL/LibreSSL

From: ALBERTO CABELLO SÁNCHEZ <alberto(at)unex(dot)es>
To: Marco Bambini <marco(at)creolabs(dot)com>, "pgsql-interfaces(at)lists(dot)postgresql(dot)org" <pgsql-interfaces(at)lists(dot)postgresql(dot)org>
Subject: RE: Libpq linked statically linked to OpenSSL/LibreSSL
Date: 2022-12-05 13:10:33
Message-ID: PA4PR05MB896952E77CAFA3AD5CB188EBA7189@PA4PR05MB8969.eurprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

>> 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.

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Marco Bambini 2022-12-05 16:47:07 Re: Libpq linked statically linked to OpenSSL/LibreSSL
Previous Message ALBERTO CABELLO SÁNCHEZ 2022-12-05 12:48:51 RE: Libpq linked statically linked to OpenSSL/LibreSSL