[tex-k] Bug in mingw build of kpathsea
Hib Eris
hib at hiberis.nl
Wed Feb 3 12:11:42 CET 2010
Hi,
I was trying to make Gnome's document viewer Evince display .dvi files
when running on Windows, when I found an issue with kpathsea.
To find out what was happening, I cross compiled kpathsea with the
mingw32 cross compiler. It appeared that there is something wrong in
texk/kpathsea/mingw32.c. When cross compiling, I get:
linux-0qv8:kpathsea> make libkpathsea_la-mingw32.lo
/bin/sh ./libtool --tag=CC --mode=compile i686-pc-mingw32-gcc
-DHAVE_CONFIG_H -I. -I./.. -I./.. -DMAKE_KPSE_DLL -Wall -Wunused
-Wdeclaration-after-statement -Wno-unknown-pragmas -O2 -g -pipe -Wall
-fexceptions -fno-omit-frame-pointer -fno-optimize-sibling-calls
--param=ssp-buffer-size=4 -mms-bitfields -MT libkpathsea_la-mingw32.lo
-MD -MP -MF .deps/libkpathsea_la-mingw32.Tpo -c -o
libkpathsea_la-mingw32.lo `test -f 'mingw32.c' || echo './'`mingw32.c
libtool: compile: i686-pc-mingw32-gcc -DHAVE_CONFIG_H -I. -I./..
-I./.. -DMAKE_KPSE_DLL -Wall -Wunused -Wdeclaration-after-statement
-Wno-unknown-pragmas -O2 -g -pipe -Wall -fexceptions
-fno-omit-frame-pointer -fno-optimize-sibling-calls
--param=ssp-buffer-size=4 -mms-bitfields -MT libkpathsea_la-mingw32.lo
-MD -MP -MF .deps/libkpathsea_la-mingw32.Tpo -c mingw32.c -o
libkpathsea_la-mingw32.o
mingw32.c: In function 'look_for_cmd':
mingw32.c:465: warning: value computed is not used
mingw32.c:421: warning: 'new' is used uninitialized in this function
mv -f .deps/libkpathsea_la-mingw32.Tpo .deps/libkpathsea_la-mingw32.Plo
Notice the warning in line 421 about 'new' is used uninitialized. That
was causing my crash in kpathsea.dll.
I have attached a patch to fix this. Although this patch works, it
might be better to alter the code in a different way. It seems the
'new' variable is not necessary at all anymore. But as that part of
the code seems rather experimental, I think it is best for me not to
mess with it and leave that to a maintainer.
Kind regards,
Hib Eris.
ps. Evince for Windows can now show dvi files thanks to
texlive/kpathsea! Thanks for your great work on that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: texlive-20091011-source-initnew.patch
Type: text/x-patch
Size: 490 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex-k/attachments/20100203/21e3997a/attachment.bin>
More information about the tex-k
mailing list