GNU bug report logs - #52979
Modular texlive has problems finding fonts

Previous Next

Package: guix;

Reported by: Jelle Licht <jlicht <at> fsfe.org>

Date: Mon, 3 Jan 2022 16:19:02 UTC

Severity: normal

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 52979 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: 52979 <at> debbugs.gnu.org
Cc: Ricardo Wurmus <rekado <at> elephly.net>
Subject: Re: bug#52979: Modular texlive has problems finding fonts
Date: Mon, 03 Jan 2022 18:06:06 +0100
Jelle Licht <jlicht <at> fsfe.org> writes:

> As discussed on #guix on IRC, several folks including myself ran into
> issues getting the following some-file.tex:
>
> --8<---------------cut here---------------start------------->8---
> \documentclass[11pt]{article}
> \begin{document}
> Hello friends
> \end{document}
> --8<---------------cut here---------------end--------------->8---
>
> ... to typeset with the following manifest.scm:
> --8<---------------cut here---------------start------------->8---
> (specifications->manifest
>  '("texlive-base"
>    "texlive-fonts-ec"
>    "texlive-amsfonts"
>    "texlive-fira"
>    "texlive-inconsolata"))
> --8<---------------cut here---------------end--------------->8---
>
> ... with command: 
> `guix shell --pure coreutils grep sed gawk -m manifest.scm -- pdflatex some-file
>
> Note that the monolithic texlive seems to work:
> `guix shell --pure coreutils grep sed gawk texlive -- pdflatex some-file'
>
> On IRC, rekado /w strace identified that texlive does not seem to be
> entering the subdirectory containing the font files, as it seems to be
> loading texlive-bin's texmf.cnf, instead of the one generated by
> `(@ (guix profiles) texlive-configuration)'.
The first part here is correct, the second part is not;

It seems texlive's kpathsea uses a heuristic to determine if a directory
is a 'leaf node', where it checks whether there are exactly 2 links in
there[1]; since symlinks do not count towards the link count, a directory
filled with only symlinks to other directories is seen as a leaf node,
and traversal subsequently ends there.

This heuristic is a performance optimisation, as simply doing stat calls
of everything in a directory is slow, according the the kpathsea
authors.

We can disable this optimisation by setting ST_NLINK_TRICK at compile
time. Alternatively, we could try to figure out a way in which our
directory-of-symlinks also contains at least one file.


[1]: That is, "." and ".."




This bug report was last modified 3 years and 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.