From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Akira Yokosawa <akiyks@gmail.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 00/11] Fix PDF doc builds on major distros
Date: Sun, 17 Aug 2025 15:45:44 +0200 [thread overview]
Message-ID: <20250817154544.78d61029@foz.lan> (raw)
In-Reply-To: <b3d97e98-121d-4d12-9624-3efd119b12a4@gmail.com>
Em Sun, 17 Aug 2025 21:24:49 +0900
Akira Yokosawa <akiyks@gmail.com> escreveu:
> On Sun, 17 Aug 2025 13:36:06 +0200, Mauro Carvalho Chehab wrote:
> > Em Sun, 17 Aug 2025 18:46:35 +0900
> > Akira Yokosawa <akiyks@gmail.com> escreveu:
> >
> >> [-CC: bpf@vger]
> >>
>
> [...]
>
> >> I couldn't see what you are talking about at first, because there
> >> have not been any such issues reported.
> >
> > Heh, as you reported, you had troubles building pdf on Debian/Ubuntu.
> > That's mainly why I took some time finding issues and writing this
> > series. Basically, just fixing ImageMagick permissions didn't fix
> > everything, as, at least with the Sphinx versions used at the tests
> > got troubles with Sphinx hyphernation, which required a Polish font.
> >
> > Debian LaTeX packages seem to have issues with that. Fedora and
> > other rpm-based distros built it fine.
> >
> > Now, reproducing such bugs could be tricky, specially with LaTeX,
> > which is a complex tool with lots of system-specific stuff.
> >
> > Eventually, this could be related to LANG/LANGUAGE/LC_ALL/...
> > env vars. Here, I'm using lxc-attach to bind to the container.
> > It doesn't run .bashrc nor set locale vars, and it seems to keep
> > some env vars from the host. In the specific case of LANG,
> > it doesn't set anything. So, my test script sets LANG and LC_ALL
> > to "C". The host has it set to LANG=pt_BR.UTF-8.
> >
> >> Also, after applying 1/11 ... 4/11 on top of current docs-next
> >> (commit 0bbc2548ea85 ("Merge branch 'pre-install' into docs-mw"),
> >> despite the changelog of 5/11 which claims to fix an issue under
> >> debian, I couldn't reproduce the "! Corrupted NFSS tables" error
> >> under Ubuntu 24.04 (noble).
> >
> > Maybe you could try set LANG/LC_ALL to "C".
> >
> > I tested it on the following lxc containers (picked from lxc
> > download repositories):
> >
> > # APT-based (Debian/Ubuntu-like)
> > debian:
> > release: "bookworm"
> > pre_setup_cmds: *apt_pkg_cmd
> > post_setup_cmds:
> > - "systemctl enable ssh"
> > pkg_cmd: *apt_pkg_cmd
> >
> > devuan:
> > release: "daedalus"
> > pkg_cmd: *apt_pkg_cmd
> >
> > kali:
> > release: "current"
> > pkg_cmd: *apt_pkg_cmd
> >
> > mint:
> > release: "wilma"
> > pkg_cmd: *apt_pkg_cmd
> >
> > ubuntu:
> > release: "plucky"
> > pkg_cmd: *apt_pkg_cmd
> >
> > ubuntu-lts:
> > dist: "ubuntu"
> > release: "noble"
> > pkg_cmd: *apt_pkg_cmd
> >
> > apt_pkg_cmd: &apt_pkg_cmd
> > - "sudo locale-gen"
> > - "sudo dpkg-reconfigure --frontend=noninteractive locales"
> > - "apt-get update && apt-get install -y openssh-server git python3 make"
> > - |
> > if [ -f /etc/ImageMagick-6/policy.xml ]; then
> > # Remove any existing restrictive policies for PDF/PS/EPS/XPS
> > sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-6/policy.xml
> > # Allow PDF patterns at the end </policymap>
> > sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />' /etc/ImageMagick-6/policy.xml
> > fi
> > - |
> > if [ -f /etc/ImageMagick-7/policy.xml ]; then
> > # Remove any existing restrictive policies for PDF/PS/EPS/XPS
> > sed -i '/<policy.*domain="coder".*pattern=".*\(PDF\|PS\|EPS\|XPS\).*"/d' /etc/ImageMagick-7/policy.xml
> > # Allow PDF patterns at the end </policymap>
> > sed -i '/<\/policymap>/i \ \ <policy domain="coder" rights="read|write" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />' /etc/ImageMagick-7/policy.xml
> > fi
> >
> > Packages are installed according using sphinx-pre-install
> > instructions.
> >
> > I don't remember what of those got the corrupted tables LaTeX warning,
> > but I got it on more than one Debian-based distro. When I wrote the
> > fix, I guess I logged at the Debian container.
> >
>
> That explains! I've stopped using ImageMagick all together.
>
> So it sounds to me like there is some issue in debian/ubuntu/...'s
> ImageMagick packaging, probably its build config disables some
> aspect of SVG --> PDF support for security concerns (???).
> I'm not sure at all.
>
> I think it has nothing to do with XeLaTeX font discovery and I don't
> see any reason to apply 5/11, at least for the time being.
>
> My suggestion would be to give up ImageMagick and install Inkscape
> instead. It is provided as a deb package for debian and its derivatives.
The corrupted table error happened with very simple PDF files and has
nothing to do with image generation.
It rises even with very simple PDF targets like this:
make SPHINXDIRS=peci pdfdocs
Which produces \sphinxhyphen{} inside peci.tex, like this one:
controller is acting as a PECI originator and the processor \sphinxhyphen{} as
Basically, if this is included, directly or indirectly at the
.tex file:
\usepackage[T1]{fontenc}
the fonts from T1 fontset aren't UTF-8 compatible, causing troubles
with xelatex. The fixes on this series solved some corner cases, where
babel tries to include it and use a Polish font (pzdr.tfm) to
handle hyphenation.
Such issue likely depends on Sphinx versions (as it is related to a
sphinx-specific macro) and what LaTeX packages are installed at
the system (fonts, babel, polygrossia).
Regards,
Mauro
next prev parent reply other threads:[~2025-08-17 13:45 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 11:36 [PATCH 00/11] Fix PDF doc builds on major distros 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-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 ` [PATCH 00/11] Fix PDF doc builds on major distros Akira Yokosawa
2025-08-16 11:55 ` 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 [this message]
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=20250817154544.78d61029@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.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;
as well as URLs for NNTP newsgroup(s).