[tlbuild] compile fix for luatex
Vladimir Volovich
vvv at vsu.ru
Thu May 14 18:13:37 CEST 2009
Hi Taco and all!
here is a patch which fixes compilation on solaris 8 sparc using sun
studio compiler:
========================================
--- texk/web2c/web2c/coerce.h (revision 13085)
+++ texk/web2c/web2c/coerce.h (working copy)
@@ -22,6 +22,11 @@
#define eq_destroy(x) zeq_destroy(x)
#endif
+#ifdef synch_p_with_c
+#undef synch_p_with_c
+#define synch_p_with_c(x) zsynch_p_with_c(x)
+#endif
+
#else /* luaTeX */
#ifdef printword
========================================
the error message is:
cc -DHAVE_CONFIG_H -I. -I../../../texk/web2c -I./.. -I/opt/home/vvv/src/texlive/source/Work/texk -I/opt/home/vvv/src/texlive/source/texk -I/opt/home/vvv/src/texlive/source/Work/libs/zlib -I/opt/home/vvv/src/texlive/source/Work/libs/libpng -DPDF_PARSER_ONLY -I/opt/home/vvv/src/texlive/source/Work/libs/xpdf -I/opt/home/vvv/src/texlive/source/Work/libs/xpdf/goo -I/opt/home/vvv/src/texlive/source/Work/libs/xpdf/xpdf -I/opt/home/vvv/src/texlive/source/Work/libs/obsdcompat -I/opt/home/vvv/src/texlive/source/libs/obsdcompat -I../../../texk/web2c/libmd5 -Iluatexdir -I../../../texk/web2c/luatexdir -I../../../texk/web2c/luatexdir/lua51 -DpdfTeX -xarch=v8 -O -c -o libluatex_a-vfpacket.o `test -f 'luatexdir/font/vfpacket.c' || echo '../../../texk/web2c/'`luatexdir/font/vfpacket.c
"../../../texk/web2c/luatexdir/font/vfpacket.c", line 184: invalid cast expression
"../../../texk/web2c/luatexdir/font/vfpacket.c", line 194: invalid cast expression
"../../../texk/web2c/luatexdir/font/vfpacket.c", line 220: invalid cast expression
cc: acomp failed for ../../../texk/web2c/luatexdir/font/vfpacket.c
and these lines contain
pos = synch_p_with_c(cur);
which gets preprocessed to
pos = zsynch_p_with_c ( ( scaledpos ) ( cur ) );
and since scaledpos is a structure, it is invalid, because
ISO C forbids casting nonscalar to the same type.
There was a similar fix applied in TL revision 7719 last year.
Best,
v.
More information about the tlbuild
mailing list