unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Jelle Licht <jlicht@fsfe.org>
To: 52979@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: bug#52979: Modular texlive has problems finding fonts
Date: Mon, 03 Jan 2022 18:06:06 +0100	[thread overview]
Message-ID: <86ee5o3g1t.fsf@fsfe.org> (raw)
In-Reply-To: <86k0fg3i9y.fsf@fsfe.org>

Jelle Licht <jlicht@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 ".."




  reply	other threads:[~2022-01-03 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-03 16:18 bug#52979: Modular texlive has problems finding fonts Jelle Licht
2022-01-03 17:06 ` Jelle Licht [this message]
2022-01-04  7:50   ` Ricardo Wurmus
2022-01-04  9:19     ` Ricardo Wurmus
2022-01-04  9:58       ` Ricardo Wurmus
2022-01-04 14:28         ` Ricardo Wurmus

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86ee5o3g1t.fsf@fsfe.org \
    --to=jlicht@fsfe.org \
    --cc=52979@debbugs.gnu.org \
    --cc=rekado@elephly.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).