[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

tetexlive-bin FTBFS on Alpha due to gcc PR28623



Hi,

tetexlive-bin fails to build on Alpha:

[...]
gcc -DHAVE_CONFIG_H  -I. -I../../../../texk/web2c/pdftexdir -I.. -I../../../../texk/web2c/pdftexdir/../..  -I.. -I../../../../texk/web2c/pdftexdir/.. -I../.. -I../../../../texk/web2c/pdftexdir/../.. -I../../../libs/md5 -I../../../../texk/web2c/pdftexdir/../../../libs/md5 -I../../../libs/xpdf -I../../../libs/xpdf/.. -I../../../../texk/web2c/pdftexdir/../../../libs/xpdf -I../../../../texk/web2c/pdftexdir/../../../libs/xpdf/.. -I../../../libs/obsdcompat -I../../../libs/obsdcompat/.. -I../../../../texk/web2c/pdftexdir/../../../libs/obsdcompat -I../../../../texk/web2c/pdftexdir/../../../libs/obsdcompat/.. -DpdfTeX -g -O2  -c ../../../../texk/web2c/pdftexdir/writezip.c -o writezip.o
../../../../texk/web2c/pdftexdir/writezip.c: In function 'writezip':
../../../../texk/web2c/pdftexdir/writezip.c:75: error: unrecognizable insn:
(insn 139 138 140 9 ../../../../texk/web2c/pdftexdir/writezip.c:54 (set (reg:DI 141)
        (plus:DI (reg/f:DI 138)
            (const_int 32768 [0x8000]))) -1 (nil)
    (nil))
../../../../texk/web2c/pdftexdir/writezip.c:75: internal compiler error: in extract_insn, at recog.c:2084
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccKHjfIv.out file, please attach this to your bugreport.
make[4]: *** [writezip.o] Error 1
make[4]: Leaving directory `/build/buildd/texlive-bin-2007/build/source/Work/texk/web2c/pdftexdir'

(log at
http://buildd.debian.org/fetch.cgi?pkg=texlive-bin&arch=alpha&ver=2007-3&stamp=1176603526)

The reason is an obscure bug in gcc that only triggers when accessing
exactly the 32767th element of a character array. Since I don't know
how fix it in gcc and nobody else seems to be working on that, I
suggest you apply the following workaround:

--- writezip.c~	2007-04-15 14:12:19.000000000 +0200
+++ writezip.c	2007-04-15 14:12:39.000000000 +0200
@@ -51,7 +51,15 @@
     for (;;) {
         if (c_stream.avail_out == 0) {
             pdfgone += xfwrite(zipbuf, 1, ZIP_BUF_SIZE, pdffile);
+#ifdef __alpha__
+	    /* work around http://gcc.gnu.org/PR28623 */
+	    {
+		volatile int o = ZIP_BUF_SIZE - 1;
+                pdflastbyte = zipbuf[o];
+	    }
+#else
             pdflastbyte = zipbuf[ZIP_BUF_SIZE - 1];     /* not needed */
+#endif
             c_stream.next_out = (Bytef *) zipbuf;
             c_stream.avail_out = ZIP_BUF_SIZE;
         }

-- 
	Falk



Reply to: