3

I am running latexmk on my document, main.tex:

latexmk -pdfxe -silent -synctex=1 "main"

When I run the command, I receive this message (often repeated several times in succession):

Latexmk: ???!!!==== Using biber OMITTING TEST on missing bib files
Latexmk: !!!!!!!!!!! Fls file lists log file as an input file for rule 'xelatex'. I won't treat it as a source file, since there appear to be no good uses for it. This behavior happens at least under acmart.cls with xelatex

I did not use acmart.cls in my document, unless it was included by another package.

My .latexmkrc file contains the following:

ensure_path( 'TEXINPUTS', './pkg//' ); # Includes custom package files that I have placed in the ./pkg directory
$bibtex_use=2;

# Run bib2gls as needed
# From support/latexmk/example_rcfiles/bib2gls_latexmkrc (CTAN)
push @generated_exts, 'glstex', 'glg';

add_cus_dep('aux', 'glstex', 0, 'run_bib2gls');

sub run_bib2gls {
    if ( $silent ) {
        my $ret = system "bib2gls --silent --group '$_[0]'";
    } else {
        my $ret = system "bib2gls --group '$_[0]'";
    };
    
    my ($base, $path) = fileparse( $_[0] );
    if ($path && -e "$base.glstex") {
        rename "$base.glstex", "$path$base.glstex";
    }

    # Analyze log file.
    local *LOG;
    $LOG = "$_[0].glg";
    if (!$ret && -e $LOG) {
        open LOG, "<$LOG";
    while (<LOG>) {
            if (/^Reading (.*\.bib)\s$/) {
        rdb_ensure_file( $rule, $1 );
        }
    }
    close LOG;
    }
    return $ret;
}

Can someone please explain the messages that are outputted when I run latexmk (and, if possible, how to fix them)? I have not included an MWE because I am just asking about the meaning of the error messages.

2 Answers 2

6

Latexmk maintainer here:

Why the warning about the .log file? As was worked out by David and the OP, the second of the warning messages (the one about the .log file) results from the use of the hyperxmp package with xelatex. In that case, hyperxmp reads metadata of the .log file to set the value of the current date and time. This causes the .log file to be listed as an INPUT file in the .fls file. Normally, latexmk treats the .fls file as giving the definitive list of source files for *latex.

Now a change in the contents of any source file is normally a cause for latexmk to rerun *latex. But the .log file is not a normal input file, so latexmk should be wary of this case. There is a potentially infinite loop, since the first line of the log file contains the time of the run, and could change on every run without affecting any relevant output.

At this point, I'd prefer to keep the warning message about the .log file being listed as a source file, since it indicates a potentially anomalous situation. But I've modified the wording of the message for the next version of latexmk, with mention of hyperxmp as the likely (and innocuous) cause.

Extra comment: In debugging this kind of problem where the .fls file (and hence latexmk) report that the .log file has been input, a natural tactic is to look at the .log file to see where the .log file was read in. When you do this, you come up a blank. The apparent contradiction is resolved once you know that the "INPUT file.log" line in the .fls file can be caused by the compilation reading the metadata of the .log file, rather than only by reading the content of the .log file.

Why the warning about omitting test for missing .bib file? Latexmk has a configuration variable $bibtex_use whose default setting is that bibtex is only run if the .bib file(s) exist; this prevents overwriting of a .bbl file in situations where the .bbl file is available but not the .bib file. But when biber is used instead of bibtex, latex's current method of determining the name of the .bib file only works after running biber, unlike the case for bibtex. So the message you read is really saying that latexmk will not obey the $bibtex_use variable. This will be fixed in the next release.

1
  • Is there a way to avoid the warning? In my setup, the warning is issued even if $bibtex_use is not explicitly set.
    – caustic
    Jan 2, 2023 at 0:46
3

The warning means latexmk thinks you have a document like

\documentclass{article}

\begin{document}

\input{\jobname.log}
xxx

\end{document}

which inputs a .log file and it is just warning you it is not treating it as a source file even though it is input.

The above produces:

Latexmk: Examining 'dd159.fls'
Latexmk: !!!!!!!!!!! Fls file lists log file as an input
   file for rule 'latex'. I won't treat it as a source file, since
   there appear to be no good uses for it.
   This behavior happens at least under acmart.cls with xelatex
Latexmk: !!!!!!!!!!! Fls file lists log file as an input
   file for rule 'latex'. I won't treat it as a source file, since
   there appear to be no good uses for it.
   This behavior happens at least under acmart.cls with xelatex
Latexmk: !!!!!!!!!!! Fls file lists log file as an input
   file for rule 'latex'. I won't treat it as a source file, since
   there appear to be no good uses for it.
   This behavior happens at least under acmart.cls with xelatex
Latexmk: !!!!!!!!!!! Fls file lists log file as an input
   file for rule 'latex'. I won't treat it as a source file, since
   there appear to be no good uses for it.
   This behavior happens at least under acmart.cls with xelatex
Latexmk: Examining 'dd159.log'
Latexmk: Log file says output to 'dd159.dvi'
9
  • How can I identify where the log file is being inputted? I certainly didn't put something like \input{\jobname.log} into my document. Also, do you know what the bibliography errors are? Dec 23, 2022 at 22:49
  • you ca look at your log and/or the fls file which shows which files, in which order are input (or \read rather than \input) You probably need to provide an example for more specific help Dec 23, 2022 at 22:54
  • The line INPUT /usr/local/texlive/2022/texmf-dist/tex/latex/graphics/keyval.sty appears right before INPUT ./main.log. Does this indicate that the keyval package is the culprit? Dec 23, 2022 at 23:00
  • @BenZ. nope, clearly keyval is blame free (check its author) Dec 23, 2022 at 23:02
  • Nice :). Here is a link to (the relevant part of) my .fls file—does this help at all? Dec 23, 2022 at 23:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .