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

Pablo González L pablgonz at educarchile.cl
Tue Apr 2 17:39:10 CEST 2024


> If you really need to run TL under bash, it makes more sense to
> install Cygwin or Msys2: Cygwin is one of the platforms supported by
> TL, and Msys2 has itself packages for TL.
>
> --
> Siep Kroonenberg

This is where the problem itself lies, theoretically `epstopdf` should
work under `MSYS2`.

L217 my $on_windows = $^O =~ /^(MSWin|msys$)/;

but if you run an MSYS terminal with the variables added to the `$PATH`
you may notice that it is broken:

pablg at RayzenTeX MSYS ~
$ uname -a
MSYS_NT-10.0-22631 RayzenTeX 3.4.10.x86_64 2024-03-24 15:09 UTC x86_64 Msys

pablg at RayzenTeX MSYS ~
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/texlive/2024/bin/windows:/c/Program
Files (x86)/Common
Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program
Files/gs/gs10.02.1/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Program
Files/PowerShell/7:/c/Program
Files/Git/cmd:/c/texlive/2024/bin/windows:/c/Users/pablg/AppData/Local/Microsoft/WindowsApps:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

pablg at RayzenTeX MSYS ~
$ pdflatex --version | grep 2024
pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024)
Copyright 2024 Han The Thanh (pdfTeX) et al.

pablg at RayzenTeX MSYS ~
$ epstopdf --help
epstopdf ($Id: epstopdf.pl 68289 2023-09-15 22:17:54Z karl $) 2.33
!!! Error: Required program kpsewhich not found in PATH
(/c/texlive/2024/tlpkg/tlgs/bin:/usr/local/bin:/usr/bin:/usr/bin:/opt/bin:/c/texlive/2024/bin/windows:/c/Program
Files (x86)/Common
Files/Oracle/Java/javapath:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/WINDOWS/System32/OpenSSH:/c/Program
Files/gs/gs10.02.1/bin:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Program
Files/PowerShell/7:/c/Program
Files/Git/cmd:/c/texlive/2024/bin/windows:/c/Users/pablg/AppData/Local/Microsoft/WindowsApps:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
C:\texlive\2024\bin\windows\runscript.tlu:921: command failed with exit code 2:
perl.exe c:\texlive\2024\texmf-dist\scripts\epstopdf\epstopdf.pl --help

> Karl wrote:
> Hi Pablo,
>
>     In simple terms, `cygwin` and `Git-bash` (msys) should be treated in
>     the same way using ":" as a separator in the PATH.
>
> Are you sure? I would have surmised that I was previously advised not do
> this for msys, because of the current $on_windows regexp you found.
> What if people are using msys without "git bash"? Is that possible? Does
> it make sense? And per Siep's message, it seems all of these things can
> be configured in different ways. We don't want to fix one group of users
> and break another.

`git-bash` is a wrapper around `MSYS2/MINGW64`, difference is only
in the default values of the variable "MSYS2_PATH_TYPE" which is set to
"-inherit" for `git-bash`. In both situations "MSYS2" or `git-bash` the
separator on $PATH var will be ":".

> In any case, I need a patch. I can't guess what myriad combination of
> conditionals is correct for all these Unix emulators under Windows.

Under any MSYS2 terminal the variable "$^O" returns `msys` (not cygwin)

The `--restricted` thing is in the same line, apparently it searches in
a directory that does not correspond and that is why it returns the
failure.

Thank you for taking the time with this.

Saludos
Pablo


More information about the tex-k mailing list.