configure && --with

From: Matthias Apitz <guru(at)unixarea(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: configure && --with
Date: 2026-04-07 09:15:08
Message-ID: adTLHOYqTDxT6auA@pureos
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

We're compiling PostgreSQL on SuSE Linux Enterprise since "ages" (since
11.x) from sources and I have the following small problem:

We have also our own compiled OpenSSL version on the server (and servers
of our customers) as:

$ which openssl
/usr/local/sisis-pap/bin/openssl

The OpenSSL binary is found via PATH, but also needs our compiled libs,
of course:

$ openssl -v
openssl: /usr/local/lib64/libssl.so.3: version `OPENSSL_3.4.0' not found (required by openssl)
...

$ LD_LIBRARY_PATH=/usr/local/sisis-pap/lib/ /usr/local/sisis-pap/bin/openssl -v
OpenSSL 3.5.5 27 Jan 2026 (Library: OpenSSL 3.5.5 27 Jan 2026)

So far so good and clear. But for the ./configure step I cant set the
directory where our OpenSSL 3.5.5 expects its libs in front because this
makes the compiler/linker blaming. They need /usr/lib64 in front of
/usr/local/sisis-pap/lib:

export LD_LIBRARY_PATH="/usr/lib64:/usr/local/sisis-pap/lib:$LD_LIBRARY_PATH"

and some more settings for LDFLAGS, CFLAGS and CPPFLAGS) as:

export LDFLAGS="-L/usr/local/sisis-pap/lib -L/usr/lib64"
export CFLAGS="-m64 -I/usr/local/sisis-pap/include"
export CPPFLAGS="-m64 -I/usr/local/sisis-pap/include"

When I now run

./configure --prefix=/usr/local/sisis-pap/pgsql-18.3 \
--libdir=/usr/local/sisis-pap/pgsql-18.3/lib \
--with-ssl=/usr/local/sisis-pap/lib \
--enable-nls \
--with-perl \
--with-ldap \
--with-pam \
--without-icu \
--with-openssl

it seems(!) to work fine, but spills out:

$ grep openssl config.log
...
configure:14192: checking for openssl
configure:14210: found /usr/local/sisis-pap/bin/openssl
configure:14222: result: /usr/local/sisis-pap/bin/openssl
configure:14242: using openssl: openssl not found
...

i.e. ./configure detected correctly from where openssl to start (from
/usr/local/sisis-pap/bin/openssl) but can't use it due to the above
explained problem from where to load the shared libs.

My question is:

Why the setting of '--with-ssl=/usr/local/sisis-pap/lib' as adviced by
the help of ./configure:

$ ./configure --help | grep 'with-ssl=LIB'
--with-ssl=LIB use LIB for SSL/TLS support (openssl)

is not used for the run check of the openssl binary as LD_LIBRARY_PATH?

matthias

--
Matthias Apitz, ✉ guru(at)unixarea(dot)de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub

Annalena Baerbock: "We are fighting a war against Russia ..." (25.1.2023)

I, Matthias, I am not at war with Russia.
Я не воюю с Россией.
Ich bin nicht im Krieg mit Russland.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2026-04-07 14:21:48 Re: configure && --with
Previous Message Darkhan 2026-04-05 13:32:37 pg_kazsearch: Full-text search extension for Kazakh language