On my system, gnutls builds with undefined references in libgnutls. The emerge succeeds, but builds of packages linking against libgnutls fail with: /usr/lib/libgnutls.so.26: undefined reference to `gcry_cipher_setkey@GCRYPT_1.2' /usr/lib/libgnutls.so.26: undefined reference to `gcry_cipher_setiv@GCRYPT_1.2' This occured on my system with app-misc/tracker (which links against a library that links against libgnutls) and www-browser/lynx with the gnutls USE flag set. The listed symbols exist in dev-libs/gcrypt, as shown with ld: $ ld -y gcry_cipher_setkey@GCRYPT_1.2 -y gcry_cipher_setiv@GCRYPT_1.2 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: reference to gcry_cipher_setkey@GCRYPT_1.2 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: reference to gcry_cipher_setiv@GCRYPT_1.2 ld: warning: cannot find entry symbol _start; not setting start address /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: undefined reference to `gcry_cipher_setkey@GCRYPT_1.2' /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: undefined reference to `gcry_cipher_setiv@GCRYPT_1.2' $ ld -y gcry_cipher_setkey@GCRYPT_1.2 -y gcry_cipher_setiv@GCRYPT_1.2 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26 /usr/lib/libgcrypt.so.11 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: reference to gcry_cipher_setkey@GCRYPT_1.2 /var/tmp/portage/net-libs/gnutls-2.8.1/image/usr/lib64/libgnutls.so.26: reference to gcry_cipher_setiv@GCRYPT_1.2 /usr/lib/libgcrypt.so.11: definition of gcry_cipher_setkey@GCRYPT_1.2 /usr/lib/libgcrypt.so.11: definition of gcry_cipher_setiv@GCRYPT_1.2 ld: warning: cannot find entry symbol _start; not setting start address It looks like libgcrypt is not getting correctly passed as a target during linking when gnutls gets built, or something like that. I'm not really an expert on the linker. I confirmed that this occurs with all versions of gnutls currently in the tree: 2.6.6, 2.8.1, and 2.9.1.
Created attachment 194613 [details] emerge --info --verbose output
Created attachment 194615 [details] Build log for gnutls-2.8.1
I can't reproduce it. $ ld -y gcry_cipher_setkey@GCRYPT_1.2 -y gcry_cipher_setiv@GCRYPT_1.2 /usr/lib64/libgnutls.so.26 /usr/lib64/libgnutls.so.26: reference to gcry_cipher_setkey@GCRYPT_1.2 /usr/lib64/libgnutls.so.26: reference to gcry_cipher_setiv@GCRYPT_1.2 /usr/lib/libgcrypt.so.11: definition of gcry_cipher_setkey@GCRYPT_1.2 /usr/lib/libgcrypt.so.11: definition of gcry_cipher_setiv@GCRYPT_1.2 ld: warning: cannot find entry symbol _start; not setting start address $ scanelf -nq /usr/lib64/libgnutls.so.26 libtasn1.so.3,libz.so.1,libgcrypt.so.11,libc.so.6 /usr/lib64/libgnutls.so.26
Oookay, I'm a moron, sorry for bothering you with this. After digging through the gnutls mailing list, I found someone reported having the same problem when having two versions of libgcrypt installed for development purposes. So then the lightbulb clicks on in my head and I remember that ages ago I screwed around with some things and manually installed a copy of libgcrypt in /lib. So what the linker was doing was scanning the old libgcrypt in /lib for symbols, not finding the ones that current gnutls wants, and marking them as undefined. That'll teach me to keep better track of things when I play around.