Patch explodes without a usable error message, but only on certain specific .diff's. The linked mm-sources diff will reproducably cause the explosion on x86, on GCC 3.4 and GCC 4.0; it has been reported that GCC 3.3 produces a working patch instead. I will attach the 2.6.11_rc2-r2.ebuild for mm-sources as a test-case. By lu_zero's request I have tried to emerge with CFLAGS="-O1 -march=athlon-xp -pipe", this did not alleviate the issue. (Note that the patch ebuild filters most CFLAGS anyway).
Created attachment 55797 [details] mm-sources-2.6.12_rc2-r2.ebuild Testcase ebuild.
>>> emerge (1 of 1) sys-kernel/mm-sources-2.6.12_rc2-r2 to / >>> md5 src_uri ;-) patch-2.6.12-rc2.bz2 >>> md5 src_uri ;-) linux-2.6.11.tar.bz2 >>> md5 src_uri ;-) 2.6.11-rc2-mm2.bz2 >>> Preparing to unpack ... >>> Unpacking source... >>> Unpacking linux-2.6.11.tar.bz2 to /var/tmp/portage/mm-sources-2.6.12_rc2-r2/work * Applying patch-2.6.12-rc2.patch (-p0+) ... [ ok ] * Applying 2.6.11-rc2-mm2.patch (-p0+) ... patch: pch.c:621: intuit_diff_type: Assertion `i0 != NONE' failed. [ !! ] * Please attach /var/tmp/portage/mm-sources-2.6.12_rc2-r2/temp/2.6.11-rc2-mm2.err to any bug you may post. !!! ERROR: sys-kernel/mm-sources-2.6.12_rc2-r2 failed. !!! Function unipatch, Line 711, Exitcode 0 !!! Unable to dry-run patch. !!! If you need support, post the topmost build error, NOT this status message. (The patch debug output is too large to attach) -rw-r--r-- 1 root portage 3.1M Apr 9 22:26 /var/tmp/portage/mm-sources-2.6.12_rc2-r2/temp/2.6.11-rc2-mm2.err
By request of iggy, in relation to bug #77190 I have tried to set LC_ALL="C" on the commandline while emerging the testcase ebuild. This had no effect.
mm-sources ebuild is downloading the wrong -mm patch, which will never apply.