public inbox for [email protected]help / color / mirror / Atom feed
Re: configure && --with 6+ messages / 3 participants [nested] [flat]
* Re: configure && --with @ 2026-04-07 14:21 Tom Lane <[email protected]> 0 siblings, 1 reply; 6+ messages in thread From: Tom Lane @ 2026-04-07 14:21 UTC (permalink / raw) To: Matthias Apitz <[email protected]>; +Cc: [email protected] Matthias Apitz <[email protected]> writes: > 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? If you had checked the manual, you would have read --with-ssl=LIBRARY Build with support for SSL (encrypted) connections. The only LIBRARY supported is openssl, which is used for both OpenSSL and LibreSSL. So the argument is just pro-forma at the moment, although someday maybe it will do something. The options you need to use to point it at a non-default openssl installation are --with-includes and --with-libraries [1]. regards, tom lane [1] https://www.postgresql.org/docs/current/install-make.html#CONFIGURE-OPTIONS-BUILD-PROCESS ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: configure && --with @ 2026-04-08 06:57 Matthias Apitz <[email protected]> parent: Tom Lane <[email protected]> 0 siblings, 2 replies; 6+ messages in thread From: Matthias Apitz @ 2026-04-08 06:57 UTC (permalink / raw) To: Tom Lane <[email protected]>; +Cc: [email protected] El día martes, abril 07, 2026 a las 10:21:48a. m. -0400, Tom Lane escribió: > The options you need to use to point it at a non-default openssl > installation are --with-includes and --with-libraries [1]. ... > [1] https://www.postgresql.org/docs/current/install-make.html#CONFIGURE-OPTIONS-BUILD-PROCESS Thanks for your hints. I do use now: $ ./configure --prefix=/usr/local/sisis-pap/pgsql-18.3 \ --libdir=/usr/local/sisis-pap/pgsql-18.3/lib \ --with-includes=/usr/local/sisis-pap/include \ --with-libraries=/usr/local/sisis-pap/lib \ --enable-nls \ --with-perl \ --with-ldap \ --with-pam \ --without-icu \ --with-openssl but it still says in 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 configure:14245: checking openssl/ssl.h usability configure:14245: gcc -c -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -m64 -I/usr/local/sisis-pap/include -m64 -I/usr/local/sisis-pap/include -D_GNU_SOURCE -I/usr/local/sisis-pap/include conftest.c >&5 configure:14245: $? = 0 configure:14245: result: yes ... The libs are in the correct place: $ ls /usr/local/sisis-pap/lib/libs* /usr/local/sisis-pap/lib/libssl.a /usr/local/sisis-pap/lib/libssl.so.3 /usr/local/sisis-pap/lib/libssl.so $ ls /usr/local/sisis-pap/lib/libcr* /usr/local/sisis-pap/lib/libcrypto.a /usr/local/sisis-pap/lib/libcrypto.so.3 /usr/local/sisis-pap/lib/libcrypto.so Any idea? Thanks matthias -- Matthias Apitz, ✉ [email protected], http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub In Cuba bei der Ankunft eines Schiffes mit Rohöl: "Endlich, die Russen sind da! En Cuba al llegar un barco con crudo: "Por fin, los rusos llegan!" Wann kommen sie endlich zu uns? ¿Cúando llegan por fin para acá? ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: configure && --with @ 2026-04-08 09:02 Matthias Apitz <[email protected]> parent: Matthias Apitz <[email protected]> 1 sibling, 2 replies; 6+ messages in thread From: Matthias Apitz @ 2026-04-08 09:02 UTC (permalink / raw) To: Tom Lane <[email protected]>; [email protected] El día miércoles, abril 08, 2026 a las 08:57:24 +0200, Matthias Apitz escribió: > Thanks for your hints. I do use now: > > $ ./configure --prefix=/usr/local/sisis-pap/pgsql-18.3 \ > --libdir=/usr/local/sisis-pap/pgsql-18.3/lib \ > --with-includes=/usr/local/sisis-pap/include \ > --with-libraries=/usr/local/sisis-pap/lib \ > --enable-nls \ > --with-perl \ > --with-ldap \ > --with-pam \ > --without-icu \ > --with-openssl > > but it still says in 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 > configure:14245: checking openssl/ssl.h usability > configure:14245: gcc -c -Wall -Wmissing-prototypes -Wpointer-arith > -Wdeclaration-after-statement -Werror=vla -Wendif-labels > -Wmissing-format-attribute -Wimplicit-fallthrough=3 > -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv > -fexcess-precision=standard -Wno-format-truncation -m64 > -I/usr/local/sisis-pap/include -m64 -I/usr/local/sisis-pap/include > -D_GNU_SOURCE -I/usr/local/sisis-pap/include conftest.c >&5 > configure:14245: $? = 0 > configure:14245: result: yes > ... > > The libs are in the correct place: > > > $ ls /usr/local/sisis-pap/lib/libs* > /usr/local/sisis-pap/lib/libssl.a /usr/local/sisis-pap/lib/libssl.so.3 > /usr/local/sisis-pap/lib/libssl.so > $ ls /usr/local/sisis-pap/lib/libcr* > /usr/local/sisis-pap/lib/libcrypto.a /usr/local/sisis-pap/lib/libcrypto.so.3 > /usr/local/sisis-pap/lib/libcrypto.so > I run the full ./configure below strace(1) and it turns out what I was especting: $ grep -n execve tr | grep bin/openssl 518130:1081 execve("/usr/local/sisis-pap/bin/openssl", ["/usr/local/sisis-pap/bin/openssl", "version"], 0x560886d493e0 /* 78 vars */) = 0 now looking for the PID 1081 only and the fetched libs: grep ^1081 tr | grep openat | egrep '/libssl|/libcry' 1081 openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v3/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 1081 openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v2/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) 1081 openat(AT_FDCWD, "/usr/lib64/libssl.so.3", O_RDONLY|O_CLOEXEC) = 3 1081 openat(AT_FDCWD, "/usr/lib64/libcrypto.so.3", O_RDONLY|O_CLOEXEC) = 3 i.e. /usr/local/sisis-pap/bin/openssl does not pick-up its libs where it should, while with a correct LD_LIBRARY_PATH is does it fine: $ LD_LIBRARY_PATH=/usr/local/sisis-pap/lib strace /usr/local/sisis-pap/bin/openssl -v 2>&1 | grep libssl openat(AT_FDCWD, "/usr/local/sisis-pap/lib/glibc-hwcaps/x86-64-v3/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) openat(AT_FDCWD, "/usr/local/sisis-pap/lib/glibc-hwcaps/x86-64-v2/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) openat(AT_FDCWD, "/usr/local/sisis-pap/lib/libssl.so.3", O_RDONLY|O_CLOEXEC) = 3 sisis@srap51dxr1:~/mpi-V73-sp2> LD_LIBRARY_PATH=/usr/local/sisis-pap/lib strace /usr/local/sisis-pap/bin/openssl -v 2>&1 | egrep 'libssl|libcry' openat(AT_FDCWD, "/usr/local/sisis-pap/lib/glibc-hwcaps/x86-64-v3/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) openat(AT_FDCWD, "/usr/local/sisis-pap/lib/glibc-hwcaps/x86-64-v2/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) openat(AT_FDCWD, "/usr/local/sisis-pap/lib/libssl.so.3", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/usr/local/sisis-pap/lib/libcrypto.so.3", O_RDONLY|O_CLOEXEC) = 3 -- Matthias Apitz, ✉ [email protected], 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. ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: configure && --with @ 2026-04-08 11:19 Matthias Apitz <[email protected]> parent: Matthias Apitz <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Matthias Apitz @ 2026-04-08 11:19 UTC (permalink / raw) To: Tom Lane <[email protected]>; [email protected] El día miércoles, abril 08, 2026 a las 11:02:07 +0200, Matthias Apitz escribió: > El día miércoles, abril 08, 2026 a las 08:57:24 +0200, Matthias Apitz escribió: > > > Thanks for your hints. I do use now: > > > > $ ./configure --prefix=/usr/local/sisis-pap/pgsql-18.3 \ > > --libdir=/usr/local/sisis-pap/pgsql-18.3/lib \ > > --with-includes=/usr/local/sisis-pap/include \ > > --with-libraries=/usr/local/sisis-pap/lib \ > > --enable-nls \ > > --with-perl \ > > --with-ldap \ > > --with-pam \ > > --without-icu \ > > --with-openssl > > I did y quick fix in ./configure and with this I get in 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:14246: using openssl: OpenSSL 3.5.6 7 Apr 2026 (Library: OpenSSL 3.5.6 7 Apr 2026) configure:14249: checking openssl/ssl.h usability ... The change is: diff -c configure.orig configure *** configure.orig Mon Feb 23 22:56:43 2026 --- configure Wed Apr 8 13:06:57 2026 *************** *** 14238,14244 **** --- 14238,14248 ---- $as_echo "$OPENSSL" >&6; } fi + # see line 3109 for LIBRARY_DIRS + LD_LIBRARY_PATH_SAVED=$LD_LIBRARY_PATH + LD_LIBRARY_PATH=$LIBRARY_DIRS:$LD_LIBRARY_PATH pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)" + LD_LIBRARY_PATH=$LD_LIBRARY_PATH_SAVED { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;} if test "$with_ssl" = openssl ; then The bug/issue with "--with-libraries=LIB" is that the specified lib dir(s) are used for linker statement, but never for run time statements: 8096 # 8097 # Library directories 8098 # 8099 ac_save_IFS=$IFS 8100 IFS="${IFS}${PATH_SEPARATOR}" 8101 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file. 8102 for dir in $LIBRARY_DIRS $SRCH_LIB; do 8103 if test -d "$dir"; then 8104 LIBDIRS="$LIBDIRS -L$dir" 8105 else ... My fix is dirty and should not stay like this. It only points to the problem. HIH matthias -- Matthias Apitz, ✉ [email protected], 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. ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: configure && --with @ 2026-04-08 11:24 Laurenz Albe <[email protected]> parent: Matthias Apitz <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Laurenz Albe @ 2026-04-08 11:24 UTC (permalink / raw) To: Matthias Apitz <[email protected]>; Tom Lane <[email protected]>; [email protected] On Wed, 2026-04-08 at 11:02 +0200, Matthias Apitz wrote: > El día miércoles, abril 08, 2026 a las 08:57:24 +0200, Matthias Apitz escribió: > > > Thanks for your hints. I do use now: > > > > $ ./configure --prefix=/usr/local/sisis-pap/pgsql-18.3 \ > > --libdir=/usr/local/sisis-pap/pgsql-18.3/lib \ > > --with-includes=/usr/local/sisis-pap/include \ > > --with-libraries=/usr/local/sisis-pap/lib \ > > --enable-nls \ > > --with-perl \ > > --with-ldap \ > > --with-pam \ > > --without-icu \ > > --with-openssl > > > > but it still says in 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 > > > > The libs are in the correct place: > > > > $ ls /usr/local/sisis-pap/lib/libs* > > /usr/local/sisis-pap/lib/libssl.a /usr/local/sisis-pap/lib/libssl.so.3 > > /usr/local/sisis-pap/lib/libssl.so > > $ ls /usr/local/sisis-pap/lib/libcr* > > /usr/local/sisis-pap/lib/libcrypto.a /usr/local/sisis-pap/lib/libcrypto.so.3 > > /usr/local/sisis-pap/lib/libcrypto.so > > I run the full ./configure below strace(1) and it turns out what I was > especting: > > $ grep -n execve tr | grep bin/openssl > 518130:1081 execve("/usr/local/sisis-pap/bin/openssl", ["/usr/local/sisis-pap/bin/openssl", "version"], 0x560886d493e0 /* 78 vars */) = 0 > > now looking for the PID 1081 only and the fetched libs: > > grep ^1081 tr | grep openat | egrep '/libssl|/libcry' > 1081 openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v3/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) > 1081 openat(AT_FDCWD, "/usr/lib64/glibc-hwcaps/x86-64-v2/libssl.so.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden) > 1081 openat(AT_FDCWD, "/usr/lib64/libssl.so.3", O_RDONLY|O_CLOEXEC) = 3 > 1081 openat(AT_FDCWD, "/usr/lib64/libcrypto.so.3", O_RDONLY|O_CLOEXEC) = 3 > > i.e. /usr/local/sisis-pap/bin/openssl does not pick-up its libs where it > should, while with a correct LD_LIBRARY_PATH is does it fine: Then why don't you set LD_LIBRARY_PATH in the environment where you call ./configure? Alternatively, perhaps it is possible to build OpenSSL with an RPATH that points to its shared libraries. Yours, Laurenz Albe ^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: configure && --with @ 2026-04-08 14:59 Tom Lane <[email protected]> parent: Matthias Apitz <[email protected]> 1 sibling, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-04-08 14:59 UTC (permalink / raw) To: Matthias Apitz <[email protected]>; +Cc: [email protected] Matthias Apitz <[email protected]> writes: > but it still says in 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 You don't actually need to worry about that. It's only trying to report the result of "openssl version" for documentation's sake. We don't use that executable for anything beyond that. regards, tom lane ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-04-08 14:59 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-04-07 14:21 Re: configure && --with Tom Lane <[email protected]> 2026-04-08 06:57 ` Matthias Apitz <[email protected]> 2026-04-08 09:02 ` Matthias Apitz <[email protected]> 2026-04-08 11:19 ` Matthias Apitz <[email protected]> 2026-04-08 11:24 ` Laurenz Albe <[email protected]> 2026-04-08 14:59 ` Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox