Created attachment 814549 [details] build log /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ssh/libsshclient.a(gss.c.o): in f unction `gss_init': /var/tmp/portage/net-misc/putty-0.77-r2/work/putty-0.77/unix/gss.c:41: undefined reference to `dlsym' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ssh/libsshclient.a(gss.c.o): in f unction `ssh_gss_setup': /var/tmp/portage/net-misc/putty-0.77-r2/work/putty-0.77/unix/gss.c:69: undefined reference to `dlopen' /usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ssh/libsshclient.a(gss.c.o): in f unction `ssh_gss_cleanup': /var/tmp/portage/net-misc/putty-0.77-r2/work/putty-0.77/unix/gss.c:105: undefined reference to `dlclose' collect2: error: ld returned 1 exit status
Please always include emerge --info.
Created attachment 814552 [details] emerge --info
From a quick look seems it only adds libdl when gssapi = dynamic (not set if USE=-gssapi) if(PUTTY_GSSAPI STREQUAL DYNAMIC) add_optional_system_lib(dl dlopen) But PUTTY_GSSAPI=off doesn't seem to entirely disable building gssapi and its dl* code? I still see things like that in the binary despite USE=-gssapi: $ strings /usr/bin/putty | grep libgssapi.so.2 libgssapi.so.2 Using GSSAPI from libgssapi.so.2 However, this is only a problem for you because still using glibc-2.33 (in >=glibc-2.34 and musl these symbols are included in libc.so, so this wouldn't happen)
It looks like the generated header 'cmake.h' doesn't #define NO_GSSAPI so all of the related code still gets included. > putty-0.77 $ cmake -Bbuild -DPUTTY_GSSAPI=OFF > putty-0.77 $ grep NO_GSSAPI build/CMakeFiles/cmake.h > /* #undef NO_GSSAPI */ It seem that the CMake variable NO_GSSAPI doesn't get set if you pass -DPUTTY_GSSAPI=OFF, only if you pass -DPUTTY_GSSAPI=DYNAMIC and libdl isn't found. Will fix in -r3 and email patch upstream.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fafbac4f479bf7c882d4e58962d5e5b313e8bbe commit 5fafbac4f479bf7c882d4e58962d5e5b313e8bbe Author: Matthew Smith <matthew@gentoo.org> AuthorDate: 2022-09-29 08:42:47 +0000 Commit: Matthew Smith <matthew@gentoo.org> CommitDate: 2022-09-29 08:42:47 +0000 net-misc/putty: fix USE=-gssapi build Closes: https://bugs.gentoo.org/873355 Signed-off-by: Matthew Smith <matthew@gentoo.org> net-misc/putty/files/putty-0.77-nogssapi.patch | 18 ++++++++++++++++++ .../{putty-0.77-r2.ebuild => putty-0.77-r3.ebuild} | 5 +++++ 2 files changed, 23 insertions(+)