# TeX Live: “(lua): Not Enough Memory” | Chinese Fonts

• I have a freshly installed and updated TeX Live system.
• I want to compile a simple LuaLaTeX document containing Chinese characters (see below, not a MWE, just for illustration).
• During the compilation I get the error ! error: (lua): not enough memory (my system has 32 GB, LuaLatex only seems to use about 1.5 GB during compilation).
• The same document worked fine using MiKTeX (also took long).
• If I remove some of the fonts, then it compiles.

My research only revealed this old related question: Will TeXLive 2014 be 64 bit? - is this still the way to go or is there some config parameter that I can tweak?

% For background see https://tex.stackexchange.com/questions/499910
\documentclass{article}
\usepackage[pinyin,australian]{babel}

\babelprovide[main,import,language=Default]{australian}
\babelprovide[import,language=Chinese Simplified]{chinese-simplified}
\babelprovide[import,language=Chinese Traditional]{chinese-traditional}

\babelfont{rm}{Noto Serif}
\babelfont{sf}{Noto Sans}
\babelfont[chinese-simplified]{rm}{Noto Serif CJK SC}
\babelfont[chinese-simplified]{sf}{Noto Sans CJK SC}
\babelfont[chinese-traditional]{rm}{Noto Serif CJK TC}
\babelfont[chinese-traditional]{sf}{Noto Sans CJK TC}

\begin{document}

\section{Roman Family}

Australian English.
\foreignlanguage{chinese-simplified}{汉语。}
\foreignlanguage{chinese-traditional}{漢語。}
\foreignlanguage{pinyin}{Pīnyīn.}
\renewcommand*{\familydefault}{\sfdefault}
\sffamily

\section{Sans Serif Family}
Australian English.
\foreignlanguage{chinese-simplified}{汉语。}
\foreignlanguage{chinese-traditional}{漢語。}
\foreignlanguage{pinyin}{Pīnyīn.}

\end{document}

The following code works (fonts removed):

\documentclass{article}
\usepackage[pinyin,australian]{babel}

\babelprovide[main,import,language=Default]{australian}
\babelprovide[import,language=Chinese Simplified]{chinese-simplified}

\babelfont{rm}{Noto Serif}
\babelfont{sf}{Noto Sans}
\babelfont[chinese-simplified]{rm}{Noto Serif CJK SC}

\begin{document}

\section{Roman Family}

Australian English.
\foreignlanguage{chinese-simplified}{汉语。}

\end{document}

## Update 1: The 64 bit stuff on CTAN

https://www.ctan.org/tex-archive/systems/win32/w32tex/TLW64

## Update 3: Now it works

• I suspect you would be better to ask on luatex list, you can probably supply the developers with your full test off list and they would be able to run it under a debugger and see what it's doing – David Carlisle Jul 19 '19 at 19:28
• @DavidCarlisle Thanks. I am not sure, I never used such a "list" :). – Dr. Manuel Kuehner Jul 19 '19 at 19:29
• I use the 64bit cygwin texlive for all tex use, so no. – David Carlisle Jul 19 '19 at 19:31
• @DavidCarlisle this is a known issue: some fonts are so large that you need a 64 bit luatex to create the lua/luc for the font. In 32bit system it fails for me too (an in the 64 bit system it takes quite some time ...). – Ulrike Fischer Jul 19 '19 at 20:20
• you can copy the generated luc/lua-files over to the 32bit system, then it will work there too. – Ulrike Fischer Jul 19 '19 at 20:26