Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 467798

Summary: sys-fs/cryptsetup-1.6.0[static] fails to build against dev-libs/libgcrypt-1.5.2[caps,static-libs]
Product: Gentoo Linux Reporter: Alexandre Rostovtsev (RETIRED) <tetromino>
Component: [OLD] LibraryAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED DUPLICATE    
Severity: normal CC: base-system, me
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=468158
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: cryptsetup-1.6.0[static] build log with dev-libs/libgcrypt-1.5.2[caps,static-libs]
cryptsetup-1.6.0[static] config log with libgcrypt-1.5.2[caps,static-libs]
emerge --info

Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-04-28 21:37:44 UTC
Created attachment 346826 [details]
cryptsetup-1.6.0[static] build log with dev-libs/libgcrypt-1.5.2[caps,static-libs]

# USE=static emerge -1 cryptsetup
[...]
checking for libgcrypt-config... /usr/bin/libgcrypt-config
checking for LIBGCRYPT - version >= 1.6.0... no
checking for x86_64-pc-linux-gnu-libgcrypt-config... /usr/bin/libgcrypt-config
checking for LIBGCRYPT - version >= 1.1.42... yes (1.5.2)
checking for gcry_check_version in -lgcrypt... no
configure: error: Cannot find static gcrypt library.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-fs/cryptsetup-1.6.0/work/cryptsetup-1.6.0/config.log
 * ERROR: sys-fs/cryptsetup-1.6.0 failed (configure phase):
 *   econf failed

Relevant part of config.log:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_from_text'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_set_proc'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_from_text'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_set_proc'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_from_text'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.2/../../../../lib64/libgcrypt.a(libgcrypt_la-secmem.o):function secmem_init: error: undefined reference to 'cap_set_proc'
collect2: error: ld returned 1 exit status


Rebuilding libgcrypt-1.5.2 with USE="-caps" allows cryptsetup[static] to build successfully.

I am guessing that the solution is to fix libgcrypt-config to add -lcap to its -libs output.
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-04-28 21:38:07 UTC
Created attachment 346828 [details]
cryptsetup-1.6.0[static] config log with libgcrypt-1.5.2[caps,static-libs]
Comment 2 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-04-28 21:39:22 UTC
Created attachment 346830 [details]
emerge --info
Comment 3 Martin Gysel (bearsh) 2013-05-01 20:07:49 UTC
sys-fs/cryptsetup[-static] also doesn't work if dev-libs/libgcrypt is built with [caps, -static-libs], but that's maybe worth another bug report...
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2013-05-01 20:14:58 UTC
(In reply to comment #3)
> sys-fs/cryptsetup[-static] also doesn't work if dev-libs/libgcrypt is built
> with [caps, -static-libs], but that's maybe worth another bug report...

That's bug #468158.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2013-05-04 21:28:08 UTC

*** This bug has been marked as a duplicate of bug 468158 ***