[tlbuild] Problem with program_invocation_name on Cygwin

Karl Berry karl at freefriends.org
Sun Mar 6 02:19:55 CET 2011


Hi Ken,

                      from ../../../texk/xdvik/main.c:10:

Were you just compiling xdvik alone or what?  I would have expected the
build to fail on the first kpse-using program.  I don't see any obvious
reason why xdvik should behave differently.  The kpse sources all
include whatever .h's are needed.

    extern __IMPORT char *program_invocation_name;
    extern __IMPORT char *program_invocation_short_name;

With no #ifdef __USE_GNU or anything around it?  The declarations (minus
__IMPORT) are also present in /usr/include/errno.h on my CentOS system
and have been around in glibc for decades.  Thus seemingly this should 
have been failing for a year or two at least, but hasn't been.


Anyway, the story here is that originally I used those variables, which
are automatically set up on glibc systems.  In retrospect, that was
pointless since we have to compute them on other systems anyway, and the
glibc values aren't necessarily what we want anyway (symlink expansion ...).

When Taco made kpse thread-safe he made them part of the kpse instance
and #define'd the bare names to be in the default instance as usual, to
preserve compatibility.  That's when I would have expected glibc
compilations to start failing too.

At this point, I think the thing to do is prepend kpse_ to those #defines
and change the few occurrences of program_invocation{,_short}_name that
are in the sources.  A quick grep under texk showed < 10, most in
luatexdir, which I expect Taco will be glad to hack out :).

(We can also eliminate the configure test for it.)

Taco, Peter, wdyt?

Thanks,
k


More information about the tlbuild mailing list