Emerge fails. Patch output file has "can't find file to patch at input line 6" Running the patch manually $ patch -p0 -g0 -E --no-backup-if-mismatch < 012_no_forced_sse2.patch patching file configure.in Reversed (or previously applied) patch detected! Assume -R? [n] $ grep msse2 configure.in $ patch has not been applied. Reproducible: Always Steps to Reproduce: 1. emerge dev-lang/ruby-2.2.0 Actual Results: Emerge of ruby-2.2.0 fails. Expected Results: Emerge of ruby-2.2.0 succeeds.
# USE=-sse2 ebuild ruby-2.2.0.ebuild clean prepare Appending /newaches/gentoo/cvs/gentoo-x86 to PORTDIR_OVERLAY... * ruby-2.2.0.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * ruby-patches-2.2.0.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking ruby-2.2.0.tar.xz to /home/jer/portage/dev-lang/ruby-2.2.0/work >>> Unpacking ruby-patches-2.2.0.tar.bz2 to /home/jer/portage/dev-lang/ruby-2.2.0/work >>> Source unpacked in /home/jer/portage/dev-lang/ruby-2.2.0/work >>> Preparing source in /home/jer/portage/dev-lang/ruby-2.2.0/work/ruby-2.2.0 ... * Applying various patches (bugfixes/updates) ... * 004_gfbsd7.patch ... [ ok ] * 005_no-undefined-ext.patch ... [ ok ] * 009_no-gems.patch ... [ ok ] * 012_no_forced_sse2.patch ... * Failed Patch: 012_no_forced_sse2.patch ! * ( /home/jer/portage/dev-lang/ruby-2.2.0/work/patches/012_no_forced_sse2.patch ) * * Include in your bugreport the contents of: * * /home/jer/portage/dev-lang/ruby-2.2.0/temp/012_no_forced_sse2.patch.out * ERROR: dev-lang/ruby-2.2.0::gentoo failed (prepare phase): * Failed Patch: 012_no_forced_sse2.patch! * * Call stack: * ebuild.sh, line 93: Called src_prepare * environment, line 3284: Called epatch '/home/jer/portage/dev-lang/ruby-2.2.0/work/patches' * environment, line 1605: Called die * The specific snippet of code: * die "Failed Patch: ${patchname}!"; * * If you need support, post the output of `emerge --info '=dev-lang/ruby-2.2.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-lang/ruby-2.2.0::gentoo'`. * The complete build log is located at '/keeps/gentoo/emergelogs/wim/dev-lang:ruby-2.2.0:20150106-181721.log'. * For convenience, a symlink to the build log is located at '/home/jer/portage/dev-lang/ruby-2.2.0/temp/build.log'. * The ebuild environment file is located at '/home/jer/portage/dev-lang/ruby-2.2.0/temp/environment'. * Working directory: '/home/jer/portage/dev-lang/ruby-2.2.0/work/ruby-2.2.0' * S: '/home/jer/portage/dev-lang/ruby-2.2.0/work/ruby-2.2.0'
Conditional patching and why you shouldn't do it.
same here sk-srv ~ # uname -a Linux sk-srv 3.14.16-gentoo #1 Wed Aug 13 22:20:36 CEST 2014 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux sk-srv ~ # emerge --info Portage 2.2.14 (python 2.7.9-final-0, default/linux/x86/13.0, gcc-4.8.3, glibc-2.19-r1, 3.14.16-gentoo i686) ================================================================= System uname: Linux-3.14.16-gentoo-i686-Intel-R-_Pentium-R-_4_CPU_2.00GHz-with-gentoo-2.2 KiB Mem: 1031456 total, 27708 free KiB Swap: 1004056 total, 769584 free Timestamp of tree: Wed, 07 Jan 2015 17:15:01 +0000 ld GNU ld (Gentoo 2.24 p1.4) 2.24 app-shells/bash: 4.2_p53 dev-lang/perl: 5.18.2-r2 dev-lang/python: 2.7.9-r1, 3.2.5-r6, 3.3.5-r1, 3.4.1 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.12.6, 1.13.4 sys-devel/binutils: 2.24-r3 sys-devel/gcc: 4.7.3-r1, 4.8.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2-r1 sys-devel/make: 4.0-r1 sys-kernel/linux-headers: 3.16 (virtual/os-headers) sys-libs/glibc: 2.19-r1 Repositories: gentoo ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gdm /usr/share/gnupg/qualified.txt /var/bind /var/spool/munin-async/.ssh" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" DISTDIR="/var/portage/distfiles" FCFLAGS="-O2 -march=i686 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="http://gentoo.modulix.net/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mneisen.org/" LANG="fr_FR.UTF8" LC_ALL="fr_FR.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/var/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" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X acl apache2 berkdb branding bzip2 cdr cli cracklib crypt cups cxx dbus dri edirectory fam fortran gdbm gif gtk hal iconv jpeg ldap lock logrotate modules mysql ncurses nls nptl nptlonly openmp pam pcre pdf perl png ppds python readline samba session ssl tcltk tcpd thunar unicode x86 zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" 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 vmmouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" 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 vesa fbdev vmware" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
(In reply to Jeroen Roovers from comment #2) > Conditional patching and why you shouldn't do it. that's what we have in ebuild. This is a blocker for non-x86 platforms (ARM).
Fortunately the broken sse2 detection code is now gone so we don't need to apply this patch at all anymore. Fixed in dev-lang/ruby-2.2.0.