All versions of sys-fs/cryptsetup with static use flag enabled fail to compile due to undefined reference to `mq_getattr': […] /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../lib64/libudev.a(src_libsystemd_sd-daemon_sd-daemon.c.o): in function `sd_is_mq': (.text.sd_is_mq+0x3a): undefined reference to `mq_getattr' /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/../../../../lib64/libudev.a(src_libsystemd_sd-daemon_sd-daemon.c.o): in function `sd_is_mq': (.text.sd_is_mq+0x3a): undefined reference to `mq_getattr' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:1585: veritysetup.static] Error 1 […] This bug is similar to bug #762017 which affects sys-fs/lvm2. This bug is not a duplicate of bug #786816. Reproducible: Always
Please post emerge --info and the complete build log
You probably just need to rebuild sys-apps/systemd.
Looks like we need to link against librt to handle static linkage of libudev.
*** This bug has been marked as a duplicate of bug 762017 ***
Rebuilding systemd does not fix it.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afc5cea9987daa5c97eb3dd96efae40663153ecf commit afc5cea9987daa5c97eb3dd96efae40663153ecf Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-07-11 14:37:12 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-07-11 14:37:12 +0000 sys-apps/systemd: add static link info to libudev.pc Bug: https://bugs.gentoo.org/801070 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/systemd/files/249-libudev-static.patch | 26 ++++++++++++++++++++++ ...systemd-249-r1.ebuild => systemd-249-r2.ebuild} | 0 2 files changed, 26 insertions(+)
(In reply to Larry the Git Cow from comment #6) > sys-apps/systemd/files/249-libudev-static.patch | 26 > ++++++++++++++++++++++ > ...systemd-249-r1.ebuild => systemd-249-r2.ebuild} | 0 > 2 files changed, 26 insertions(+) Unfortunately, the build right now does not yet apply the patch.
Now sys-fs/cryptsetup-2.3.6 builds fine against sys-apps/systemd-249-r3.
(In reply to Stefan Huber from comment #7) > (In reply to Larry the Git Cow from comment #6) > > > sys-apps/systemd/files/249-libudev-static.patch | 26 > > ++++++++++++++++++++++ > > ...systemd-249-r1.ebuild => systemd-249-r2.ebuild} | 0 > > 2 files changed, 26 insertions(+) > > Unfortunately, the build right now does not yet apply the patch. If you are using gentoo-mirror or rsync you have to wait for new ebuilds to propagate through all the network
(In reply to Marco Scardovi (scardracs) from comment #9) > If you are using gentoo-mirror or rsync you have to wait for new ebuilds to > propagate through all the network I do not think that this explains the "0" in the lines added or removed for systemd-249-r2.ebuild in git, right. The -r3 ebuild fixes it, by the way.