On most (4 out of 5) of my systems, the emerge of x11-libs/cairo-1.16.0-r4 attempts to apply the cairo-1.16.0-binutils-2.34.patch patch twice. Emerge then fails prepare phase. I've no idea what's different about the one successful system. I also attempted "USE='-utils' emerge -1v =x11-libs/cairo-1.16.0-r4" in a vain hope that the emerge would only attempt to apply the patch once. firelizard ~ # emerge -1v =x11-libs/cairo-1.16.0-r4 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] x11-libs/cairo-1.16.0-r4::gentoo [1.16.0-r3::gentoo] USE="X glib opengl svg (-aqua) -debug (-gles2-only) -static-libs -utils* -valgrind" ABI_X86="32 (64) (-x32)" 0 KiB Total: 1 package (1 upgrade), Size of downloads: 0 KiB >>> Verifying ebuild manifests >>> Emerging (1 of 1) x11-libs/cairo-1.16.0-r4::gentoo >>> Failed to emerge x11-libs/cairo-1.16.0-r4, Log file: >>> '/var/tmp/portage/x11-libs/cairo-1.16.0-r4/temp/build.log' >>> Jobs: 0 of 1 complete, 1 failed Load avg: 4.03, 4.22, 3.89 * Package: x11-libs/cairo-1.16.0-r4 * Repository: gentoo * Maintainer: x11@gentoo.org * USE: X abi_x86_32 abi_x86_64 amd64 elibc_glibc glib kernel_linux opengl svg userland_GNU * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking cairo-1.16.0.tar.xz to /var/tmp/portage/x11-libs/cairo-1.16.0-r4/work >>> Source unpacked in /var/tmp/portage/x11-libs/cairo-1.16.0-r4/work >>> Preparing source in /var/tmp/portage/x11-libs/cairo-1.16.0-r4/work/cairo-1.16.0 ... * Applying cairo-1.12.18-disable-test-suite.patch ... [ ok ] * Applying cairo-respect-fontconfig.patch ... [ ok ] * Applying cairo-1.16.0-pdf-add-missing-flush.patch ... [ ok ] * Applying cairo-1.16.0-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch ... [ ok ] * Applying cairo-1.16.0-strings.patch ... [ ok ] * Applying cairo-1.16.0-binutils-2.34.patch ... [ ok ] * User patches applied. * Applying cairo-1.16.0-binutils-2.34.patch ... patching file util/cairo-trace/lookup-symbol.c Hunk #1 FAILED at 145. 1 out of 1 hunk FAILED -- saving rejects to file util/cairo-trace/lookup-symbol.c.rej [ !! ] * ERROR: x11-libs/cairo-1.16.0-r4::gentoo failed (prepare phase): Portage 2.3.103 (python 3.6.11-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-10.1.0, glibc-2.31-r5, 5.7.8-gentoo x86_64) ================================================================= System uname: Linux-5.7.8-gentoo-x86_64-AMD_A10-7890K_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.7 KiB Mem: 15307048 total, 6032796 free KiB Swap: 16777212 total, 16777212 free Timestamp of repository gentoo: Thu, 16 Jul 2020 13:30:01 +0000 Head commit of repository gentoo: 8495043d6647326ba2a5aa9df6eeec2e56bc90cc sh bash 5.0_p18 ld GNU ld (Gentoo 2.34 p4) 2.34.0 distcc 3.3.3 x86_64-pc-linux-gnu [disabled] app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3-r1::gentoo dev-lang/python: 2.7.18::gentoo, 3.6.11-r1::gentoo, 3.7.8-r1::gentoo, 3.8.4::gentoo, 3.9.0_beta4::gentoo dev-util/cmake: 3.17.3::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.2::gentoo sys-devel/binutils: 2.34-r1::gentoo sys-devel/gcc: 10.1.0-r2::gentoo sys-devel/gcc-config: 2.3.1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers) sys-libs/glibc: 2.31-r5::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: --timeout=15 sync-rsync-verify-max-age: 24 sync-rsync-verify-metamanifest: yes ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 AdobeFlash-11.x Oracle-BCLA-JavaSE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=bdver3 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=bdver3 -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--quiet-build --with-bdeps=y --keep-going" ENV_UNSET="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=bdver3 -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg 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=bdver3 -O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en-US" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--timeout=15" 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" USE="10bit X a52 aac aalib accessibility acl acpi activities aio alsa amd64 amr ao apache2 audiofile automount avahi berkdb bluray bonjour boost branding bzip2 cairo cdda cdio cdr chm cjk cli cracklib crypt css cups curl curlwrappers dbus declarative dga dia directfb dri dts dv dvd dvdr dynamic elogind emboss encode exif expat fat fbcon ffmpeg fftw flac flash fontconfig foomaticdb fortran ftp fuse gcj gd gdbm gif gimp glib gnutls gpac gphoto2 gpm graphviz gs gstreamer gtk hddtemp hdri iconv icu id3tag imagemagick imlib inotify ipfilter ipv6 irc java javascript jbig jpeg jpeg2k kde kerberos kipi kwallet lame lcms ldap libnotify libtirpc libvisual lm_sensors lzo mad midi mikmod mjpeg mmap mmx mmxext mng modules mp3 mp4 mpeg mpi multilib multiuser musepack mysql nas ncurses network nls nptl nsplugin ntfs odbc offensive ogg openexr opengl openmp oscar pam pango pcre pdf perl phonon plasma plugins png policykit postscript ppds pulseaudio python q32 qml qt5 quicktime rar raw rdesktop readline recode regex rle rss ruby samba sasl scanner schroedinger sdl seccomp sensord session sftp sndfile snmp sox speex spell split-usr sse sse2 ssl startup-notification svg syslog taglib tcl tcpd theora threads tidy tiff timidity tk toolbar tools transcode truetype udev udisks unicode upower usb utils vaapi vala vcd vdpau vdr vorbis wavpack webkit widgets winbind wmf wxwidgets x264 xattr xcb xft xine xinerama xml xorg xosd xpm xscreensaver xv xvid xvmc yahoo zeroconf zip zlib" ABI_X86="32 64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LLVM_TARGETS="AMDGPU X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_6 python3_7 python3_8" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="radeon radeonsi" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
well, your log says that you're about to apply a user patch. It seems you have dropped the binutils patch into /etc/portage/ and forgot about it.
(In reply to tt_1 from comment #1) > well, your log says that you're about to apply a user patch. It seems you > have dropped the binutils patch into /etc/portage/ and forgot about it. You were correct. Thank you.