The described issue has been confirmed as a bug in
luatexthat can be expected to be solved in TeXLive 2018. Alsolatexmkitself has been extended to deal with this issue in version 4.55d.
For a large deck of lecture slides I am refactoring my custom Makefile into a more streamlined solution based on latexmk with the -use-make option.
While this works fine with pdflatex as engine, it causes lot's of make invocations with lualatex for targets that are actually part of the texmf tree. Minimal example:
% slides.tex
\RequirePackage{luatex85}
\documentclass{beamer}
\begin{document}
\begin{frame}{A Frame}
Some content
\end{frame}
\end{document}
If I compile this with
latexmk -lualatex -norc -use-make slides.tex
(-norc to make sure no hidden options are passed to latexmk)
Compilation works, but I get the following:
Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c.
Latexmk: 'lualatex': source file 'beamericonarticle.20.pdf' doesn't exist. I'll try making it...
------------
Running 'make "beamericonarticle.20.pdf"'
------------
make: *** No rule to make target `beamericonarticle.20.pdf'. Stop.
Latexmk: 'lualatex': source file 'beamericonarticle.pdf' doesn't exist. I'll try making it...
------------
Running 'make "beamericonarticle.pdf"'
------------
make: *** No rule to make target `beamericonarticle.pdf'. Stop.
<... and so on ..,>
Latexmk: All targets (slides.pdf) are up-to-date
I assume the culprit comes from the fact, that lualatex behaves slightly different to pdflatex with respect to the -recorder option, which is (AFAIK) employed by latexmk for input dependency tracking. In the lualatex version we find one extra line in the generated slides.fls file for every included image:
INPUT /opt/local/share/texmf-texlive/tex/latex/beamer/art/beamericonarticle.pdf
INPUT beamericonarticle.pdf <-- not generated by pdflatex!
INPUT /opt/local/share/texmf-texlive/tex/latex/beamer/art/beamericonarticle.20.pdf
INPUT beamericonarticle.20.pdf <-- not generated by pdflatex!
So apparently, latexmk does not know what to make out of these "extra" INPUTs and, thus, calls make to build them.
Employed Versions:
This is LuaTeX, Version 1.0.4 (TeX Live 2017/MacPorts 2017_2)
Latexmk, John Collins, 19 Jan. 2017. Version 4.52c
Questions:
- Is this a bug or a feature of
lualatex? - Or maybe the lua-specific part of the graphics driver is to blame here?
- Possible workarounds?
INPUT beamericonarticle.pdfwith miktex, only with texlive (2017 and 2018). So I think it should be reported on the texlive mailing list, I will do it.