Problem with mktex* generated files when running latex on GCP cloud run

Karl Berry karl at freefriends.org
Wed Jul 9 23:53:27 CEST 2025


Hi Norbert - hmm.

    mktextfm: /tmp/foobar/fonts/tfm/lh/lh-t2a/larm1000.tfm: successfully generated.

So, evidently latex is apparently looking somewhere other than where
mktextfm is creating the file.  In your compile.sh, after the first
latex run, can you add something like:

ls -l /tmp/foobar/fonts/tfm/lh/lh-t2a/larm1000.tfm # guesing it's there
kpsewhich -var-value TEXMFVAR
kpsewhich --debug=-1 larm1000.tfm

And/or prepend env KPATHSEA_DEBUG=-1 to the second latex invocation.

To try to discern what the situation is after it's supposedly been
created.

    * on second latex run:
    kpathsea: Running mktextfm larm1000

The fact that the second run is running mktextfm again means that latex
can't find the tfm (even though mktextfm installed it where it thought
it should go). So it's not surprising that dvips can't find it either.

Does the image you are using have the same mktex config stuff as vanilla
TL? Specifically, that texmf-dist/web2c/mktex.cnf contains:
: ${MT_FEATURES=appendonlydir:varfonts}
(apparently so, since that's where mktextfm is putting it, but ...)

And in texmf.cnf:
VARTEXFONTS = $TEXMFVAR/fonts

And that TEXMFVAR didn't get listed in TEXMFDBS?
TEXMF = {$TEXMFAUXTREES$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}
TEXMFDBS = {!!$TEXMFLOCAL,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFDIST}

That's what comes to mind to check right now ... I think we're missing
something somewhere ... -k


More information about the texhax mailing list.