all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Wojtek Kosior via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 64772@debbugs.gnu.org
Cc: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: bug#64772: TeXlive (specifically LuaLaTeX) has become terribly slow
Date: Thu, 27 Jul 2023 00:21:42 +0200	[thread overview]
Message-ID: <20230727002142.072c0bab.koszko@koszko.org> (raw)
In-Reply-To: <86zg3pkzz6.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2831 bytes --]

Hi,

I think I know what causes a subdirectory of '{' to be used for caches
— the 'share/texmf-dist/web2c/texmf.cnf' file in the
texlive-libkpathsea package has a

    TEXMFROOT = {$GUIX_TEXMF}/..

line. It's a "runtime path configuration file for kpathsea" and in
general it supports brace expansion. However, in this case something
goes wrong. Maybe the expansion is only triggered when there's at least
one comma in between the braces? Idk. Btw, Guix uses ":" and not a
comma as path separator in 'GUIX_TEXMF' variable and I have no idea
whether kpathsea's brace expansion allows ":" to be used instead of ",".

Still, I'm pretty sure it is this line that causes the '{' directory
problem — I tried running lualatex after bind-mounting a modified
texmf.cnf over the one in the store. I replaced that line with

    TEXMFROOT = $GUIX_TEXMF/..

and no '{' was created this time. Of course, it only worked because
GUIX_TEXMF was holding just one path — a general solution would need to
be different. Just in case, this is the part of texlive-kpathsea
definition in gnu/packages/tex.scm that prepares 'texmf.cnf':

```
          (add-after 'unpack 'customize-texmf.cnf
            ;; The default "texmf.cnf" file is provided by this package.
            ;; Every variable of interest is set relatively to the GUIX_TEXMF
            ;; environment variable defined via a search path below.
            ;;
            ;; This phase must happen before the `configure' phase, because
            ;; the value of the TEXMFCNF variable (modified along with the
            ;; SELFAUTOLOC reference below) is used at compile time to
            ;; generate "paths.h" file.
            (lambda _
              (substitute* "texk/kpathsea/texmf.cnf"
                (("^TEXMFROOT = .*")
                 "TEXMFROOT = {$GUIX_TEXMF}/..\n")
                (("^TEXMF = .*")
                 "TEXMF = {$GUIX_TEXMF}\n")
                (("\\$SELFAUTOLOC(/share/texmf-dist/web2c)" _ suffix)
                 (string-append #$output suffix))
                ;; Don't truncate lines.
                (("^error_line = .*$") "error_line = 254\n")
                (("^half_error_line = .*$") "half_error_line = 238\n")
                (("^max_print_line = .*$") "max_print_line = 1000\n"))))

```

Unfortunately, changes to 'texmf.cnf' don't affect the running time of
lualatex — it's still terribly slow

Wojtek

-- (sig_start)
website: https://koszko.org/koszko.html
fingerprint: E972 7060 E3C5 637C 8A4F  4B42 4BC5 221C 5A79 FD1A
follow me on Fediverse: https://friendica.me/profile/koszko/profile

♥ R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ== | ÷ c2luIHNlcGFyYXRlZCBtZSBmcm9tIEhpbQ==
✝ YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ== | ? U2hhbGwgSSBiZWNvbWUgSGlzIGZyaWVuZD8=
-- (sig_end)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-07-26 22:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-21 15:54 bug#64772: TeXlive (specifically LuaLaTeX) has become terribly slow Malte Frank Gerdes
2023-07-26 22:21 ` Wojtek Kosior via Bug reports for GNU Guix [this message]
2023-07-27 20:07   ` Wojtek Kosior via Bug reports for GNU Guix
2023-07-28 12:21     ` Nicolas Goaziou
2023-07-28 20:33       ` Wojtek Kosior via Bug reports for GNU Guix
2023-07-28 21:25         ` Wojtek Kosior via Bug reports for GNU Guix
2024-08-31 23:16 ` Nicolas Goaziou via Bug reports for GNU Guix

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=20230727002142.072c0bab.koszko@koszko.org \
    --to=bug-guix@gnu.org \
    --cc=64772@debbugs.gnu.org \
    --cc=koszko@koszko.org \
    --cc=mail@nicolasgoaziou.fr \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.