Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest texlive packages under Ubuntu 24.10 (Oracular Oriole) fail to compile std.tex #7576

Open
zaitseff opened this issue Jan 19, 2025 · 2 comments

Comments

@zaitseff
Copy link

zaitseff commented Jan 19, 2025

The latest texlive packages, version 2024.20240401, under Ubuntu 24.10 (Oracular Oriole) fail to compile std.tex. In particular, running the following sequence of commands stops with an error:

git clone https://github.com/cplusplus/draft.git
cd draft/source
make

Running that sequence under texlive 2024.20240401 gives:

... [output trimmed -- see attached log file]
) (./styles.tex) (./macros.tex
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstlang1.sty)
(/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty)) (./tables.tex)
Started index file generalindex
Started index file grammarindex
Started index file headerindex
Started index file libraryindex
Started index file conceptindex
Started index file impldefindex
Writing glossary file xrefindex.glo 
Writing glossary file xrefdelta.glo 
(./std.aux)
isodate: babel.sty has been loaded
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)

! LaTeX Error: Loading a class or package in a group.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.95 \begin{document}
                     
?

At this point, entering H and pressing Enter gives:

Classes and packages should only be loaded at the top level

I have not debugged this problem further at this time, although I will try to do so. A quick Internet search suggests that, with the newer version of texlive, \RequirePackage or \usepackage, or in this case \begin{document}, inside a \begingroup is what causes this error (see, for example, the first response to this question on StackExchange).

Attached is the std.log file after typing X to exit.

@zaitseff
Copy link
Author

By the way, I filed this bug as sooner or later your CI environment will also move to a version of TeXLive that will enforce the same restrictions!

@jensmaurer
Copy link
Member

jensmaurer commented Jan 22, 2025

The following patch hacks around the hard error for now:

--- latex.ltx-orig      2024-12-12 23:09:51.401480650 +0100
+++ latex.ltx   2024-12-14 22:40:42.590609752 +0100
@@ -16926,9 +16926,8 @@
   #2}
 \def\@fileswithoptions#1{%
     \ifnum\currentgrouplevel>\z@
-     \@latex@error
-      {Loading a class or package in a group}%
-      {Classes and packages should only be loaded at the top level}%
+     \@latex@warning
+      {Loading jmaurer-XA1 a class or package in a group}%
   \fi
   \@ifnextchar[%]
     {\@fileswith@ptions#1}%

Then, recreate the .fmt files using "fmtutil -sys --all". Double-check the .fmt files have been updated with "find /var/lib/texmf/web2c -name "*.fmt" -ls"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants