[tlbuild] dvibook failure on Cygwin

Ken Brown kbrow1i at gmail.com
Sat Feb 25 17:45:05 CET 2012


On 2/24/2012 6:01 PM, Ken Brown wrote:
> On 2/24/2012 5:35 PM, Karl Berry wrote:
>> Hi Ken,
>>
>> Something is seriously wrong with getopt (from kpathsea) on Cygwin.
>>
>> And always has been, and just never been noticed before?
>> Possible, I suppose, but doesn't seem especially likely.
>
> You're right, of course. I'm not seeing any problem except in dvibook.
> But I have no idea what could be preventing getopt from working properly
> in dvibook, and I can't make any sense out of what I saw under gdb.
> Maybe Peter will think of something.

Problem solved: the programs that use getopt need to include more 
kpathsea headers.  I don't know yet exactly which one(s) or why, but I 
simply added `#include <kpathsea/kpathsea.h>' to dvibook.c (and the 
other files in the seetexk directory that use getopt), and now all tests 
pass.

I'll look more carefully and figure out which header(s) are actually 
needed.  I'll also check the rest of the texlive tree.

Interestingly, adding this #include caused the familiar warning about 
the redeclaration of optarg, optind, etc., to appear in the compilation 
of these programs.  Previously the warning wasn't there for the programs 
in seetexk.

I'll send a patch once I have a clearer idea of what's going on.

Ken


More information about the tlbuild mailing list