On Thu 2/10/2022 5:21 PM Darren Tucker <dtucker at dtucker.net>
wrote:>On Fri, 11 Feb 2022 at 07:07, Val Baranov <val.baranov at duke.edu>
wrote:
>[...]
>> This error is remediated by replacing LIBS="-lcrypto $LIBS"
with LIBS="-lcrypto -lpthread $LIBS" in configure script.
>> This can be also fixed by appending "--with-libs=-lpthread"
to 'configure' command above.
>> The error itself is misleading as it refers to "libcrypto"
while it actually related to "libpthread".
>>
>> Would be feasible to fix this in "configure" script in order
to do not hit this each time configuring a new version (which does not happen
often).
>
>OK so the reason sounds like your libcrypto is built with pthreads.
>As it stands, configure does not know that, all it knows is that its test
program would not link against libcrypto. We definitely don't want to link
in pthreads if it's not needed (we don't really want it even if it is
needed, but that's another story).
>
>It looks like all of the versions of OpenSSL and LibreSSL we support these
days have pkg-config .pc files so we could potentially look it up there. Does
your system ship with pkg-config? The ancient AIX system I have here does not.
Don't see pkg-config on AIX 7.1.
libcrypto is not built with pthreads - that's what it contains:
shr.o
shr_comm.o
shr_xpg5.o
init.o
OpenSSH here is being compiled with no shared libraries, therefore OpenSSH build
(binary) does not look for 3rd party libraries (zlib and openssl) but only
refers to OS libs libc.a and libpthread.a (this was done in order to do not
depend on a specific system' installed OpenSSL package).
Looks like the error message is misleading to claim "libcrypto" while
in fact "configure" either can't find "libpthread" or -
which sounds more realistic - can't find "libcrypto" w/o
mentioning "--with-libs=-lpthread" option. Again, this case is for
OpenSSH compiling with no shared libs, the "libcrypto.a" contains the
object files which are statically linked to the binary.
--
Val Baranov <val.baranov at duke.edu>