Created attachment 347238 [details] full build log libtool: link: i686-pc-linux-gnu-gcc -Wall -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -static -Wl,-O1 -o cryptsetup.static cryptsetup_static-utils_crypt.o cryptsetup_static-utils_loop.o cryptsetup_static-utils_fips.o cryptsetup_static-utils_tools.o cryptsetup_static-utils_password.o cryptsetup_static-cryptsetup.o -Wl,--as-needed ../lib/.libs/libcryptsetup.a -L/lib -lpopt /usr/lib/libgcrypt.a -lgpg-error -ldevmapper -lselinux -lsepol -lpcre -ludev -lrt -luuid /bin/sh ../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -Wall -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -Wl,-O1 -Wl,--as-needed -o veritysetup veritysetup-utils_crypt.o veritysetup-utils_loop.o veritysetup-utils_tools.o veritysetup-veritysetup.o ../lib/libcryptsetup.la -lpopt libtool: link: i686-pc-linux-gnu-gcc -Wall -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -Wl,-O1 -o .libs/veritysetup veritysetup-utils_crypt.o veritysetup-utils_loop.o veritysetup-utils_tools.o veritysetup-veritysetup.o -Wl,--as-needed ../lib/.libs/libcryptsetup.so -lpopt /bin/sh ../libtool --tag=CC --mode=link i686-pc-linux-gnu-gcc -Wall -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -all-static -Wl,-O1 -Wl,--as-needed -o veritysetup.static veritysetup_static-utils_crypt.o veritysetup_static-utils_loop.o veritysetup_static-utils_tools.o veritysetup_static-veritysetup.o ../lib/libcryptsetup.la -lpopt -lgcrypt -lgpg-error -lgpg-error -L/lib -ldevmapper -lselinux -lsepol -lpcre -ludev -lrt -luuid /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x610): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `gid_to_name': (.text.gid_to_name+0x4c): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_group_creds': (.text.get_group_creds+0xf4): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x334): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_user_creds': (.text.get_user_creds+0x184): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_user_creds': (.text.get_user_creds+0xf6): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x51e): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `lookup_uid': (.text.lookup_uid+0x94): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(procattr.o): In function `init_procattr': (.text+0x2bb): undefined reference to `pthread_atfork' collect2: error: ld returned 1 exit status make[2]: *** [cryptsetup.static] Error 1 make[2]: *** Waiting for unfinished jobs.... libtool: link: i686-pc-linux-gnu-gcc -Wall -O2 -march=core2 -mfpmath=sse -mmmx -msse -msse2 -mssse3 -pipe -static -Wl,-O1 -o veritysetup.static veritysetup_static-utils_crypt.o veritysetup_static-utils_loop.o veritysetup_static-utils_tools.o veritysetup_static-veritysetup.o -Wl,--as-needed ../lib/.libs/libcryptsetup.a -L/lib -lpopt /usr/lib/libgcrypt.a -lgpg-error -ldevmapper -lselinux -lsepol -lpcre -ludev -lrt -luuid /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x610): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `gid_to_name': (.text.gid_to_name+0x4c): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_group_creds': (.text.get_group_creds+0xf4): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x334): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_user_creds': (.text.get_user_creds+0x184): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `get_user_creds': (.text.get_user_creds+0xf6): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x51e): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libudev.a(util.o): In function `lookup_uid': (.text.lookup_uid+0x94): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../lib/libselinux.a(procattr.o): In function `init_procattr': (.text+0x2bb): undefined reference to `pthread_atfork' collect2: error: ld returned 1 exit status make[2]: *** [veritysetup.static] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-fs/cryptsetup-1.6.0/work/cryptsetup-1.6.0/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/sys-fs/cryptsetup-1.6.0/work/cryptsetup-1.6.0' make: *** [all] Error 2 [31;01m*[0m ERROR: sys-fs/cryptsetup-1.6.0 failed (compile phase): [31;01m*[0m emake failed [31;01m*[0m [31;01m*[0m If you need support, post the output of `emerge --info '=sys-fs/cryptsetup-1.6.0'`, [31;01m*[0m the complete build log and the output of `emerge -pqv '=sys-fs/cryptsetup-1.6.0'`. [31;01m*[0m The complete build log is located at '/var/tmp/portage/sys-fs/cryptsetup-1.6.0/temp/build.log'. [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/sys-fs/cryptsetup-1.6.0/temp/environment'. [31;01m*[0m Working directory: '/var/tmp/portage/sys-fs/cryptsetup-1.6.0/work/cryptsetup-1.6.0' [31;01m*[0m S: '/var/tmp/portage/sys-fs/cryptsetup-1.6.0/work/cryptsetup-1.6.0'
Created attachment 347240 [details] emerge --info output
What happens if you rebuild sys-libs/libselinux first?
(In reply to comment #2) > What happens if you rebuild sys-libs/libselinux first? Already rebuilt (even few times) libselinux, sepol, and all other dependencies - bug is still here.
the configure script doesn't use pkg-config to probe the selinux deps
Same problem here, with sys-fs/cryptsetup-1.4.3.
And version 1.6.1. No workaround found at this time.
cryptsetup doesn't actually link against selinux directly; instead, USE="static" brings in ldflags directly from pkg-config --static --libs devmapper , that is, from lvm2[selinux static-libs]. Bugs against lvm2[selinux static-libs] have just been closed, and cryptsetup-1.6.1 (at least) forces lvm2[static-libs], so this *should* now just work. Please test and reopen if it fails. Please also see bug 438998. I'm not marking this as a dupe, just in case the missing -lpthread from lvm2 has a different cause.