When installing a new system configured to use a binhost and updating all packages, util-linux was emerged before cryptsetup (USE=cryptsetup was set globally), which installed libmount.so which linked against libcryptsetup.so (which didn't exist), causing 'mount' commands to fail, causing emerge to fail to install any subsequent packages, as it failed in the 'pre-merge checks' phase where it tried running 'mount'. I don't have the terminal output of this as it's lost in scrollback, just the error: "mount: error while loading shared libraries: libcryptsetup.so.12: cannot open shared object file: No such file or directory" The workaround was to remove USE=cryptsetup from util-linux on the binhost (I don't need it it, mount only uses it for dm-verity) and remerge it, copy /usr/lib64/libmount.so.1.1.0 from the binhost to the broken system to temporarily fix 'mount', also remove USE=cryptsetup from util-linux here, then one-shot emerge util-linux again. I think the issue is that the util-linux ebuild does not have a slot dependency on cryptsetup. Neither util-linux nor cryptsetup are in @world, the latter was pulled in due to a global USE=cryptsetup. After setting a package.use "sys-apps/util-linux -cryptsetup", cryptsetup is not getting pulled in any more, indicating that it was only pulled in as a dependency of util-linux. Reproducible: Always Steps to Reproduce: 1. unpack stage3 tarball 2. copy over /etc/portage and /var/lib/portage/world from old system where a global USE=cryptsetup is set in make.conf, also PORTAGE_BINHOST is pointing to my own binhost 3. emerge -auDN --keep-going --with-bdeps=y --rebuilt-binaries --getbinpkg --binpkg-changed-deps=n @world Actual Results: util-linux is merged before cryptsetup, causing every subsequent pre-merge check to fail with "mount: error while loading shared libraries: libcryptsetup.so.12: cannot open shared object file: No such file or directory" Expected Results: cryptsetup should be merged before util-linux # equery l util-linux [IP-] [ ] sys-apps/util-linux-2.39.4-r1:0 # emerge --info: livecd / # emerge --info !!! Repository 'guru' is missing masters attribute in '/var/db/repos/guru/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility !!! Repository 'jjakob' is missing masters attribute in '/var/db/repos/jjakob/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility WARNING: One or more repositories have missing repo_name entries: /var/db/repos/guru/profiles/repo_name /var/db/repos/jjakob/profiles/repo_name NOTE: Each repo_name entry should be a plain text file containing a unique name for the repository on the first line. fatal: not a git repository (or any of the parent directories): .git fatal: not a git repository (or any of the parent directories): .git Portage 3.0.66.1 (python 3.12.7-final-0, default/linux/amd64/23.0/hardened, gcc-13, glibc-2.39-r6, 6.6.51-gentoo-dist-hardened x86_ 64) ================================================================= System uname: Linux-6.6.51-gentoo-dist-hardened-x86_64-Intel-R-_Core-TM-2_CPU_T5500_@_1.66GHz-with-glibc2.39 KiB Mem: 2004712 total, 480936 free KiB Swap: 8388604 total, 8345852 free Timestamp of repository gentoo: Thu, 31 Oct 2024 21:30:00 +0000 Head commit of repository gentoo: 78209db37a5b1d0c5a5b75430055962dbaf0d6e6 sh bash 5.2_p37 ld GNU ld (Gentoo 2.42 p6) 2.42.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p37::gentoo dev-build/autoconf: 2.71-r7::gentoo, 2.72-r1::gentoo dev-build/automake: 1.16.5-r2::gentoo dev-build/cmake: 3.30.5::gentoo dev-build/libtool: 2.4.7-r4::gentoo dev-build/make: 4.4.1-r1::gentoo dev-build/meson: 1.5.2::gentoo dev-lang/perl: 5.40.0::gentoo dev-lang/python: 3.12.7_p1::gentoo, 3.13.0::gentoo sys-apps/baselayout: 2.15::gentoo sys-apps/openrc: 0.54.2::gentoo sys-apps/sandbox: 2.39::gentoo sys-devel/binutils: 2.42-r2::gentoo sys-devel/binutils-config: 5.5.2::gentoo sys-devel/gcc: 13.3.1_p20240614::gentoo sys-devel/gcc-config: 2.11::gentoo sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.39-r6::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: sync-rsync-verify-jobs: 1 guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: True jjakob location: /var/db/repos/jjakob sync-type: git sync-uri: https://github.com/jjakob/gentoo-overlay.git masters: gentoo volatile: True sync-git-verify-commit-signature: true ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=core2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbo x.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=core2" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS=" --ask-enter-invalid --getbinpkg --binpkg-changed-deps=n" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE P ERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME" FCFLAGS="-O2 -pipe -march=core2" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modifie d distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandb ox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge- logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=core2" GENTOO_MIRRORS="http://mirror.dkm.cz/gentoo/ http://tux.rainside.sk/gentoo/ http://gentoo.mirror.web4u.cz/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs" LEX="flex" PKGDIR="/var/cache/binpkgs" PORTAGE_BINHOST="sftp://binpkguser@10.10.0.62/" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --st ats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="a52 aac acl acpi alsa amd64 amr amrenc bluetooth bluray branding brotli bs2b bzip2 caps cdda cdio cdr cet codec2 crypt cryptse tup cups dane dbus dist-kernel dts dvd dvdr elogind encode exif ffmpeg flac gdbm gif gpg gpm gsm gstreamer hardened iconv icu iprou te2 ipv6 jpeg jpeg2k kf6compat lcms libnotify libtirpc libxml lvm lz4 lzma lzo mad mjpeg mng modules-compress mp3 mp4 mpeg multilib ncurses nls ogg openmp openssl opus pam pcre pdf pic pie pkcs11 png ppds readline sdl seccomp sound speex spell spice ssh ssl ssp startup-notification syslog test-rust theora tiff udev unicode upower usb usbredir v4l verify-sig vorbis x264 xattr xcrypt xml xtpa x xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth _basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav _fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS= "df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ash tech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf s kytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L1 0N="en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IM PLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="pyt hon3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuz zy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F7 7FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTA GE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZ E, STRINGS, STRIP, YACC, YFLAGS
> I think the issue is that the util-linux ebuild does not have a slot dependency on cryptsetup. What led you to that conclusion?
Unfortunately there is a direct circular dependency between util-linux[cryptsetup] and cryptsetup.
I did try to explain this on IRC but my remarks don't seem to have been reflected in OP's report. Really ideally need a recipe to reproduce this from a specific stage3 filename and full set of commands. := won't make a difference here (other than possibly changing how Portage breaks the circular dep, but it's not supposed to be necessary). But yes, as Zac said, there's an actual cricular dep there too.
(In reply to Sam James from comment #3) > I did try to explain this on IRC but my remarks don't seem to have been > reflected in OP's report. > > Really ideally need a recipe to reproduce this from a specific stage3 > filename and full set of commands. > > := won't make a difference here (other than possibly changing how Portage > breaks the circular dep, but it's not supposed to be necessary). > > But yes, as Zac said, there's an actual cricular dep there too. I'll be doing another fresh installation shortly, so I'll try to first replicate it with a minimal setup.