View previous topic :: View next topic |
Author |
Message |
sdauth Guru
Joined: 19 Sep 2018 Posts: 569 Location: Ásgarðr
|
Posted: Wed Sep 08, 2021 6:25 am Post subject: block with lvm2 & cryptsetup (static? (!udev) ) |
|
|
Hello, an update this morning asks me to disable udev for lvm2 & cryptsetup since I have static enabled for both, lvm2 (static static-libs) cryptsetup (static); why this change ? How to solve that ?
Code: | !!! The ebuild selected to satisfy "sys-fs/lvm2" has unmet requirements.
- sys-fs/lvm2-2.02.188-r2::gentoo USE="readline static static-libs thin udev -device-mapper-only -lvm2create_initrd -sanlock (-selinux) -systemd"
The following REQUIRED_USE flag constraints are unsatisfied:
static? ( !udev ) static-libs? ( !udev )
The above constraints are a subset of the following complete expression:
device-mapper-only? ( !lvm2create_initrd !sanlock !thin ) static? ( !systemd !udev ) static-libs? ( !udev ) systemd? ( udev )
!!! The ebuild selected to satisfy ">=sys-fs/cryptsetup-1.6.7:0/12=" has unmet requirements.
- sys-fs/cryptsetup-2.3.6-r2::gentoo USE="argon2 nls openssl pwquality reencrypt static udev urandom -gcrypt -kernel -nettle -static-libs"
The following REQUIRED_USE flag constraints are unsatisfied:
static? ( !udev )
The above constraints are a subset of the following complete expression:
exactly-one-of ( gcrypt kernel nettle openssl ) static? ( !gcrypt !udev ) |
log says "drop udev static libs" without much info.
https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-fs/cryptsetup?id=b128813dd6945ed3fdf3e2016d724128dfb8cad7
https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-fs/lvm2?id=b5b6979703ec61977aa6a597f2ca5cb330e8c30b
https://gitweb.gentoo.org/repo/gentoo.git/commit/virtual/libudev?id=529733744b4dab5a5a30c30e47c306c319c71547 |
|
Back to top |
|
|
sdauth Guru
Joined: 19 Sep 2018 Posts: 569 Location: Ásgarðr
|
Posted: Wed Sep 08, 2021 9:00 am Post subject: |
|
|
By the way, I only need static for my initramfs.
So right now I have two option, either :
permanently remove static, static-libs for lvm2 / cryptsetup and copy needed libs to the initramfs
-> it adds 1.3M to the initramfs
Except the initramfs is slightly bigger, this works fine.
or
rebuild temporarily lvm2 & cryptsetup (without udev) before generating the initramfs
Code: | USE="static static-libs -udev" emerge -1q sys-fs/lvm2
USE="static -udev" emerge -1q sys-fs/cryptsetup
init_gen.sh |
then emerge again (without static), binpkg is handy of course.
Code: | emerge -1q sys-fs/cryptsetup sys-fs/lvm2 |
Works fine as well.
Still, it would be nice to know the reason for this change.
Last edited by sdauth on Wed Sep 08, 2021 9:30 am; edited 1 time in total |
|
Back to top |
|
|
Ionen Developer
Joined: 06 Dec 2018 Posts: 2720
|
Posted: Wed Sep 08, 2021 9:06 am Post subject: |
|
|
I didn't really follow the situation but it sparked from this:
https://github.com/systemd/systemd/issues/20600
Gentoo already barely support static linking, and if upstream doesn't care (closing bug reports and leaving it broken for us to fix) then it seems reasonable to drop. |
|
Back to top |
|
|
sdauth Guru
Joined: 19 Sep 2018 Posts: 569 Location: Ásgarðr
|
Posted: Wed Sep 08, 2021 9:28 am Post subject: |
|
|
Thanks for the link Ionen.
Well.. I will choose the no static lib option. I can afford the bigger initramfs on my desktop. Other option would be to use slashbeast's better-initramfs ( https://github.com/slashbeast/better-initramfs ) to avoid headaches. |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1435 Location: Berlin, Germany
|
Posted: Thu Sep 16, 2021 5:37 pm Post subject: |
|
|
somebody please explain to me like I'm stupid why this issue affects a system like mine that doesn't have systemd on it at all. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21642
|
Posted: Thu Sep 16, 2021 10:15 pm Post subject: |
|
|
First, the presence of systemd in the cited URL is an unfortunate red herring caused by the systemd project assuming control of the udevd project. The question is not whether your system uses systemd. The question is whether your system uses udevd. Second, the problem is that the systemd-udevd code uses a poorly chosen (excessively generic) name for a symbol, then relies on linker tricks to avoid collisions, instead of marking the symbol as static.[1] Additionally, due to the linker tricks that upstream does use, this problem only impacts people who use static libraries. Various upstreams provide different levels of support for static libraries, but I think it's fair to say that, for most projects, such support tends to be a low priority. The systemd project is a bit surprising in their refusal to apply a simple and targeted fix for a known problem, but it's not uncommon to find projects that have static linking related problems.
[1]: static would only work if the symbol was only used in one translation unit. If it needs to be used across multiple translation units in the udevd project, it cannot be static - but it could be given a better name. |
|
Back to top |
|
|
ExecutorElassus Veteran
Joined: 11 Mar 2004 Posts: 1435 Location: Berlin, Germany
|
Posted: Fri Sep 17, 2021 3:48 am Post subject: |
|
|
sounds an awful lot like systemd is pursuing MS's old embrace-extend-extinguish tactics. So I guess I'll be trying to figure out how to use better-initramfs to get my initramfs set up.
(my use-case is that I have / and /usr on LVMs, and thus need to pre-mount them prior to mounting real root)
Cheers,
EE |
|
Back to top |
|
|
|