If i emerge dropbear with "pam" and "static" useflags, it fails with "cannot find -lpam". If i only use one of these flags, everything works great. I tested different versions of dropbear. I think this might be a problem with sys-libs/pam. Reproducible: Always Steps to Reproduce: 1. echo "net-misc/dropbear static pam">>/etc/portage/package.use 2. emerge net-misc/dropbear Actual Results: x86_64-pc-linux-gnu-gcc -Wl,-O1 -static -o dbclient dbutil.o buffer.o dss.o bignum.o signkey.o rsa.o random.o queue.o atomicio.o compat.o fake-rfc2553.o common-session.o packet.o common-algo.o common-kex.o common-channel.o common-chansession.o termcodes.o loginrec.o tcp-accept.o listener.o process-packet.o common-runopts.o circbuffer.o cli-algo.o cli-main.o cli-auth.o cli-authpasswd.o cli-kex.o cli-session.o cli-service.o cli-runopts.o cli-chansession.o cli-authpubkey.o cli-tcpfwd.o cli-channel.o cli-authinteract.o libtomcrypt/libtomcrypt.a libtommath/libtommath.a -lutil -lpam -lcrypt /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpam collect2: ld gab 1 als Ende-Status zurück /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpam collect2: ld gab 1 als Ende-Status zurück
Created attachment 164299 [details] build.log
Created attachment 164300 [details] sytem information
I don't see how you can compile pam statically, PAM = Pluggable Authentication Modules -> authentication via dynamically loaded modules... Probably dropbear should have a check that both flags are not enabled at the same time, and bail out if they are.
Wormo is right ... USE="static pam" is a garbage setting dropbear-0.52 will outright reject such settings