4

Some days ago, I've updated my Miktex 2.8 installation (on Windows 7). However, since doing that I have problems with latexdiff (it did work before). When I run it, I get:

latexdiff: the Perl script could not be found
latexdiff: Data: latexdiff

So, it seems the latexdiff.exe (there is one under C:\Program Files (86)\MikTeX 2.8\miktex\bin\latexdiff.exe, and another one under C:\Users\myname\AppData\Roaming\MikTeX\2.8\miktex\bin\latexdiff.exe) doesn't find the actual Perl script. There are some Perl files under scripts\latexdiff.

Things I've done/checked:

  • I first thought it was a Perl problem, but the perl interpreter is still working and available at the command line
    If I do perl "C:\Program Files (x86)\MiKTeX 2.8\scripts\latexdiff\latexdiff -h the script works fine.

  • I've already removed and reinstalled the latexdiff package using both the MikTex Package Maintenance and Package Maintenance (Admin), but that didn't help.

  • It doesn't seem to be an admin/regular user issue, as calling either of the two latexdiff.exe files explicitly (the global one, or the user one) gives the same problem.

  • Other scripts like texdiff and pdfcrop which also use a similar perl-script-redirection setup still can be called without problems.

  • the miktex\config\scripts.ini file seems to refer to the correct path, as it has the line latexdiff=scripts/latexdiff/latexdiff.
    Although I noticed that the latexdiff lines are the one of only a few ones that do NOT end with .pl (arlatex, bundledoc, latexpand, latexrevise, makeglossaries, pkfix-helper, urlbst where to other ones without .pl extension)

  • I've checked the miktex\config\update-<date>.log files and in the most recent one there is no entry of latexdiff in the "Making Per links..." part, wheres in older log files, there was.

I don't want to re-install MikTex to fix this problem.

As a workaround for now, I have sort-of created a wrapper script that calls perl "C:\Program Files (x86)\MiKTeX 2.8\scripts\latexdiff\latexdiff, instead of just latexdiff.exe, with whatever options I append.

Some more background: The reason I updated MikTeX some days ago was because I was having a compile problem when using pdftex. I got the error I can't find file 'dehypht-x-2009-06-19.tex'. I tried solving this by updating MikTeX. Didn't help. Was able to resolve it by opening the MikTex Settings program (Windows Start Menu > MikTex > Maintenance > Settings), and deselecting the relevant German language under the Language tab. Don't know if this is relevant or not.

