[Tex/LaTex] 5 year time bomb in LaTeX-Distributions

distributionslatex-misc

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.

Best Answer

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
  \advance\count@-#1\relax
  \multiply\count@ by 12\relax
  \advance\count@\month
  \advance\count@-#2\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%
!  will be built, but please consider obtaining newer source files^^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.

Related Question