kpathsea: TeX or Metafont failing
8.5.4 TeX or Metafont failing
-----------------------------
If TeX or Metafont get a segmentation fault or otherwise fail while
running a normal input file, the problem is usually a compiler bug
(unlikely as that may sound). Even if the trip and trap tests are
passed, problems may lurk. Optimization occasionally causes trouble in
programs other than TeX and Metafont themselves, too.
For a workaround, if you enabled any optimization flags, it's best to
omit optimization entirely. In any case, the way to find the facts is
to run the program under the debugger and see where it's failing.
Also, if you have trouble with a system C compiler, I advise trying
the GNU C compiler. And vice versa, unfortunately; but in that case I
also recommend reporting a bug to the GCC mailing list; see ⇒
(gcc)Bugs.
To report compiler bugs effectively requires perseverance and
perspicacity: you must find the miscompiled line, and that usually
involves delving backwards in time from the point of error, checking
through TeX's (or whatever program's) data structures. Good luck.