# TikZ Externalize fails with multiple files [closed]

I've recently been having trouble getting TikZ to compile figures. I say recently, because a month ago, I wasn't having any problems. I'm not aware of any file corruption or updates that would have caused a change, and I'm at a loss as to what is causing this problem. (I've tried reinstalling the modules, so the source of the problem is more insidious.)

Here's the problem:

After fixing a problem with the auxlock file used by tikzexternalize (see this question), I am continuing to have trouble with this feature. I should note that if I disable externalization, I am having no trouble at all, except that, for long documents, the compile times become ludicrously long (hence, my desire to use externalize).

The error I receive is that lualatex has segfaulted during the convert-with-system-call, and PDF output has failed to generate.

I should also note that, if I prepare trivial plots, I have no problem. I'm not sure that its practical to create a MWE for this problem, since to some extent, it depends on conflicts specific to my project. (I have for instance, already discovered a conflict between TikZ and enumerate, also mentioned here.)

I recently limped my way through the compile process by creating a minimal script to contain the all the TikZ inputs I'm using and uncommenting them one at a time. You see, it seems that something is wrong with the optimization routine that isn't allowing tikzpictures to be skipped appropriately. If, however, the figure is already compiled and has a pdf, the skipping works as it should. This means that, in order to compile all the figures, I have to comment out all TikZ references after the one being compiled. This is a tedious process for more than a few figures.

Once the figures are compiled, they slide seamlessly into my main document. But since TikZ externalize is successfully integrating externalized images, and TikZ is compiling fine when externalization is invoked, and TikZ externalize even creates images successfully as long as no other TikZ image to be rendered is present, I am truly baffled as to how it fails when an ordinary document with multiple TikZ references is compiled.

I apologize that this question isn't clearer, but the nature of the problem is quite opaque to me. If there are any useful details I can provide, I would be happy to provide them.

-

## closed as too localized by Joseph Wright♦Aug 6 '12 at 20:43

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

I am author and maintainer of the external lib. I am unaware of problems of this sort. Especially segfaults are "hard to produce" by means of TeX. Perhaps it is a bad reaction of luatex to unexpected things done by the external lib. Have you tried pdflatex? (Can you use pdflatex at all?) Do you have multiple tikzpictures with the same filename? perhaps you can try to create a zip containing enough information to reproduce the problem - and send it to me by email (the pgfplots manual should have my address). –  Christian Feuersänger May 27 '12 at 7:30
I have sent a non-working example. –  KDN May 29 '12 at 21:36
This seems to have been related to using an old version of luatex (0.50) with newer versions of gnuplot. An update to luatex-0.70 has resolved this issue. –  KDN Jun 13 '12 at 14:06