mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: mchehab+huawei@kernel.org
Cc: bpf@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH 00/11] Fix PDF doc builds on major distros
Date: Sat, 16 Aug 2025 14:06:43 +0900	[thread overview]
Message-ID: <773f4968-8ba5-4b1a-8a28-ff513736fa64@gmail.com> (raw)
In-Reply-To: <cover.1755256868.git.mchehab+huawei@kernel.org>

[-CC most folks]

Hi Mauro,

On Fri, 15 Aug 2025 13:36:16 +0200, Mauro Carvalho Chehab wrote:
> Hi Jon,
> 
> This series touch only on three files, and have a small diffstat:
> 
>    Documentation/Makefile     |    4 -
>    Documentation/conf.py      |  106 +++++++++++++++++++++----------------
>    scripts/sphinx-pre-install |   41 +++++++++++---
>    3 files changed, 96 insertions(+), 55 deletions(-)
> 
> Yet, it took a lot of my time.  Basically, it addresses lots of problems  related
> with building PDF docs:
> 
> - Makefile has a wrong set of definitions for paper size. It was
>   using pre-1.7 Sphinx nomenclature for some conf vars;
> - The LaTeX options a conf.py had lots of issues;
> - Finally, some PDF package dependencies for distros were wrong.
> 
> I wrote an entire testbench to test this and doing builds on every
> platform mentioned at sphinx-pre-install. 
> 
> After the change *most* PDF files are built on *most* platforms. 
> 
> 
> Summary
> =======
>   PASSED - AlmaLinux release 9.6 (Sage Margay) (7 tests)
>   PASSED - Amazon Linux release 2023 (Amazon Linux) (7 tests)
>   FAILED - archlinux (1 tests)
>   PASSED - CentOS Stream release 9 (7 tests)
>   PARTIAL - Debian GNU/Linux 12 (7 tests)
>   PARTIAL - Devuan GNU/Linux 5 (7 tests)
>   PASSED - Fedora release 42 (Adams) (7 tests)
>   PARTIAL - Gentoo Base System release 2.17 (7 tests)
>   PASSED - Kali GNU/Linux 2025.2 (7 tests)
>   PASSED - Mageia 9 (7 tests)
>   PARTIAL - Linux Mint 22 (7 tests)
>   PARTIAL - openEuler release 25.03 (7 tests)
>   PARTIAL - OpenMandriva Lx 4.3 (7 tests)
>   PASSED - openSUSE Leap 15.6 (7 tests)
>   PASSED - openSUSE Tumbleweed (7 tests)
>   PARTIAL - Oracle Linux Server release 9.6 (7 tests)
>   FAILED - Red Hat Enterprise Linux release 8.10 (Ootpa) (7 tests)
>   PARTIAL - Rocky Linux release 8.9 (Green Obsidian) (7 tests)
>   PARTIAL - Rocky Linux release 9.6 (Blue Onyx) (7 tests)
>   FAILED - Springdale Open Enterprise Linux release 9.2 (Parma) (7 tests)
>   PARTIAL - Ubuntu 24.04.2 LTS (7 tests)
>   PASSED - Ubuntu 25.04 (7 tests)
> 
> The failed distros are:
> 
> - archlinux. This is some problem on recent lxc containers. Unrelated
>   with pdf builds;
> - RHEL 8: paywall issue: some packages required by Sphinx require a repository
>   that it is not openly available. I might have using CentOS repos, but, as we're
>   already testing it, I opted not do do it;
> - Springdale 9.2: some broken package dependency.
> 
> Now, if you look at the full logs below, you'll see that some distros come with
> XeLaTeX or LaTeX troubles, causing bigger and/or more complex docs to
> fail. It is possible to fix those, but they depend on addressing distro-specific
> LaTeX issues like increasing maximum memory limits and maximum number
> of idented paragraphs.

No, the trouble is failed conversion of SVG --> PDF by convert(1) + rsvg-convert(1).
Failed conversions trigger huge raw SVG code to be included literally into LaTeX
sources, which results in code listings too huge to be rendered in a page; and
overwhelms xelatex.

