Re: Libpq linked statically linked to OpenSSL/LibreSSL

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Marco Bambini <marco(at)creolabs(dot)com>, ALBERTO CABELLO SÁNCHEZ <alberto(at)unex(dot)es>, "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-06 18:24:22
Message-ID: Y4+I1iM2gRBYlf9B@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

On Tue, Dec 6, 2022 at 10:01:00AM -0800, Andres Freund wrote:
> > I then modified the Makefile.global in the src directory by replacing 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
> > in the LIBS entry.
>
> I think this is completely the wrong path. You should add libressl's include
> and library directories to --with-includes=, --with-libraries=.

The big point is that a compile-compatible library is not necessarily a
link-compatible library, and that LibreSSL is probably only
compile-compatible with OpenSSL, hence the need to use the LibreSSL
includes.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Embrace your flaws. They make you human, rather than perfect,
which you will never be.

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Marco Bambini 2022-12-08 06:07:17 Re: Libpq linked statically linked to OpenSSL/LibreSSL
Previous Message Andres Freund 2022-12-06 18:01:00 Re: Libpq linked statically linked to OpenSSL/LibreSSL