Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274089 - net-libs/gnutls builds with undefined references
Summary: net-libs/gnutls builds with undefined references
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-14 04:50 UTC by Slowking Man
Modified: 2009-06-26 08:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info --verbose output (emerge-info,12.86 KB, text/plain)
2009-06-14 04:54 UTC, Slowking Man
Details
Build log for gnutls-2.8.1 (build.log,428.16 KB, text/plain)
2009-06-14 04:55 UTC, Slowking Man
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slowking Man 2009-06-14 04:50:42 UTC
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.
Comment 1 Slowking Man 2009-06-14 04:54:20 UTC
Created attachment 194613 [details]
emerge --info --verbose output
Comment 2 Slowking Man 2009-06-14 04:55:45 UTC
Created attachment 194615 [details]
Build log for gnutls-2.8.1
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-20 17:32:41 UTC
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
Comment 4 Slowking Man 2009-06-26 08:31:37 UTC
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.