IIUC, kfigure.py does such fallbacks of failed PDF conversions.  Mightn't it be
better to give up early in the latexdocs stage?

> It follows full results per distro.

[Ignoring lengthy list of results...]

I think all you need to test build against are the limited list of:

    - arch.pdf
    - core-api.pdf
    - doc-guide.pdf
    - gpu.pdf
    - i2c.pdf
    - RCU.pdf
    - translations.pdf
    - userspace-api.pdf

All of them have figures in SVG, and latexdocs tries to convert them
into PDF.

Probably, recommending Inkscape rather than ImageMagick would be the right
thing, at least where it is provided as a distro package.

Regards,
Akira


  parent reply	other threads:[~2025-08-16  5:19 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 11:36 Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 01/11] docs: Makefile: Fix LaTeX paper size settings Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 02/11] docs: conf.py: better handle latex documents Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 03/11] docs: conf.py: fix doc name with SPHINXDIRS Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 04/11] docs: conf.py: rename some vars at latex_documents logic Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 05/11] docs: conf.py: fix some troubles for LaTeX output Mauro Carvalho Chehab
2025-08-20  8:16   ` Akira Yokosawa
2025-10-02 16:30     ` ChaosEsque Team
2025-08-15 11:36 ` [PATCH 06/11] scripts: sphinx-pre-install: fix PDF build issues on Ubuntu Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 07/11] scripts: sphinx-pre-install: add missing gentoo pdf dependencies Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 08/11] scripts: sphinx-pre-install: fix PDF dependencies for openSuse Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 09/11] scripts: sphinx-pre-install: fix dependencies for OpenMandriva Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 10/11] scripts: sphinx-pre-install: fix pdf dependencies for Mageia 9 Mauro Carvalho Chehab
2025-08-15 11:36 ` [PATCH 11/11] scripts: sphinx-pre-install: fix PDF dependencies for gentoo Mauro Carvalho Chehab
2025-08-16  5:06 ` Akira Yokosawa [this message]
2025-08-16 11:55   ` [PATCH 00/11] Fix PDF doc builds on major distros Mauro Carvalho Chehab
2025-08-17  9:46     ` Akira Yokosawa
2025-08-17 11:36       ` Mauro Carvalho Chehab
2025-08-17 12:24         ` Akira Yokosawa
2025-08-17 13:45           ` Mauro Carvalho Chehab
2025-08-17 16:07             ` Akira Yokosawa
2025-08-18  0:44               ` Akira Yokosawa
2025-08-18  9:42                 ` Mauro Carvalho Chehab
2025-08-18 10:06                   ` Akira Yokosawa
2025-08-18 11:35                     ` Mauro Carvalho Chehab
2025-08-18 12:00                       ` Akira Yokosawa
2025-08-18 17:07               ` Jonathan Corbet
2025-08-18 23:26                 ` Akira Yokosawa
2025-08-19  1:02                   ` Mauro Carvalho Chehab
2025-08-19  2:16                     ` Akira Yokosawa
2025-08-19 13:32                       ` Mauro Carvalho Chehab
2025-08-19 23:54                         ` Akira Yokosawa
2025-08-20  7:15                           ` Mauro Carvalho Chehab
2025-08-20 11:41                             ` Akira Yokosawa
2025-08-20 16:48                               ` Mauro Carvalho Chehab
2025-08-20 23:53                                 ` Akira Yokosawa
2025-08-21  0:09                                   ` Akira Yokosawa
2025-08-21  7:52                                     ` Mauro Carvalho Chehab
2025-08-21  7:56                                       ` Mauro Carvalho Chehab
2025-08-21  9:12                                     ` Inkscape - Was: " Mauro Carvalho Chehab
2025-08-18 16:59       ` Jonathan Corbet
2025-08-17 15:32 ` Vegard Nossum
2025-08-18  8:33   ` Mauro Carvalho Chehab

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=773f4968-8ba5-4b1a-8a28-ff513736fa64@gmail.com \
    --to=akiyks@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab+huawei@kernel.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®