[tex-k] epstopdf not usable in Git Bash for Windows

John Collins jcc8 at psu.edu
Mon Apr 1 15:50:58 CEST 2024


I don't think this issue has anything to do with Git Bash itself, but with the 
use of msys2 and setting TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1 in TeXLive's 
texmf.cnf file, together with a possible bug in epstopdf.pl.


I reproduce errors like those shown by the following.

1. Work in a MSYS2 terminal window, with the default setting of PATH (and a 
default installation of MSYS2).

2. Have TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1 in TeXLive's texmf.cnf file.

3. Run TeXLive's epstopdf.exe, e.g., by giving the path to the windows binary. 
(Or, of course, by putting the TeX Live Windows binary directory in PATH and 
just running epstopdf.)

Further investigation showed that the problem was that the perl invoked to run 
the epstopdf.pl script is that of msys2 (because of msys2's default setting of 
PATH).  It appears that epstopdf.pl fails in this situation; I've not 
investigated exactly why in any detail.

Note that the default PATH set by MSYS2 does **not** include all the items that 
Windows sets in PATH.  For example on my Windows installation, PATH includes 
items for the TeX Live binaries and for Strawberry Perl, but the default PATH 
under MSYS2 doesn't contain any of those.

I could solve the problem in one of two ways:

1. Comment out TEXLIVE_WINDOWS_TRY_EXTERNAL_PERL = 1 in TeXLive's texmf.cnf 
file.  Then when epstopdf.exe is run, TeX Live's internal perl is used.

2. Modify PATH so that my native Windows Perl (Strawberry Perl) is ahead of 
msys2's perl.


John









More information about the tex-k mailing list.