Rabarberski
  • 6,459
  • DId it work before? As far as I know MikTeX does not ship with a build in Perl interperter, only TeX Live does that on windows. So for the Perl based tool in MikTeX you will hjave to install a Perl interpreter manually. – daleif Jan 28 '13 at 14:48
  • @daleif: Yes it worked before. And I have strawberry perl installed and still working. – Rabarberski Jan 28 '13 at 14:51
  • Interesting, I'm not a windows user, so I cannot help much. But it does seem that you may have installed MikTeX as admin and updated it as a normal user. I've had users with that kind of mess before. I'm not sure how to get out of it again (other than reinstalling), but Ulrike Fischer might know. – daleif Jan 28 '13 at 15:03
  • 1
    I just tried and had no problems, but 1. I have miktex 2.9 and 2. I have a single user installation. You could check in miktex\config\scripts.ini if the pathes to the perl files are correct. (Check all scripts.ini, it is possible that you have more than one. And don't mess around with this files, they are signed, if you change them, miktex will refuse to use the files.). – Ulrike Fischer Jan 28 '13 at 15:23
  • 1
    I have the same problem with my texdef Perl script with MikTeX 2.9. I already contacted the MikTeX maintainer Christian Schenk about it and he responded that he will have a look at it shortly. Seeing your question here now, it looks like it is a more general problem with Perl scripts. Therefore I contacted him again now with a link to this question. – Martin Scharrer Jan 28 '13 at 21:03
  • @Ulrike: Thanks for your pointers. I've checked scripts.ini (I only found one, under the Program Files tree), but that seems fine as it points to the correct path (latexdiff=scripts/latexdiff/latexdiff). So the scripts file doesn't seem to be the problem. – Rabarberski Jan 29 '13 at 08:52
  • @Rabarberski: You said you have two binaries. Which one is actually used? What happens if you call the different binaries explictly ("C:\program files\... \latexdiff.exe" old.tex new.tex ...)? – Ulrike Fischer Jan 29 '13 at 09:04
  • @Ulrike: When I do where latexdiff, the one under "Program Files" is listed first, so this one is actually used. When I include the full path to force the usage of one of the two, the results are identical (i.e., perl script not found) – Rabarberski Jan 29 '13 at 11:35
  • Could you exclude permission problems? BTW Why did you not update to MiKTeX 2.9? Take also a deeper look on http://miktex.org/releases. (This is not related to your problem, as you read can in Martin Scharrer’s comment.) – Speravir Jan 29 '13 at 20:58
  • I am facing the same problem since couple of days and unable to solve it. I would be pretty much happy if someone can figure out how to fix it. For me the error message is as follows: latexdiff: the Perl script could not be found latexdiff: Data: scripts/latexdiff/perl/latexdiff-so.pl –  Jan 29 '13 at 10:37
  • @Speravir: I am not sure what permission problems could be involved or how to check for it. (I can execute the scripts, and see the folder contents, so seems I have proper access). Regarding 2.9: because my experience with MikTeX is that it is a complicated beast and I try to leave it as it is as long as it works... – Rabarberski Jan 29 '13 at 23:01
  • @Rabarberski Permission problems: I just wanted to go sure. Updating from 2.8 can in principle done the way I described in Relocate MiKTeX 2.9?. – Speravir Jan 29 '13 at 23:20
  • @Rabarberski: The other user mentions the message Data: scripts/latexdiff/perl/latexdiff-so.pl, you mention in your question Data: latexdiff. Both are the wrong pathes! When I remove the perl script, then miktex gives me in the error message Data: scripts/latexdiff/latexdiff. So something is wrong with scripts.ini. Make a backup of scripts.ini, then rename it and try again. Does latexdiff complain that it can't find scripts.ini? – Ulrike Fischer Jan 30 '13 at 08:48
  • @Ulrike: Ah, were on to something here. Just rechecked my scripts.ini and I noticed that latexdiff (and its family of latexdiff-vc etc) are one of the few lines that have scriptname NOT ending in .pl. The ones that do seem to work, the ones that don't (another example is urlbst) don't work. I quickly tried adding .pl and changing the scripts filename as well, but need to investigate further as it was still not working. – Rabarberski Jan 30 '13 at 10:59
  • The missing ending should be not a problem. In my scripts.ini there is not ending either. The entry is latexdiff=scripts/latexdiff/latexdiff (and the perl scripts don't have an ending too). But the Data-line your error message is missing the scripts/latexdiff/ part. So it looks as if latexdiff is looking for its script in the root of your texmf-tree instead in \scripts\latexdiff. Btw: The error of @prajdhan shows an old path, so probably its scripts.ini simply wasn't updated correctly. But your message is curious. – Ulrike Fischer Jan 30 '13 at 11:12
  • @Ulrike. Oops, missed your suggestion to rename scripts.ini. Just did that ( to scripts_.ini), and strange enough, I get the exact same error message for latexdiff as before. Other scripts (like pdfcrop) still can be called correctly. So it seems scripts.ini is not really used to resolve the paths? – Rabarberski Jan 30 '13 at 11:36
  • Another update: I checked the update-<date>.log files and in the most recent one there is no entry of latexdiff in the Making Per links... part, wheres in older log files, there was. – Rabarberski Jan 30 '13 at 11:41
  • @Rabarberski: It looks as if this scripts.ini is not used. But if I rename scripts.ini I get a message latexdiff: No such file or directory: J:\MiKTeX2.9\miktex\config\scripts.ini. So recheck that you don't have some other scripts.ini or some other latexdiff.exe (e.g. in an old miktex, an other tree etc). And check your environment variables. – Ulrike Fischer Jan 30 '13 at 11:46
  • @Ulrike: Is searched again for scripts.ini under Program Files(x86) \MikTex 2.8 and under <username>\AppData. Appart from the one under Program Files(x86), the only other scripts.ini I found was under AppData\Local\VirtualStore\Program Files (x86)\MiKTeX 2.8\miktex\config and strange enough this one has .pl at the end for latexdiff. I've edited the file and removed the .pl but still not working. Same error message. – Rabarberski Jan 30 '13 at 12:20
  • As I already wrote: Don't edit scripts.ini! The file is protected (to prevent that some malicious software changes the pathes of scripts associated to the exe). You can rename to test if something change, but do not change the content. – Ulrike Fischer Jan 30 '13 at 12:49
  • 1
    @Ulrike: I know; I took a copy before editing and put the copy back afterwards. BTW: I appreciate the persistence you have shown in trying to sort this out. – Rabarberski Jan 30 '13 at 13:07
  • OK. I found an miktex 2.8. installation on another PC and could reproduce your problem. Imho your problem is a bug specific to 2.8. and to latexdiff: latexdiff.exe is not (re)created when initexmf --mklinks is used. You should make a bug report. (I could also reproduce the problem of prajdhan in an not up-to-date miktex 2.9. It could be solved by updating some miktex binaries.) – Ulrike Fischer Jan 30 '13 at 14:18
  • Wow, thanks for the efforts! I'll make a bug report. – Rabarberski Jan 30 '13 at 15:12
  • See https://sourceforge.net/p/miktex/bugs/2210/ – Rabarberski Jan 30 '13 at 15:19
  • @Rabarberski Sorry, but you should once again take a closer look onto http://miktex.org/releases. – Speravir Jan 30 '13 at 16:35

0 Answers0