Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 854960 - Emerge crashes after checking dependencies and/or after fetching phase when emerging any package
Summary: Emerge crashes after checking dependencies and/or after fetching phase when e...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-28 23:38 UTC by Jed
Modified: 2022-06-30 22:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Emerge --info (emerge--info.txt,6.91 KB, text/plain)
2022-06-28 23:38 UTC, Jed
Details
Emerging firefox (emerge-firefox.txt,3.06 KB, text/plain)
2022-06-28 23:51 UTC, Jed
Details
make.conf (make.conf,1.98 KB, text/plain)
2022-06-28 23:52 UTC, Jed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jed 2022-06-28 23:38:30 UTC
Created attachment 788546 [details]
Emerge --info

Trying to emerge any package will end in a crash.

Emerge suceeds in fetching the files.

This magically started happening when I first tried upgrading PulseAudio which has now pulseaudio-daemon as dependency, it failed to compile with clang so I switched the compiler used by pulseaudio-daemon to gcc instead of clang (just like pulseaudio, both don't compile with clang). Pulseaudio seems not responding and dead on my system now though.

I thought there might be an issue with my installation of portage, as trying to emerge --oneshot portage produces the same output as seen below I git cloned portage and tried using it from inside the repository. The same problem persists, all it did was reset/update my news ("71 new News items").

Portage cannot emerge any package, but the following works wit no error, --sync, --metadata and adding the --fetch-only flag does not produce the same output (obvioulsy no packages gets installed but just proves emerge fails after the fetching phase).

I have multiple Gentoo systems but it seems only this one has this bug reproductible.

Issue persists through reboots and removing metadata cache.

Installing binaries works though.



>>> Emerging firefox as an example:
-----------------------------------------------------------------------------

Calculating dependencies  .... done!

>>> Verifying ebuild manifests

>>> Running pre-merge checks for www-client/firefox-91.10.0
Exception in callback AsynchronousTask._exit_listener_cb(<bound method...7f54de959f70>>)
handle: <Handle AsynchronousTask._exit_listener_cb(<bound method...7f54de959f70>>)>
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 886, in __call__
    return self._results[flags]
KeyError: 1812070400

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib/python3.9/site-packages/_emerge/AsynchronousTask.py", line 210, in _exit_listener_cb
    listener(self)
  File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 187, in _async_start_exit
    self._start_lock()
  File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 210, in _start_lock
    self._start_ebuild()
  File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 267, in _start_ebuild
    self._start_task(ebuild_process, self._ebuild_exit)
  File "/usr/lib/python3.9/site-packages/_emerge/CompositeTask.py", line 112, in _start_task
    task.start()
  File "/usr/lib/python3.9/site-packages/_emerge/AsynchronousTask.py", line 34, in start
    self._start()
  File "/usr/lib/python3.9/site-packages/_emerge/AbstractEbuildProcess.py", line 212, in _start
    self._start_post_builddir_lock(start_ipc_daemon=start_ipc_daemon)
  File "/usr/lib/python3.9/site-packages/_emerge/AbstractEbuildProcess.py", line 245, in _start_post_builddir_lock
    SpawnProcess._start(self)
  File "/usr/lib/python3.9/site-packages/_emerge/SpawnProcess.py", line 131, in _start
    retval = self._spawn(self.args, **kwargs)
  File "/usr/lib/python3.9/site-packages/_emerge/EbuildProcess.py", line 26, in _spawn
    return _doebuild_spawn(
  File "/usr/lib/python3.9/site-packages/portage/package/ebuild/doebuild.py", line 242, in _doebuild_spawn
    return spawn(cmd, settings, **kwargs)
  File "/usr/lib/python3.9/site-packages/portage/package/ebuild/doebuild.py", line 2098, in spawn
    return spawn_func(mystring, env=mysettings.environ(), **keywords)
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 157, in spawn_bash
    return spawn(args, opt_name=opt_name, **keywords)
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 405, in spawn
    _unshare_validate(unshare_flags)
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 888, in __call__
    result = self._results[flags] = self._validate(flags)
  File "/usr/lib/python3.9/site-packages/portage/process.py", line 918, in _validate
    result = parent_pipe.recv()
  File "/usr/lib/python3.9/multiprocessing/connection.py", line 255, in recv
    buf = self._recv_bytes()
  File "/usr/lib/python3.9/multiprocessing/connection.py", line 419, in _recv_bytes
    buf = self._recv(4)
  File "/usr/lib/python3.9/multiprocessing/connection.py", line 388, in _recv
    raise EOFError
EOFError
-----------------------------------------------------------------------------

>>> emerge --info returns the following:
(Spaces in the urls is so they're not considered urls, see attachement for the raw output)

-----------------------------------------------------------------------------
Portage 3.0.30 (python 3.9.13-final-0, default/linux/amd64/17.1/desktop, gcc-11.3.0, glibc-2.34-r13, 5.15.23-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.23-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-5500U_CPU_@_2 .40GHz-with-glibc2.34
KiB Mem:     8017848 total,   3530784 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 28 Jun 2022 02:30:01 +0000
Head commit of repository gentoo: bd12f179a58775ac56bb76afae5181b9168e07cd
sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/perl:             5.34.1-r3::gentoo
dev-lang/python:           3.9.13::gentoo, 3.10.5::gentoo
dev-lang/rust-bin:         1.60.0::gentoo
dev-util/cmake:            3.22.4::gentoo
dev-util/meson:            0.61.4-r2::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.4::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r13::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-O2 -pipe -march=native -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fexceptions -fstack-protector-strong -fcf-protection -fpie -fpic -fPIC -ftree-vectorize -fomit-frame-pointer -w -flto=thin "
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/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fexceptions -fstack-protector-strong -fcf-protection -fpie -fpic -fPIC -ftree-vectorize -fomit-frame-pointer -w -flto=thin "
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fexceptions -fstack-protector-strong -fcf-protection -fpie -fpic -fPIC -ftree-vectorize -fomit-frame-pointer -w"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fexceptions -fstack-protector-strong -fcf-protection -fpie -fpic -fPIC -ftree-vectorize -fomit-frame-pointer -w"
GENTOO_MIRRORS="http ://distfiles .gentoo .org"
LANG="en_US.utf8"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed -Wl,-z,relro,-z,now -pie -unwindlib=libunwind"
LINGUAS="en en_us"
MAKEOPTS="-j4 -s"
NM="llvm-nm"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
SHELL="/bin/zsh"
USE="X aac acl acpi alsa amd64 bash-completion branding bzip2 cairo clang cli crypt cups dbus dri dts elogind encode exif flac gdbm gentoo-syntax gif gpm gtk gui hardened iconv icu ipv6 jpeg lcms libglvnd libtirpc lm-sensors mad magic man minimal mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcmia pcre pdf pgo png ppds pulseaudio qt5 readline sdl seccomp smp spell split-usr ssl startup-notification svg tiff truetype udev udisks unicode upower usb v4l verify-sig vim-syntax vorbis wifi x264 xattr xcb xcomposite xml xv xvid zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2020" 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="karbon sheets words" 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 greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS

-----------------------------------------------------------------------------

>>> Content of /etc/portage/make.conf:
-----------------------------------------------------------------------------
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.



#COMMON_FLAGS="-march=native -O2 -pipe"
COMMON_FLAGS="-march=native -O2 -pipe -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fstack-clash-protection -fexceptions -fstack-protector-strong -fcf-protection -fpie -fpic -fPIC -ftree-vectorize -fomit-frame-pointer -w"



#LDFLAGS="-Wl,-pie,-z,defs,now,relro"
LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now -pie -unwindlib=libunwind"

CFLAGS="${CFLAGS} ${COMMON_FLAGS} -flto=thin "
CXXFLAGS="${CXXFLAGS} ${COMMON_FLAGS} -flto=thin "
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

CC="clang"
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

# NOTE: This stage was built with the bindist Use flag enabled
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

MAKEOPTS="-j4 -s"
ACCEPT_LICENSE="-* @BINARY-REDISTRIBUTABLE"

USE="X -Xaw3d -a52 -accessibility alsa -altivec -aqua -appindicator -audit -ayatana bash-completion -bluetooth -cdr -cdda -clamav clang -coreaudio -css -cxx -dvd -dvdr -eds -emacs -embedded -emboss -fortran -geolocation gentoo-syntax -gnome -gnome-keyring -gsm -gtk-doc -handbook hardened -hddtemp -hdf5 -hscolour -ibm -infiniband -inotify -initramfs -ios -ipod ipv6 -introspection -joystick -kde -libnotify -librc lm-sensors -logger  magic man minimal -neon -npm -nntp -pch pcmia -plasma pgo -ppp -policykit pulseaudio seccomp -smartcard smp -suid -systemd -telemetry -test truetype unicode usb v4l -vala verify-sig vim-syntax -vnc -wayland wifi -wxwidgets xcomposite -xemacs -xscreensaver zsh-completion "

VIDEO_CARDS="intel i965"

GRUB_PLATFORMS="efi-64"

LINGUAS="en en_us"
L10N="en en-US"

#LLVM_TARGETS=" -AMDGPU -ARM"

-----------------------------------------------------------------------------

>>> When emerging, trap produces this in dmesg:

-----------------------------------------------------------------------------
[10922.954366] traps: emerge[9644] trap invalid opcode ip:7f9fc9fbcb08 sp:7ffd05efbf28 error:0 in libffi.so.8.1.0[7f9fc9fbc000+7000]
[11338.094692] traps: emerge[9716] trap invalid opcode ip:7ff886a0fb08 sp:7ffcd1ee2b88 error:0 in libffi.so.8.1.0[7ff886a0f000+7000]
-----------------------------------------------------------------------------
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-28 23:41:43 UTC
1. Does rebuilding libffi help? What USE flags are enabled for it?
2. Have you tried reducinfg flags at all?
Comment 2 Jed 2022-06-28 23:51:37 UTC
Created attachment 788549 [details]
Emerging firefox
Comment 3 Jed 2022-06-28 23:52:06 UTC
Created attachment 788552 [details]
make.conf
Comment 4 Jed 2022-06-29 13:10:40 UTC
(In reply to Sam James from comment #1)
> 1. Does rebuilding libffi help? What USE flags are enabled for it?
> 2. Have you tried reducinfg flags at all?

1. I can't rebuild it because emerge crashes, do you suggest getting it from precompiled binaries ?

emerge --info libffi

=================================================================
                        Package Settings
=================================================================

dev-libs/libffi-3.4.2-r1::gentoo was built with the following:
USE="-debug (-exec-static-trampoline) (-experimental-loong) -pax-kernel -static-libs -test" ABI_X86="(64) -32 (-x32)"
FEATURES="network-sandbox sfperms fixlafiles news parallel-fetch binpkg-docompress distlocks qa-unresolved-soname-deps ebuild-locks usersandbox merge-sync xattr sandbox buildpkg-live config-protect-if-modified unknown-features-warn binpkg-dostrip pid-sandbox binpkg-logs unmerge-orphans assume-digests userpriv unmerge-logs usersync preserve-libs protect-owned userfetch multilib-strict ipc-sandbox strict"


2. I tried setting USE flags to just -ibm but doesn't change anything


But while investigating libffi, I have discovered the following:

Trying to `emerge --depclean` produces a different output:



 * Always study the list of packages to be cleaned for any obvious
 * mistakes. Packages that are part of the world set will always
 * be kept.  They can be manually added to this set with
 * `emerge --noreplace <atom>`.  Packages that are listed in
 * package.provided (see portage(5)) will be removed by
 * depclean, even if they are part of the world set.
 *
 * As a safety measure, depclean will not remove any packages
 * unless *all* required dependencies have been resolved.  As a
 * consequence of this, it often becomes necessary to run
 * `emerge --update --newuse --deep @world` prior to depclean.

Calculating dependencies... done!
 * Dependencies could not be completely resolved due to
 * the following required packages not being installed:
 *
 *   >=dev-libs/icu-50:0/70.1= pulled in by:
 *     app-text/texlive-core-2021-r1
 *
 *   >=dev-libs/icu-69.1:0/70.1= pulled in by:
 *     www-client/firefox-91.9.1
 *
 *   >=dev-libs/icu-69.1:0/70.1= pulled in by:
 *     mail-client/thunderbird-91.9.1
 *
 *   >=net-libs/gnutls-2.12.23-r6:0/30=[abi_x86_64(-)] pulled in by:
 *     media-video/ffmpeg-4.4.2
 *
 *   >=media-libs/harfbuzz-2.8.1:0/3.0.0= pulled in by:
 *     www-client/firefox-91.9.1
 *
 *   >=dev-libs/libffi-3.0.10:0/7= pulled in by:
 *     www-client/firefox-91.9.1
 *
 *   >=media-libs/harfbuzz-1.4.5:0/3.0.0=[icu,graphite] pulled in by:
 *     app-text/texlive-core-2021-r1
 *
 *   >=dev-libs/libffi-3.0.10:0/7= pulled in by:
 *     mail-client/thunderbird-91.9.1
 *
 *   >=media-libs/harfbuzz-2.8.1:0/3.0.0= pulled in by:
 *     mail-client/thunderbird-91.9.1
 *
 * Have you forgotten to do a complete update prior to depclean? The
 * most comprehensive command for this purpose is as follows:
 *
 *   emerge --update --newuse --deep --with-bdeps=y @world
 *
 * Note that the --with-bdeps=y option is not required in many
 * situations. Refer to the emerge manual page (run `man emerge`)
 * for more information about --with-bdeps.
 *
 * Also, note that it may be necessary to manually uninstall
 * packages that no longer exist in the repository, since it may not
 * be possible to satisfy their dependencies.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-29 13:11:42 UTC
The depclean thing is "fine" because you can't yet do a world upgrade / finish one.

I would try grabbing a libffi from a stage3.
Comment 6 Jed 2022-06-29 13:43:53 UTC
(In reply to Sam James from comment #5)
> The depclean thing is "fine" because you can't yet do a world upgrade /
> finish one.
> 
> I would try grabbing a libffi from a stage3.

Okay that fixed it, looks likes a previous failed world update broke libffi but  it works.

But

What I did was copy libffi from a stage3 which has let me emerge packages normally

After doing so portage complained with the following:

!!! existing preserved libs:
>>> package: dev-libs/icu-71.1-r1
 *  - /usr/lib64/libicudata.so.70
 *  - /usr/lib64/libicudata.so.70.1
 *  - /usr/lib64/libicui18n.so.70
 *  - /usr/lib64/libicui18n.so.70.1
 *      used by /usr/bin/upmendex (app-text/texlive-core-2021-r1)
 *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
 *      used by /usr/lib64/thunderbird/libxul.so (mail-client/thunderbird-91.9.1)
 *  - /usr/lib64/libicuuc.so.70
 *  - /usr/lib64/libicuuc.so.70.1
 *      used by /usr/bin/upmendex (app-text/texlive-core-2021-r1)
 *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
 *      used by /usr/lib64/thunderbird/libxul.so (mail-client/thunderbird-91.9.1)
>>> package: dev-libs/libffi-3.4.2-r1
 *  - /usr/lib64/libffi.so.7
 *  - /usr/lib64/libffi.so.7.1.0
 *      used by /usr/lib/llvm/13/lib64/libLLVM-13.so (sys-devel/llvm-13.0.1)
 *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
 *      used by /usr/lib64/thunderbird/libxul.so (mail-client/thunderbird-91.9.1)
Use emerge @preserved-rebuild to rebuild packages using these libraries


And so, after testing for a bit I did `emerge @preserved-rebuild`

And everything went back to before, same emerge error, can't emerge anything.
Comment 7 Jed 2022-06-29 13:45:39 UTC
(In reply to Jed from comment #6)
> (In reply to Sam James from comment #5)
> > The depclean thing is "fine" because you can't yet do a world upgrade /
> > finish one.
> > 
> > I would try grabbing a libffi from a stage3.
> 
> Okay that fixed it, looks likes a previous failed world update broke libffi
> but  it works.
> 
> But
> 
> What I did was copy libffi from a stage3 which has let me emerge packages
> normally
> 
> After doing so portage complained with the following:
> 
> !!! existing preserved libs:
> >>> package: dev-libs/icu-71.1-r1
>  *  - /usr/lib64/libicudata.so.70
>  *  - /usr/lib64/libicudata.so.70.1
>  *  - /usr/lib64/libicui18n.so.70
>  *  - /usr/lib64/libicui18n.so.70.1
>  *      used by /usr/bin/upmendex (app-text/texlive-core-2021-r1)
>  *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
>  *      used by /usr/lib64/thunderbird/libxul.so
> (mail-client/thunderbird-91.9.1)
>  *  - /usr/lib64/libicuuc.so.70
>  *  - /usr/lib64/libicuuc.so.70.1
>  *      used by /usr/bin/upmendex (app-text/texlive-core-2021-r1)
>  *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
>  *      used by /usr/lib64/thunderbird/libxul.so
> (mail-client/thunderbird-91.9.1)
> >>> package: dev-libs/libffi-3.4.2-r1
>  *  - /usr/lib64/libffi.so.7
>  *  - /usr/lib64/libffi.so.7.1.0
>  *      used by /usr/lib/llvm/13/lib64/libLLVM-13.so (sys-devel/llvm-13.0.1)
>  *      used by /usr/lib64/firefox/libxul.so (www-client/firefox-91.9.1)
>  *      used by /usr/lib64/thunderbird/libxul.so
> (mail-client/thunderbird-91.9.1)
> Use emerge @preserved-rebuild to rebuild packages using these libraries
> 
> 
> And so, after testing for a bit I did `emerge @preserved-rebuild`
> 
> And everything went back to before, same emerge error, can't emerge anything.




Currently doing a world upgrade (will take a while), I will update if same thing comes back at the end
Many thanks
Comment 8 Jed 2022-06-30 00:43:06 UTC
Okay everything back to normal, thank you!
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-30 22:01:09 UTC
(In reply to Jed from comment #8)
> Okay everything back to normal, thank you!

Great!

FWIW, you shouldn't need -fpie -fpic -fPIC anymore with >= Clang 14, as we have USE=pie to do it "properly" like with GCC.