From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Masaharu Noguchi <nogunix@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Akira Yokosawa <akiyks@gmail.com>,
Chen Miao <chenmiao.ku@gmail.com>,
Bagas Sanjaya <bagasdotme@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] docs: sphinx-pre-install: warn about unsupported Docutils versions
Date: Mon, 14 Sep 2026 07:42:06 +0200 [thread overview]
Message-ID: <20260914074206.05579309@foz.lan> (raw)
In-Reply-To: <20260913-docs-sphinx-pre-install-docutils-v1-1-d923c769af91@gmail.com>
On Sun, 13 Sep 2026 12:13:23 +0900
Masaharu Noguchi <nogunix@gmail.com> wrote:
> Sphinx declares the range of Docutils versions it supports, but a
> distribution can relax that upper bound when it wants to ship a newer
> Docutils. The pair then installs happily, and htmldocs builds without
> a complaint, so nothing looks wrong until pdfdocs is run.
>
> Fedora 44 ships such a pair: Sphinx 8.2.3 (which declares
> "docutils>=0.20,<0.22") is patched to accept "<0.23" and is installed
> alongside Docutils 0.22.4. make pdfdocs then fails to produce four of
> its books. admin-guide runs out of TeX main memory 13 pages in:
>
> ! TeX capacity exceeded, sorry [main memory size=6000000].
> \sphinxafterbreak ->\copy \sphinxcontinuationbox
With some distros/versions, it is needed to change a config file
to use more memory. On Fedora, the limit is here:
$ grep main_memory /etc/texlive/web2c/texmf.cnf
% main_memory is relevant only to initex, extra_mem_* only to non-ini.
% Thus, have to redump the .fmt file after changing main_memory; to add
main_memory = 6000000 % words of inimemory available; also applies to inimf&mp
I haven't tested but it seems that there's a way to adjust it when
calling LaTeX:
https://tex.stackexchange.com/questions/7953/how-to-expand-texs-main-memory-size-pgfplots-memory-overload
If so, maybe a more interesting patch would be to adjust pdf generaion
to use a more reasonable memory limit, as 6GB sounds too little.
> while arch, core-api and translations stop on
>
> ! Dimension too large.
> \fb@put@frame ...p \ifdim \dimen@ >\ht \@tempboxa
> \end{sphinxVerbatim}
This is also another parameter that may require adjustments.
If I'm not mistaken, this is related to the maximum level depth
on titles. I had to change some limit from 7 to 9 on some distros
in the past. I don't remember exactly where.
On both cases, I don't think you can blame docutils or sphinx
version: those are distro-specific configuration parameters.
> Both come from the large literal blocks those books include whole --
> memory-barriers.txt, devices.txt, kernel-parameters.txt and
> arch/sparc/oradax/dax-hv-api.txt. Keeping everything else fixed and
> varying only the two versions shows that neither component is at fault
> on its own:
>
> sphinx docutils core-api admin-guide
> ------------------------------------------
> 8.1.3 0.21.2 ok ok
> 8.2.3 0.21.2 ok ok
> 8.2.3 0.22.4 FAILS FAILS
> 9.1.0 0.22.4 ok ok
>
> Sphinx gained Docutils 0.22 support in 9.0.0 and upstream decided not
> to backport it to 8.2.x [1], so this pair will stay broken rather than
> be fixed in a later 8.2 point release.
Upstream policy AFAICT is to not backport anything: once they release
a new major or minor, they stop maintaining the previous versions.
> Check for it, since sphinx-pre-install exists precisely to catch a
> documentation build environment that will not work. Ask the
> interpreter behind sphinx-build for its Docutils version -- a venv and
> the system install can differ -- and warn when Sphinx is older than
> 9.0.0 while Docutils is 0.22 or newer. Only warn: the build is left to
> proceed, and htmldocs is unaffected.
I don't mind having a warning, but I don't think you can blame
docutils or Sphinx versions on both cases, as the error is related
to LaTeX. It sounds to be this is actually a combination of those
three packages plus some distro-specific latex cfg settings on
some of the shipped files.
Thanks,
Mauro
next prev parent reply other threads:[~2026-09-14 5:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 3:13 Masaharu Noguchi
2026-09-14 4:56 ` Akira Yokosawa
2026-09-14 9:19 ` Masaharu Noguchi
2026-09-14 5:42 ` Mauro Carvalho Chehab [this message]
2026-09-14 9:52 ` Masaharu Noguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260914074206.05579309@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=chenmiao.ku@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nogunix@gmail.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®