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.
Created attachment 346828 [details] cryptsetup-1.6.0[static] config log with libgcrypt-1.5.2[caps,static-libs]
Created attachment 346830 [details] emerge --info
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...
(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.
*** This bug has been marked as a duplicate of bug 468158 ***