[Tex/LaTex] Fatal format file error; stymied. fmtutil: infinite recursion

contexterrorsfmtutiltexlivexetex

I'm using texlive / ConTeXt / Xetex, but I don't know which of those might be relevant to the problem.

The summary is that when I run TeX, I get a "Fatal format file error; I'm stymied" message. Details follow…

I'm running texexec using a Makefile. The command line executed from the Makefile is:

texexec --xtx --mode=linux,report,border --nomapfiles --verbose complete-book.tex

The output looks like this:

TeXExec | processing document 'complete-book.tex'
TeXExec | using search method 'kpsewhich'
TeXExec | no ctx file found
TeXExec | using search method 'kpsewhich'
TeXExec | tex processing method: context
TeXExec | TeX run 1
TeXExec | writing option file complete-book.top
TeXExec | using randomseed 170
TeXExec | tex engine: xetex
TeXExec | tex format: cont-en
TeXExec | fixing backend map path for dvipdfm
TeXExec | running: xetex -progname=context -fmt=cont-en -translate-file=natural.tcx --8bit -output-driver="xdvipdfmx -E -d 4 -V 5" complete-book.tex \emergencyend
This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
 %&-line parsing enabled.
 (WARNING: translate-file "natural.tcx" ignored)
---! /var/lib/texmf/web2c/pdftex/cont-en.fmt was written by pdftex
(Fatal format file error; I'm stymied)
TeXExec | runtime: 0.030342 
...

Looking at pages like http://www.karakas-online.de/mySGML/fatal-format-file-error.html, it sounds like maybe this is caused by the fact that I installed xetex later than the rest of the texlive system was installed, and that I could fix it by running fmtutil.

Am I right about running fmtutil to fix fatal format file errors, or does XeTeX require the use of some other utility?

When I run fmtutil:

sudo fmtutil --all

or

sudo fmtutil --byfmt cont-en

I get an infinite recursion error:

fmtutil: Infinite recursion detected, giving up!. 

This was at the end of 60K of output, which I can make available if it helps. But the last part of the output is:

bodyfont : style mm (mm) defined
) (/usr/share/texmf/tex/context/base/type-map.tex)
(/usr/share/texmf/tex/context/base/type-spe.tex)
(/usr/share/texmf/tex/context/base/type-akb.tex))

ConTeXt ver: 2007.01.12 15:56 MKII fmt: 2012.10.31 int: english/english

 ) )
Beginning to dump on file cont-en.fmt
 (format=cont-en 2012.10.31)
42595 strings of total length 701393
571219 memory locations dumped; current usage is 356&567724
39899 multiletter control sequences
\font\nullfont=nullfont
0 words of font info for 0 preloaded fonts
192 hyphenation exceptions
Hyphenation trie of length 60932 has 3094 ops out of 35111
  194 for language 20
  194 for language 19
 [snip]...
  224 for language 2
  377 for language 1
No pages of output.
Transcript written on cont-en.log.
fmtutil: /root/.texlive2007/texmf-var/web2c/pdftex/cont-en.fmt installed.
fmtutil: Infinite recursion detected, giving up!. 

I searched for that error, and found a mention of it here: http://us.generation-nt.com/answer/bug-560816-texlive-base-postinst-fails-fmtutil-sys-infinite-recursion-help-168924641.html But it didn't indicate a workaround.

Any suggestions would be greatly appreciated.

Versions:

  • CentOS release 6.3 (Final). 64bit.
  • texlive: installed the package texlive.x86_64 0:2007-57.el6_2
  • context: ConTeXt ver: 2007.01.12 15:56 MKII fmt: 2012.10.31
  • xetex: XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)

All this was installed initially via

$ sudo yum install texlive-context 

which installed texlive-context.x86_64 0:2007-57.el6_2 and its dependencies; then later I did

$ sudo yum install texlive-xetex

which installed texlive-xetex.x86_64 0:2007-57.el6_2 and its dependencies.

Update

To try to establish a minimal example, and determine whether it was a problem in our .tex document vs. our configuration, I created a file helloworld.tex:

\starttext
Hello world!
\stoptext

and ran xetex on it:

sudo xetex -progname=context -fmt=cont-en -translate-file=natural.tcx --8bit -output-driver="xdvipdfmx -E -d 4 -V 5" helloworld.tex \emergencyend

The result: again I got the Fatal file format error / stymied message.

If I remove -progname=context but keep -fmt=cont-en, I still get the fatal file format error.

If I remove -fmt=cont-en but keep -progname=context, I get the message "I can't find the format file `context.fmt'!"

If I remove both, and use a helloworld.tex without ConTeXt macros, XeTeX enters extended mode, and after I type \end at the prompt, it successfully delivers a PDF.

Update 2

Following suggestions, I deleted /root/.texlive2007, and ran sudo fmtutil-sys --all. But fmtutil-sys fails in the same way as fmtutil:

Infinite recursion detected, giving up!.

The log file, cont-en.log, is posted at: http://pastebin.com/BUPE5Rhz

AFAICT the part that looks the most like "infinite recursion" (but not quite) is this section:

(/usr/share/texmf/tex/context/base/type-exa.tex
\@sl@\relativefontsize=\count208
\@sl@\typefaceencoding=\count209

(/usr/share/texmf/tex/context/base/type-exa.tex)
(/usr/share/texmf/tex/context/base/type-syn.tex)
(/usr/share/texmf/tex/context/base/type-enc.tex)
(/usr/share/texmf/tex/context/base/type-siz.tex)
(/usr/share/texmf/tex/context/base/type-map.tex)
(/usr/share/texmf/tex/context/base/type-spe.tex)
(/usr/share/texmf/tex/context/base/type-akb.tex)
(/usr/share/texmf/tex/context/base/type-exa.tex)
(/usr/share/texmf/tex/context/base/type-syn.tex)

and then it repeats that group of seven files eight times.

Similar to how it was originally (but with a different directory for cont-en.fmt), the output ends with these three lines, which are not in the log file:

Transcript written on cont-en.log.
fmtutil: /var/lib/texmf/web2c/pdftex/cont-en.fmt installed.
fmtutil: Infinite recursion detected, giving up!.

At this point I'm probably going to reinstall Context/xetex/etc., directly from texlive instead of from the package repository. But I thought I'd post the above since it was requested/suggested.

Final update

I uninstalled the 2007 (mixed with 2010?) version of texlive that I'd gotten from the local package repo, and instead downloaded the latest stable texlive directly from their web site. The problem went away. Thanks again to all who made suggestions.

Best Answer

Here are some points (I do this as answer, since comments are too short):

  • you are running everything as root, this is bad fmtutil: /root/.texlive2007/texmf-var/web2c/pdftex/cont-en.fmt installed. shows that clearly.
  • your TeX system is very old. There was a bug in fmtutil long time ago, here is a link to a patch that might help you. We had the same problems in Debian: http://anonscm.debian.org/viewvc/debian-tex/texlive2009/branches/squeeze/texlive-bin/debian/patches/fmtutil-fix-infinite-loop_upstream
  • you seem to have upgraded from an older version and old files remain in /var/lib/texmf/web2c
  • Since CentOS is based on RedHad (I guess) I don't know the internals, though

I suggest the following steps: - check if there is anything you really need under /root/.texlive2007/, especially under /root/.texlive2007/texmf-var, and if not, remove it completely. - run sudo fmtutil-sys --all

The important part here is that you run fmtutil-sys instead of fmtutil. Watch the output closely, and as soon as it starts to repeat (if it does), break out and publish the output somewhere (pastbin, website, ...).

But my guess is that by running fmtutil-sys you can fix this problem.

Norbert -