2

I am using MiKTeX/TeXworks and set latexmk up years ago. It's been working well until yesterday when I updated MiKTeX.

The typesetting routine for latexmk that I use is:

enter image description here

However, now when I try to compile using my latexmk processing option I obtain the following log file:

Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Rule 'pdflatex': The following rules & subrules became out-of-date:
    'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -synctex=1  -recorder  "DOCUMENT.tex"'
------------
Latexmk: applying rule 'pdflatex'...
Can't spawn "pdflatex -synctex=1  -recorder  "DOCUMENT.tex"": Inappropriate I/O control operation at C:\Program Files\MiKTeX 2.9\scripts/latexmk\latexmk.pl line 9732.
Latexmk: fls file doesn't appear to have been made.
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 255
    Refer to 'DOCUMENT.log' for details
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'DOCUMENT.tex':
(Pdf)LaTeX didn't generate the expected log file 'DOCUMENT.log'
----------------------
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
Latexmk: Errors, so I did not complete making targets

I've tried searching for what to do, but haven't found anything too useful so far. Can anyone provide some guidance? Everything compiles as it should if I manually do pdflatex + bibtex + pdflatex + pdflatex.

The TeXworks version is Version 0.6.3 (MiKTeX 2.9.7140 64-bit).

Edit: Here's what I get from running latexmk from the command line. An error message

enter image description here

and the output

C:\Users\username\folder>latexmk
Latexmk: This is Latexmk, John Collins, 18 June 2019, version: 4.65.
Latexmk: Disallowing switch of output file as incompatible
    with file requests.
Latexmk: applying rule 'latex'...
Rule 'latex': The following rules & subrules became out-of-date:
      'latex'
------------
Run number 1 of rule 'latex'
------------
------------
Running 'latex  -recorder  "DOCUMENT.tex"'
------------
Can't spawn "latex  -recorder  "DOCUMENT.tex"": Inappropriate I/O control operati
on at C:\Program Files\MiKTeX 2.9\scripts/latexmk\latexmk.pl line 9732.
Latexmk: fls file doesn't appear to have been made.
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
  latex: Command for 'latex' gave return code 255
      Refer to 'DOCUMENT.log' for details
----------------------
This message may duplicate earlier message.
Latexmk: Failure in processing file 'DOCUMENT.tex':
   (Pdf)LaTeX didn't generate the expected log file 'DOCUMENT.log'
----------------------
Latexmk: Use the -f option to force complete processing,
 unless error was exceeding maximum runs, or warnings treated as errors.
  • does latexmk work you run it on a command line? – Ulrike Fischer Aug 15 at 6:47
  • @UlrikeFischer No, see my updated post. The same console output. – hejseb Aug 15 at 6:56
  • 1
    Check for updates in miktex both in user and admin mode (just to be sure). Also check if there are new uninstalled packages starting with miktex (in the console, admin mode, section "packages", update the database first by clicking on the icon with the arrow). Then run on a command line initexmf --mklinks --admin --force. – Ulrike Fischer Aug 15 at 7:13
  • @UlrikeFischer All packages were updated already (and all miktex packages installed), but that command line stuff is some black magic. Now it works again! If you post your comment as an answer I'll accept it. – hejseb Aug 15 at 7:24
1

A lot of the exe-files in the miktex bin folder are very small: they are simply wrappers. The "real" application code is in some dll (and/or some script), and the wrappers must find the "entry point". Sometimes after an update the entry point changed and the wrappers must be recreated. Normally miktex takes care of this, but it can fail for whatever reason. In this case the wrappers can be recreated with

  initexmf --mklinks --admin --force

or if only scripts like latexmk are affected

  initexmf --mklinks=scripts --admin --force

See also https://docs.miktex.org/2.9/manual/initexmf.html

  • no. This solution does not work for me. I have the exact problem as described by the OP. – Krishna Aug 28 at 23:44
  • @Krishna the solution worked for the OP - I added the answer after the confirmation in the comments. So if it doesn't work for you, you obviously do not have the same problem. So better ask a new question. – Ulrike Fischer Aug 29 at 8:10
  • never mind. False alarm. I had a --bibtex option passed for $pdflatex variable in my latexmkrc. While this ran without any problem in Linux, latexmk complains and quit instantaneously on Windows. Probably something for @johncollins to look into. – Krishna Aug 30 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.