Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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


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)

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
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
  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.


  • 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.


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:

Hello world!

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:



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.

share|improve this question
You are better off using a more up to date ConTeXt version with LuaTeX as backend, instead of XeTeX. Your version is almost six years old. If you don't have compelling reasons to stick to XeTeX I would advice to switch. –  Marco Nov 1 '12 at 15:41
@Marco: thanks for your comment. I will certainly consider that. However we have typeset a huge 1200-page volume using XeTeX, and I think it was chosen because of its multilingual capabilities. If we switch to LuaTeX there is a risk that some things will stop working which we may not discover for a long time. So I want to try to stay with XeTeX if possible. However I will keep that in mind. AFAICT I am using the latest distributions of texlive* available for CentOS. But I'm not an expert in Linux package systems so please correct me if I'm wrong. –  LarsH Nov 1 '12 at 15:51
OK, thanks for trying. Anybody else know how to fix a fmtutil infinite recursion? –  LarsH Nov 1 '12 at 17:20
Another option is to install the context standalone distribution (see contrxt for wiki for details). It may be installed in parallel to TL, and you can run extend backend using context --xetex filename. –  Aditya Nov 3 '12 at 17:29
@LarsH: Sorry, I was typing on my phone, and did not notice the stupid autocorrect. I meant, run "xetex backend". Regarding "context --xetex" vs "texexec --xetex"; both "context" and "texexec" are wrapper script that call the underlying engine with appropriate arguments; "context" is written in lua so does not require ruby, while "texexec" is written in ruby. Regarding sudo vs not, in general it is a good idea try the command without sudo; depending on the config, this might create the format files in TEXMFHOME. If you get a "permissions denied" error, then try with sudo. –  Aditya Nov 4 '12 at 4:13
show 2 more comments

1 Answer

up vote 9 down vote accepted

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 -

share|improve this answer
Ah... fmtutil-sys. I had read that before as fmtutil -sys but my fmtutil didn't have a -sys option. I will give that a try. Regarding /root/.... that was installed by someone else. Maybe I should uninstall all and start from scratch. Thank you! I will report back here once I've tried some of this. –  LarsH Nov 2 '12 at 1:30
No need to uninstall everything. If you are normally not working as root you can safely remove the .texlive2011 dir there. –  norbert Nov 2 '12 at 11:06
OK, I removed /root/.texlive2007/. Then I ran sudo fmutil-sys --all. I got the same result, Infinite recursion detected, giving up. Next I will check cont-en.log to see where it started repeating. Or else I may uninstall everything and install a new version from texlive. –  LarsH Nov 2 '12 at 16:08
See my updated answer for a link to the log file on pastebin. –  LarsH Nov 2 '12 at 18:42
Did you apply the patch I linked to? If you don't know how to, send me your fmtutil script and I patch it for you and send it back. Also your log file seems fine, can you run fmtutil-sys --all and send the output, not the log file? –  norbert Nov 3 '12 at 2:20
show 3 more comments

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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