# 5 year time bomb in LaTeX-Distributions?

There is a very weird thing: Five years after installation or release, TeX in various distributions seems to refuse to compile for no other reason than being old.

We've had a question here this morning: Lyx suddenly stopped working, completely lost

but there were more in TeX.se: LaTeX sourcefiles older than 5 years old. XeLaTeX fails

And have a look at this blogpost: http://blog.eddsn.com/2011/06/latex-source-files-more-than-5-years-old/ There are hundreds of people giving thanks to the blogger.

Can it really be the case that various TeX-Distributions are so evil to stop working for no other reason than being more than five years old?

Please, can anybody who understands TeX go and find out what has happend in those cases? If my assumption were true, this would be a really big, big minus for TeX & Friends which should be corrected.

-
TeX hasn't changed in, what, over 30 years? Same goes for plain-tex. So maybe when you say "TeX", could you change that to "LaTeX" or something more appropriate? Thanks. :-) –  morbusg Jul 10 '12 at 11:02
@morbusg Well, there have been updates to TeX and the plain format since it was released :-) Knuth does fix issues, but there are very few now so change is very rare. –  Joseph Wright Jul 10 '12 at 11:31
The latex kernel contains a "5-years-test". But the current question and also the blog you quoted refers to miktex 2.8, which has been released in 2009 and has an update manager. I do find it unprobable that it uses an overdued latex.ltx. Also the latex.ltx I found in an old 2.7 is from 2009/09/24 and surrounds the test with \iffalse...\fi. Imho there is something else wrong. –  Ulrike Fischer Jul 10 '12 at 12:28
@Joseph: yeah, I know, just wanted to point out misattribution in this particular case. (BTW, I was surprised to see that the latest update was as recent as 2008!) –  morbusg Jul 10 '12 at 13:53

No, TeX distributions don't cease to work.

Yes, LaTeX used to have a protection mechanism for suggesting users to update their LaTeX kernel. In the first years after the release of LaTeX2e, yearly updates were issued and there was a check whether the kernel is older than five years.

Such a check is performed only at format creation and it's sufficient to go past the error message hitting return in order that the format is created anyway. The check has been disabled with the 2010 maintenance release, IIRC.

However, a TeX distribution that contains a five year old LaTeX kernel is irremediably outdated and should be updated.

Here's the relevant code from ltvers.dtx:

% Check that the format being made is not too old.
% The error message complains about more than 5 years'
% but in fact the error is not triggered until 65 months.
%
% This code is currently not activated as we don't know if we already
% got to the last official 2e version (due to staff shortage or due to
% a successor (think positive:-)).
% \changes{v1.0i}{2001/06/04}{Check for old format disabled}
% \changes{v1.0k}{2004/01/28}{Check for old format made 5 years (pr/3601)}
% \changes{v1.0l}{2009/09/24}{Stop checking for old format}
%    \begin{macrocode}
\iffalse
\def\reserved@a#1/#2/#3\@nil{%
\count@\year
\multiply\count@ by 12\relax
\expandafter\reserved@a\fmtversion\@nil
%    \end{macrocode}
% |\count@| is now the age of this file in months. Take a generous
% definition of year' so this message is not generated too often.
%    \begin{macrocode}
\ifnum\count@>65
\typeout{^^J%
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
!  You are attempting to make a LaTeX format from a source file^^J%
!  That is more than five years old.^^J%
!^^J%
!  If you enter <return> to scroll past this message then the format^^J%
!  before continuing to build LaTeX.^^J%
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^^J%
}
\errhelp{To avoid this error message, obtain new LaTeX sources.}
\errmessage{LaTeX source files more than 5 years old!}
\fi
\let\reserved@a\relax
\fi
%    \end{macrocode}


In a very old LaTeX kernel I found on my disk (2001/06/01), the check was inactive (but had 30 months instead of 65). From the change annotations we can deduce that in 2004 the bonus period was raised from two to five years, but at the end of these five years the kernel was considered sufficiently stable to allow for disabling the check again.

Thus only kernels dated before 2009/09/24 are affected. But, as I said before, having a kernel dated before 2007/06/30 means that the LaTeX system distributed with it is really outdated.

As Joseph Wright comments there is no magic trick for avoiding the check during format compilation other than acting on the computer's clock, changing the year to 2009 before starting format compilation; then the clock can be reset to the current date.

-
The five year life made sense in 1993, when updates were much less easy to carry out and there was more to fix, so a 'reminder' made sense. Now it does not, but for historical systems there is no way to 'magically' fix the code! –  Joseph Wright Jul 10 '12 at 12:02
@egreg Thank you very much for that professional answer. Have you seen Ulrikes comment to my question? –  Keks Dose Jul 10 '12 at 19:27
@KeksDose Yes; I'm divided into considering this a bug (or, better, an oversight) or a good thing to do when LaTeX2e was issued. I lean towards the latter, though: LaTeX is much more complex than Plain TeX (which has changed over time) and there have been important bug fixes in the time from 1993 to, more or less, 2000. Why people update their operating system, but think that LaTeX doesn't need updating? Yes, it's stabler than most pieces of software around but not perfect. –  egreg Jul 10 '12 at 19:35

You are entirely right that this is an intentional time-bomb to encourage updating, except that, as noted above, it is a feature of the LaTeX2e kernel and not TeX itself. I also agree with you 100% that this is nowadays a horribly bad idea, and if I were in charge of the project I would consider it a critical, showstopping bug.

(Disclaimer: I am biased, having myself been bitten by this in systems that we assemble for money that contain a report-making component, and which for various reasons run unattended and without online connection. After recovering from my apoplectic fit, I simply disarmed the \errmessage and recreated our custom TeX mini-distribution. All the bug fixes in the world aren't worth the risk of changing behaviour of something you already know to work well for your purposes.)

-
Indeed the "bug" was fixed; but in a later release than you install on those machines. –  egreg Jul 10 '12 at 18:03
Ironically, one of the reasons this happened was because there were so few changes to make to latex.ltx that the regular (six-monthly, later yearly) updates ceased, so people ran into the 'sunset time'. It was a pretty easy decision by the team to remove it. (Although I'm on the team, I have almost nothing to do with any discussions of LaTeX2e in this sense, but on this one it was easy to take a sensible position.) –  Joseph Wright Jul 10 '12 at 18:58
@Kilian Thank you very much for your clear statement! Yesss, I agree with you; being a lawyer who turns pale by the thought of a all of a sudden stopping system. I had that once, last year, when the former maintainer of the Libertine package published an update, which broke pdflatex, and then, after a shitstorm, left the project. But I updated and therefore I knew where to look! –  Keks Dose Jul 10 '12 at 19:15
Calling it a critical bug is wildly overstating the problem. Firstly of course it isn't a bug, simply a different design choice. Secondly it's not a "time bomb" it's more like a gentle slap on the wrist. It doesn't stop you building the format it just suggests that you might consider updating. If working interactively you just need to hit return, if working in a batch context run in \batchmode for the same affect. As noted in @egreg's reply whether the warning is in, and how long the time period is have varied over the years depending on the judgement at the time. –  David Carlisle Jul 10 '12 at 21:52