# Debugging TikZ and PGFPlots compatibility issue

I just tried to compile an old TikZ code (which as far as I recall compiled perfectly in the past and was not changed in the meanwhile) and I faced some serious compilation issues related to TikZ.

The last few lines of log are:

``````Package pgfplots: loading complementary code for your PGF version...

(/usr/local/texlive/2012/texmf-dist/tex/generic/pgfplots/oldpgfcompatib/pgfplot
soldpgfsupp_misc.code.tex
! Undefined control sequence.
l.236 ...e\let\pgfutil@next\relax\fi \pgfutil@next
}
``````

Little googling around pointed that the problem might be some incompatibility between TikZ elements on my system. Since, as far as I recall, I didn't change my code and it compiled in the past, I believe that the problem indeed relates to my installation of TikZ. I'm using `MacTeX` on a Snow Leopard Mac OS, and I installed the CVS version of TikZ in my home directory. It seems, however, that `pdflatex` uses the older version of TikZ which is to be found in `/usr/local/texlive/2012`.

I don't really know where to start and debug this issue. For the reference the complete log file is here.

How can I fix the installation of TikZ? Is it correct behavior that TikZ uses code from both the main installation of `texlive` and from my local installation? If this question fails (and it is I guess a border case) to be valid to TeX.SE, then I hope you can at least point me to sources/places where I can get some help with this.

-
Looking at your log, you are using the CVS version of TikZ/PGF but the TL version of pgfplots. There is a test in the `pgfplots` code which looks for a certain command to decide whether or not the PGF version is correct. It would appear that this is not passing the test. I don't know why, but that is where to start looking. The file with the test in it is: pgfplotsoldpgfsupp_loader.code.tex –  Loop Space Jan 23 '13 at 9:52
@AndrewStacey This makes lots of sense - I do not recall any manual installation of `pgfplots`. However, this is somehow still too cryptic for me. –  Dror Jan 23 '13 at 10:34
Given that you've updated TikZ/PGF, how about also updating PGFPlots? That might fix the issue without needing an in depth analysis of the files. –  Loop Space Jan 23 '13 at 10:36
It seems like my PGFPlots was updated (without any manual tweaking), but the TikZ was not the latest. I updated TikZ and it seems to solve the issue. –  Dror Jan 23 '13 at 11:06

It seems like the problem was some mixture of version of `PGFPlots` and of `TikZ`. I updated `TikZ` manually to the latest version (here, 04.11.2012) - before hand I had the release from August 2012. The `PGFPlots` version that I have installed (via the normal TeX Live Utility updates) is 1.7.

Now, together it works again fine.

-