Mailing List Archive

compat-tests failing to build in 9.1p1
Howdy,

So I found another regression test issue. Starting in V_9_1_P1
compat-tests (in openbsd-compat/regress) is failing to build. I've been
able to recreate this in Ubuntu 22.04 and 20.04. It looks like it wants
to link against OpenSSL but the library isn't getting linked.

cc -g -O2 -pipe -Wno-error=format-truncation -Wall -Wpointer-arith
-Wuninitialized -Wsign-compare -Wformat-security
-Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result
-Wimplicit-fallthrough -Wmisleading-indentation -fno-strict-aliasing
-D_FORTIFY_SOURCE=2 -ftrapv -fzero-call-used-regs=all
-fno-builtin-memset -fstack-protector-strong -fPIE -I. -I.. -I../..
-I. -I./.. -I./../.. -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-D_DEFAULT_SOURCE -DOPENSSL_API_COMPAT=0x10100000L -DHAVE_CONFIG_H
-Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie
../libopenbsd-compat.a -o opensslvertest opensslvertest.c
../libopenbsd-compat.a -lmd

/usr/bin/ld: ../libopenbsd-compat.a(openssl-compat.o): in function
`ssh_libcrypto_init':
/home/rapier/openssh-portable/openbsd-compat/openssl-compat.c:75:
undefined reference to `OPENSSL_init_crypto'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22: opensslvertest] Error 1
make[1]: Leaving directory
'/home/rapier/openssh-portable/openbsd-compat/regress'

Adding -lcrypto to LIBS in openbsd-compat/regress/Makefile.in fixes the
problem but I know that's not the right way to do this.

I also tried configuring with --without-openssl and got the following:

/usr/bin/ld: /tmp/ccWem4Wo.o: in function `main':
/home/rapier/openssh-portable/openbsd-compat/regress/opensslvertest.c:67:
undefined reference to `ssh_compatible_openssl'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:22: opensslvertest] Error 1
make[1]: Leaving directory
'/home/rapier/openssh-portable/openbsd-compat/regress'
make: *** [Makefile:756: compat-tests] Error 2


Just wanted to let you all know.

Chris
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev
Re: compat-tests failing to build in 9.1p1 [ In reply to ]
On Thu, 3 Nov 2022 at 08:05, Chris Rapier <rapier@psc.edu> wrote:
> So I found another regression test issue. Starting in V_9_1_P1
> compat-tests (in openbsd-compat/regress) is failing to build. I've been
> able to recreate this in Ubuntu 22.04 and 20.04. It looks like it wants
> to link against OpenSSL but the library isn't getting linked.

Indeed, libcrypto moved to CHANNELLIBS (so that we don't link it
against binaries that don't need it, such as scp, sftp and
sftp-server). Fixed, thanks.

--
Darren Tucker (dtucker at dtucker.net)
GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new)
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev