Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Static-libs for genkernel-next and systemd incompatibility
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
bman66
n00b
n00b


Joined: 02 Jun 2015
Posts: 8

PostPosted: Sat Jun 06, 2015 6:28 am    Post subject: Static-libs for genkernel-next and systemd incompatibility Reply with quote

So I'm setting up a system, which involves systemd, lvm and luks. While setting up initramfs with genkernel-next, I compiled lvm2 and cryptsetup with static-libs (which is required for static, which I've read is a requirement). Now I would like to install systemd, so I set it up based on the systemd target. udev and systemd were blocking each other, so I uninstalled udev. Now, when i run `emerge -avDN @world`, libudev complains that it's not compatible with static-libs and systemd. So, now I'll try to disable static-libs in libudev: `echo "virtual/libudev -static-libs" > /dev/portage/packages.use/libudev`. Re-ran `emerge -avDN @world`. Same error. Apparently the flag is very persistent (at least I haven't found this described in the manpages so far). So, how should I approach satisfying systemd or getting rid of this persistent flag?

Also, if I end up removing the "static-libs" flag from some of the packages that required it for a working genkernel initramfs to install systemd, wouldn't that mean that systemd is incompatible of regenerating an genkernal-next initramfs with lvm/luks (or does genkernal-next have a dependency solver, and the static requirement is incorrect)?

Code:

$ emerge -avDN @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

sys-apps/util-linux:0

  (sys-apps/util-linux-2.25.2-r2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=sys-apps/util-linux-2.25:0/0= required by (sys-apps/systemd-218-r3:0/2::gentoo, installed)
    ^^                    ^^^^^^^^^                                                                                                                                       
    (and 1 more with the same problem)

  (sys-apps/util-linux-2.24.1-r3:0/0::gentoo, ebuild scheduled for merge) pulled in by
    <sys-apps/util-linux-2.25[static-libs] required by (sys-fs/lvm2-2.02.109:0/0::gentoo, ebuild scheduled for merge)
    ^                    ^^^^                                                                                                                                               


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.


!!! The ebuild selected to satisfy "virtual/libudev" has unmet requirements.
- virtual/libudev-215-r1::gentoo USE="static-libs systemd" ABI_X86="64 -32 -x32"

  The following REQUIRED_USE flag constraints are unsatisfied:
    systemd? ( !static-libs )

(dependency required by "sys-apps/util-linux-2.25.2-r2::gentoo[udev]" [ebuild])
(dependency required by "sys-apps/systemd-218-r3::gentoo" [installed])
(dependency required by "sys-auth/pambase-20150213::gentoo[systemd]" [ebuild])
(dependency required by "sys-libs/pam-1.1.8-r2::gentoo" [installed])
(dependency required by "sys-apps/util-linux-2.24.1-r3::gentoo[pam]" [ebuild])
(dependency required by "sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]" [ebuild])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])

$ emerge --info

Portage 2.2.18 (python 2.7.9-final-0, hardened/linux/amd64, gcc-4.8.4, glibc-2.20-r2, 4.0.4-301.fc22.x86_64 x86_64)
=================================================================
System uname: Linux-4.0.4-301.fc22.x86_64-x86_64-Intel-R-_Core-TM-_i7-4700MQ_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:     7891652 total,   3381408 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 06 Jun 2015 01:00:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r2::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.3.5-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 avx avx2 berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 justify mmx mmxext modules multilib ncurses nls nptl openmp pam pax_kernel pcre pie readline session sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssp systemd tcpd udev unicode urandom xattr xtpax zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7131
Location: almost Mile High in the USA

PostPosted: Sat Jun 06, 2015 8:40 am    Post subject: Reply with quote

Systemd definitely wants to control your /dev ...

You may have to make a custom initrd to do the setup you want unfortunately, perhaps build a chroot that you can build the luks/lvm tools in with static-dev and build the initramfs off of that.

It looks like you will have to do USE=-static on lvm2 to remove that requirement of util-linux before 2.25. Unfortunately I don't know what changed in 2.24 to 2.25 that broke USE=static, at least that's what's coded in the lvm2-2.02.109 ebuild/

However the lvm2-2.02.109-r1 ebuild does not seem to have the util-linux restriction. Try keywording that and see if it will build.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
bman66
n00b
n00b


Joined: 02 Jun 2015
Posts: 8

PostPosted: Sat Jun 06, 2015 4:10 pm    Post subject: Reply with quote

Thanks for replying!

I re installed lvm2 without static and static-libs. Nope, re building world still doesn't work. libudev is complaining that static-libs is set. I'm not sure where it's set though. I looked in /etc/portage/* and I didn't find anything related to it. Yet, it's somehow overriding /etc/portage/package.use/, and it's even overriding `USE="-static-libs" emerge -a libudev`. Powerful magic. I would have assumed that compiling packages statically was revertible, but it seems portage is a fighter.

> You may have to make a custom initrd to do the setup you want unfortunately, perhaps build a chroot that you can build the luks/lvm tools in with static-dev and build the initramfs off of that.

Honestly, I'd probably patch genkernel-next to have a "--resolve-dependencies" flag so that static isn't a requirement in the first place (thus strewing with peoples system packages wouldn't be a requirement).

EDIT: Ok, `grep -r "static-libs" /etc/portage` gave me a rather long list in places that I guess I just didn't look. I'll need to go through them later tonight and decide which one's to remove (I think all of the `iputils`).
Code:

./package.mask/systemd:# $Header: /var/cvsroot/gentoo-x86/profiles/targets/systemd/package.mask,v 1.7 2015/04/22 21:14:29 floppym Exp $
./package.mask/systemd:# This is for running sys-apps/systemd and also helps
./package.mask/systemd:# package is masked for bugs #526762 and #526802 on non-systemd systems.
./package.use/iputils:# required by virtual/libudev-215-r1::gentoo[-systemd]
./make.conf:USE="mmx sse sse2 sse3 sse4 sse4_1 sse4_2 avx avx2 systemd udev"
./package.use.force/systemd:# $Header: /var/cvsroot/gentoo-x86/profiles/targets/systemd/package.use.force,v 1.1 2015/04/22 21:14:29 floppym Exp $
./package.use.force/systemd:# Force systemd to avoid depgraph breakage, bug 547360.
./package.use.force/systemd:virtual/libgudev systemd
./package.use.force/systemd:virtual/libudev systemd
./package.use.force/systemd:virtual/udev systemd
./package.use.mask/systemd:# $Header: /var/cvsroot/gentoo-x86/profiles/targets/systemd/package.use.mask,v 1.5 2014/07/25 20:05:24 ssuominen Exp $
./package.use.mask/systemd:# upower support is not needed on setups running systemd, also
./package.use.mask/systemd:# 'static-libs' support on sys-apps/systemd is not provided
./use.mask:# People running systemd must use logind instead, bug #478258
root@localhost $ grep -r "static-libs" .
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=sys-apps/util-linux-2.25.2-r2 static-libs
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=dev-libs/popt-1.16-r2 static-libs
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=sys-fs/lvm2-2.02.109 static-libs
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=dev-libs/libgpg-error-1.13 static-libs
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=sys-fs/udev-216 static-libs
./package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
./package.use/iputils:>=virtual/libudev-215-r1 static-libs
./package.use.mask/systemd:# 'static-libs' support on sys-apps/systemd is not provided
./package.use.mask/systemd:virtual/libgudev static-libs
./package.use.mask/systemd:virtual/libudev static-libs
./package.use.mask/systemd:sys-fs/cryptsetup static static-libs
./package.use.mask/systemd:sys-fs/lvm2 static static-libs
root@localhost $ grep -r "static-libs" /etc/portage
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=sys-apps/util-linux-2.25.2-r2 static-libs
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=dev-libs/popt-1.16-r2 static-libs
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=sys-fs/lvm2-2.02.109 static-libs
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=dev-libs/libgpg-error-1.13 static-libs
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=sys-fs/udev-216 static-libs
/etc/portage/package.use/iputils:# required by sys-fs/cryptsetup-1.6.5::gentoo[static-libs,static]
/etc/portage/package.use/iputils:>=virtual/libudev-215-r1 static-libs
/etc/portage/package.use.mask/systemd:# 'static-libs' support on sys-apps/systemd is not provided
/etc/portage/package.use.mask/systemd:virtual/libgudev static-libs
/etc/portage/package.use.mask/systemd:virtual/libudev static-libs
/etc/portage/package.use.mask/systemd:sys-fs/cryptsetup static static-libs
/etc/portage/package.use.mask/systemd:sys-fs/lvm2 static static-libs
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sat Jun 06, 2015 4:59 pm    Post subject: Reply with quote

For your information:
Code:
[ebuild   R    ] virtual/udev-217::gentoo  USE="-systemd" 0 KiB


(of course you may not notice why i show you that, well, you should, it mean that virtual is not using static-libs, so if you goes with a systemd that use that virtual, your pain may end)
Back to top
View user's profile Send private message
bman66
n00b
n00b


Joined: 02 Jun 2015
Posts: 8

PostPosted: Sun Jun 07, 2015 12:11 am    Post subject: Reply with quote

I uninstalled sys-fs/udev (I can't remember if it was static) so I'm not sure if virtual/udev is causing me problems, which brings up another interesting question. Will genkernel-next try to use sys-fs/udev, or will it try to use systemd? If it tries to use sys-fs/udev, then the only way might be to use a chroot to regenerate the initramfs. If it's aware of systemd like what seems to be implied by the wiki (actually, I'm not sure how credible it is, gevin that it seems to also be implying that static flag's arn't necessary), then the only problem is that genkernel doesn't resolve dependencies.

EDIT: Never mind, I believe systemd actually provides a real udev.

Genkernel does a lot of things that I don't want to be stuck doing manually (like detecting whether or not the system was resumed, which I have no idea of how it does), so I feel like the easier solution is to contribute to genkernel-next for better systemd support rather then writing my own initramfs.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7131
Location: almost Mile High in the USA

PostPosted: Sun Jun 07, 2015 1:24 am    Post subject: Reply with quote

Yes, systemd provides udev. However genkernel I believe uses mdev in busybox to build the initramfs but all utilities must be able to run without systemd or libc depending on what gets installed onto the initramfs.

Honestly if both busybox and lvm get installed to the initramfs, there's no need for static linking, might well use dynamic libc.

(I should look at how genkernel works, as I've never used it before. I just have my own homegrown initramfs that I move along... and need to make sure that it's compiled for i486 and not avx so I can use it on all my machines...)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum