When emerging net-misc/curl on a system with cyrus-sasl installed and USE="ldap" enabled, the resulting /usr/lib64/libcurl.so.4.2.0 will link to libsasl2.so.2. This library is provided by cyrus-sasl on my system, but curl does not depend on that package. Reproducible: Always Steps to Reproduce: 1. set USE="ldap" 2. install cyrus-sasl 3. emerge curl 4. remove cyrus-sasl Actual Results: # ldd /usr/lib64/libcurl.so.4.2.0 linux-vdso.so.1 (0x000002c892b07000) libidn.so.11 => /usr/lib64/libidn.so.11 (0x000002c892665000) libldap-2.4.so.2 => /usr/lib64/libldap-2.4.so.2 (0x000002c892417000) liblber-2.4.so.2 => /usr/lib64/liblber-2.4.so.2 (0x000002c892205000) libsasl2.so.2 => not found libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000002c891fce000) librt.so.1 => /lib64/librt.so.1 (0x000002c891dc4000) libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x000002c891b81000) libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x000002c8918a1000) libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x000002c891674000) libcom_err.so.2 => /lib64/libcom_err.so.2 (0x000002c891470000) libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x000002c89126c000) libresolv.so.2 => /lib64/libresolv.so.2 (0x000002c891054000) libdl.so.2 => /lib64/libdl.so.2 (0x000002c890e50000) libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x000002c890be6000) libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x000002c8907ff000) libz.so.1 => /lib64/libz.so.1 (0x000002c8905e8000) libpthread.so.0 => /lib64/libpthread.so.0 (0x000002c8903cb000) libc.so.6 => /lib64/libc.so.6 (0x000002c89001f000) /lib64/ld-linux-x86-64.so.2 (0x000002c892b09000) libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x000002c88fe15000) Expected Results: the same, minus libsasl2.so.2 my full use-flags on curl are: USE="idn ipv6 kerberos ssl threads -ares -ldap* -ssh -static-libs {-test}" CURL_SSL="openssl -axtls -cyassl -gnutls -nss -polarssl" (with ldap turned off now) actual setup deploys binpackage of curl to machine where cyrus-sasl is not present, revdep-rebuild uncovered this.
What does scanelf -n /usr/lib64/libcurl.so.4.2.0 show?