-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Failure affecting 2 French sites: "Latexmk: Errors, so I did not complete making targets" #187
Comments
A fr/3.13 build happened to be running now and there's this matching the warnings above: hugovk@docs:/srv/docsbuild/cpython/Doc/build$ grep -r "multiply def"
latex/library.log:LaTeX Warning: Label `library/string:grammar-token-format_spec' multiply define
latex/library.log:LaTeX Warning: Label `library/tkinter.ttk:layouts' multiply defined. I'm not sure if they're the errors causing it to fail, but are a good place to start. "multiply defined" means "defined multiple times". |
This also seems suspicious? Is there more detail in the log file? A |
Here's the whole library.log, assuming it's referring to this one. This is the contents of the
|
Not sure if it's you or GitHub but the logs seem truncated. Can you confirm that there are 5049 lines? By the way, I don't think the issue is with the labels being redefined. Normally, labels being redefined are only warnings and shouldn't affect the build. |
Yes, this is how long the copy is on the server: hugovk@docs:~$ wc -l fr-3.13-latex/latex/library.log
5048 fr-3.13-latex/latex/library.log
hugovk@docs:~$ ll fr-3.13-latex/latex/library.log
-rw-rw---- 1 hugovk hugovk 122880 Aug 12 15:41 fr-3.13-latex/latex/library.log |
fr/3.13 now has another error: 2024-09-17 15:17:53,682 ERROR fr/3.13: Run: "make -C /srv/docsbuild/cpython/Doc PYTHON=/srv/docsbuild/venv-3.13/bin/python SPHINXBUILD=/srv/docsbuild/venv-3.13/bin/sphinx-build BLURB=/srv/docsbuild/venv-3.13/bin/blurb VENVDIR=/srv/docsbuild/venv-3.13 'SPHINXOPTS=-D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{fontspec} -q -D locale_dirs=/srv/docsbuild/3.13/locale -D language=fr -D gettext_compact=0' SPHINXERRORHANDLING= autobuild-dev" KO:
'pdflatex' needed too many passes
----------------------
Latexmk: Sometimes, the -f option can be used to get latexmk
to try to force complete processing.
But normally, you will need to correct the file(s) that caused the
error, and then rerun latexmk.
In some cases, it is best to clean out generated files before rerunning
latexmk after you've corrected the files.
Latexmk: Summary of warnings from last run of *latex:
Latex found 2 multiply defined reference(s)
=====Latex reported missing or unavailable character(s).
=====See log file for details.
make[2]: *** [Makefile:29: library.pdf] Error 12
make[2]: Leaving directory '/srv/docsbuild/cpython/Doc/build/latex'
make[1]: *** [Makefile:226: dist] Error 2
make[1]: Leaving directory '/srv/docsbuild/cpython/Doc'
make: *** [Makefile:289: autobuild-dev] Error 2
make: Leaving directory '/srv/docsbuild/cpython/Doc'
2024-09-17 15:17:53,687 ERROR fr/3.13: Badly handled exception, human, please help.
Traceback (most recent call last):
File "/srv/docsbuild/scripts/build_docs.py", line 655, in run
self.copy_build_to_webroot(http)
File "/srv/docsbuild/scripts/build_docs.py", line 762, in build
run(
File "/srv/docsbuild/scripts/build_docs.py", line 247, in run
File "/usr/lib/python3.10/subprocess.py", line 457, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['make', '-C', '/srv/docsbuild/cpython/Doc', 'PYTHON=/srv/docsbuild/venv-3.13/bin/python', 'SPHINXBUILD=/srv/docsbuild/venv-3.13/bin/sphinx-build', 'BLURB=/srv/docsbuild/venv-3.13/bin/blurb', 'VENVDIR=/srv/docsbuild/venv-3.13', 'SPHINXOPTS=-D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{fontspec} -q -D locale_dirs=/srv/docsbuild/3.13/locale -D language=fr -D gettext_compact=0', 'SPHINXERRORHANDLING=', 'autobuild-dev']' returned non-zero exit status 2. However, https://docs.python.org/fr/3.14/ has now recovered: "Mis à jour le Sep 17, 2024 (10:36 UTC)." Its last error was also (fr/3.12 is still building fine.) |
Some hypotheses:
Now, do the logs have some "LaTeX Error" message? Have you tried using xelatex instead of pdflatex? (why is it saying pdflatex but you are specifying xelatex as the engine????) because I think that the regex section requires xelatex because of a special character somewhere in the document. |
No "LaTeX Error" in the logs. Here's the whole fr/3.13 part: 2024-09-18 16:19:13,943 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/cpython fetch'
2024-09-18 16:19:14,144 INFO fr/3.13: Running.
2024-09-18 16:19:14,144 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/cpython show-ref -s origin/3.13'
2024-09-18 16:19:14,148 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/cpython reset --hard 112b1704fa6165ce6386ce2d9363fb73dd799de5 --'
2024-09-18 16:19:14,174 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/cpython clean -dfqx'
2024-09-18 16:19:14,188 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES fetch'
2024-09-18 16:19:14,506 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES branch -r'
2024-09-18 16:19:14,511 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES show-ref -s origin/3.11'
2024-09-18 16:19:14,514 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES reset --hard 2d42a3c0d181f19ab1bd62400bfafc9a8304a4b1 --'
2024-09-18 16:19:14,568 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES clean -dfqx'
2024-09-18 16:19:14,726 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/cpython rev-parse HEAD'
2024-09-18 16:19:14,729 DEBUG fr/3.13: Run: 'git -C /srv/docsbuild/3.13/locale/fr/LC_MESSAGES rev-parse HEAD'
2024-09-18 16:19:14,732 INFO fr/3.13: Should rebuild: new translations (from ceaeb373626e282ba17220752aa2c522fd046891 to 2d42a3c0d181f19ab1bd62400bfafc9a8304a4b1)
2024-09-18 16:19:14,732 DEBUG fr/3.13: Run: '/srv/docsbuild/venv/bin/python -m venv /srv/docsbuild/venv-3.13'
2024-09-18 16:19:17,377 DEBUG fr/3.13: Run: '/srv/docsbuild/venv-3.13/bin/python -m pip install --upgrade --upgrade-strategy=eager python-docs-theme jieba -rrequirements.txt'
2024-09-18 16:19:20,902 DEBUG fr/3.13: Run: '/srv/docsbuild/venv-3.13/bin/python -m pip freeze --all'
2024-09-18 16:19:21,494 INFO fr/3.13: Build start.
2024-09-18 16:19:21,494 INFO fr/3.13: Running make autobuild-dev
2024-09-18 16:19:21,494 DEBUG fr/3.13: Run: "sed -i 's/ *-A switchers=1//' /srv/docsbuild/cpython/Doc/Makefile"
2024-09-18 16:19:21,502 DEBUG fr/3.13: Run: "make -C /srv/docsbuild/cpython/Doc PYTHON=/srv/docsbuild/venv-3.13/bin/python SPHINXBUILD=/srv/docsbuild/venv-3.13/bin/sphinx-build BLURB=/srv/docsbuild/venv-3.13/bin/blurb VENVDIR=/srv/docsbuild/venv-3.13 'SPHINXOPTS=-D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{fontspec} -q -D locale_dirs=/srv/docsbuild/3.13/locale -D language=fr -D gettext_compact=0' SPHINXERRORHANDLING= autobuild-dev"
2024-09-18 16:49:43,031 ERROR fr/3.13: Run: "make -C /srv/docsbuild/cpython/Doc PYTHON=/srv/docsbuild/venv-3.13/bin/python SPHINXBUILD=/srv/docsbuild/venv-3.13/bin/sphinx-build BLURB=/srv/docsbuild/venv-3.13/bin/blurb VENVDIR=/srv/docsbuild/venv-3.13 'SPHINXOPTS=-D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{fontspec} -q -D locale_dirs=/srv/docsbuild/3.13/locale -D language=fr -D gettext_compact=0' SPHINXERRORHANDLING= autobuild-dev" KO:
'pdflatex' needed too many passes
----------------------
Latexmk: Sometimes, the -f option can be used to get latexmk
to try to force complete processing.
But normally, you will need to correct the file(s) that caused the
error, and then rerun latexmk.
In some cases, it is best to clean out generated files before rerunning
latexmk after you've corrected the files.
Latexmk: Summary of warnings from last run of *latex:
Latex found 2 multiply defined reference(s)
=====Latex reported missing or unavailable character(s).
=====See log file for details.
make[2]: *** [Makefile:29: library.pdf] Error 12
make[2]: Leaving directory '/srv/docsbuild/cpython/Doc/build/latex'
make[1]: *** [Makefile:226: dist] Error 2
make[1]: Leaving directory '/srv/docsbuild/cpython/Doc'
make: *** [Makefile:289: autobuild-dev] Error 2
make: Leaving directory '/srv/docsbuild/cpython/Doc'
2024-09-18 16:49:43,116 ERROR fr/3.13: Badly handled exception, human, please help.
Traceback (most recent call last):
File "/srv/docsbuild/scripts/build_docs.py", line 654, in run
self.build()
File "/srv/docsbuild/scripts/build_docs.py", line 762, in build
run(
File "/srv/docsbuild/scripts/build_docs.py", line 245, in run
result.check_returncode()
File "/usr/lib/python3.10/subprocess.py", line 457, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['make', '-C', '/srv/docsbuild/cpython/Doc', 'PYTHON=/srv/docsbuild/venv-3.13/bin/python', 'SPHINXBUILD=/srv/docsbuild/venv-3.13/bin/sphinx-build', 'BLURB=/srv/docsbuild/venv-3.13/bin/blurb', 'VENVDIR=/srv/docsbuild/venv-3.13', 'SPHINXOPTS=-D latex_engine=xelatex -D latex_elements.inputenc= -D latex_elements.fontenc=\\\\usepackage{fontspec} -q -D locale_dirs=/srv/docsbuild/3.13/locale -D language=fr -D gettext_compact=0', 'SPHINXERRORHANDLING=', 'autobuild-dev']' returned non-zero exit status 2.
2024-09-18 16:49:43,121 DEBUG fr/3.13: Starting new HTTPS connection (1): sentry.io:443
I've not tried changing anything, it has this in [languages.fr]
name = "French"
sphinxopts = [
'-D latex_engine=xelatex',
'-D latex_elements.inputenc=',
'-D latex_elements.fontenc=\\usepackage{fontspec}',
] |
This is really weird. In order to pinpoint the issue we may try to manually build the docs and see whether they fail (namely manually invoking make latex and possibly manually invoking the latex commands). There's a way to increase the number of passes but I don't remember the option. I'll try to first compile the library.tex file (or maybe one file at a time) when I'm back home (next week). By default I think latemk does 5 passes (which is also one reason why latex builds can take a long time). |
This by itself can not cause a LaTeX build failure (it would with It should first be checked if the English language build has the same. Latexmk by default will not end with positive return status when emitting such a thing. It is not the reason there is build failure.
this only indicates some usually minor problem
yes, agreed. Such latex warnings should be fixed but are not by themselves causing a build failure.
Unfortunately we can only deduce that the error occurred somewhere after page 250, probably on page 251, but this refers to output not input. And the problem is that contrarily to dvi/xdv format there can not be a partial pdf, if xelatex fails during pdf build, there is nothing at all. If latexmk is run with option -xelatex, it will make an xdv, which may still be validly processed by xdvipdfmx. Anyway, the sole way is to build locally as said by @picnixz.
5 passes is the default maximal number. But most documents require usually 3 or 4 passes only (3 being often a minimum).
This is due to some peculiarity (for legacy reasons of compatiblity with old Latexmk or other reasons now forgotten) of how Sphinx uses here Latexmk, the As @picnixz explains, the sole way to handle this is to recover the full build directory and (for example) add manually (I don't have much time myself and can only perhaps look at this in a few days, and after that I can't for at least 2 to 3 weeks). |
|
I did a local build using Sphinx 8.0.2 (as installed in the venv created by make venv) of library.pdf for the non-translated cpython project. Indeed a few duplicated labels and missing characters are reported:
Turns out
And rather curiously I find only one line starting with
The latex log file for build of library.pdf contains a number of Warnings:
The As per the Missing characters I can perhaps contribute a patch another day (too late here European time for me and busy) but it is a problem of finding fonts supporting them and using these fonts. The characters are ARABIC-INDIC DIGIT FOUR, TAMIL DIGIT FOUR, TELUGU DIGIT FOUR, and LAO DIGIT FOUR. Chances are the Missing characters are reported as such in most translated builds. This means the PDF will not display them correctly. |
Apologies for forgetting to mention I did this on 3.13 branch. And apologies for the partially off-topic report but I don't know off-hand the needed steps to test the French version, which is the main concern here, so I haven't done it. |
This is a simplified version of what docsbuild-scripts runs, which should work from the For reference, the full command is: A |
Thanks Adam! I git cloned So I went back to my clone of
The html was built, then CTRL-C because it was doing all builds, and I wanted only latex so I did
All went fine and I checked build/latex/library.tex did contains French translation, which it did. At last I am doing
My cpython is at My python-docs-fr is at The library.pdf does look partially French. Could it be that the partially parallel builds encounter an error with another file, which causes all builds to abort (and would explain also the partial I am doing that now, but will go for lunchbreak. After that I may have no time to check result until about 7PM EST. |
( |
Update: somewhat annoyingly, after spending a large proportion of today keeping an eye on the server to monitor for
Accordingly, https://docs.python.org/fr/3.13/index.html shows "Mis à jour le Sep 25, 2024 (13:37 UTC)." and https://docs.python.org/fr/3.13/archives/python-3.13.0rc2-docs-pdf-a4.zip is up-to-date. A |
Hooray! Thank you both for your investigations! |
Follow on from #186, the other 3 "Badly handled exception, human, please help" lines in yesterday's 24-hour log are caused by:
It's happening for three French builds, the 3.13 and 3.14 builds:
https://docs.python.org/fr/3.13/ and https://docs.python.org/fr/3.14/ were last updated on 8th August. fr/3.12 is building fine.
The text was updated successfully, but these errors were encountered: