unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 63043@debbugs.gnu.org
Subject: bug#63043: texlive-font-maps.drv build failure when profiles lacks texlive-* packages
Date: Sun, 23 Apr 2023 21:20:59 -0400	[thread overview]
Message-ID: <87zg6yt6ro.fsf@gmail.com> (raw)
In-Reply-To: <87o7nefba4.fsf@inria.fr> ("Ludovic Courtès"'s message of "Mon, 24 Apr 2023 01:07:15 +0200")

Hello!

Ludovic Courtès <ludo@gnu.org> writes:

> Hi!
>
> (Cc: Maxim who may be familiar with the ‘texlive-font-maps’ hook.)

Did you checked with Ricardo?  They were the author of that hook, per
git blame :-).

> I have Guile as a channel, which provides guile@3.0.99-git.  Trying to
> add this guile package to a profile leads to a ‘texlive-font-maps.drv’
> build failure:
>
> $ guix describe -f channels
> (list (channel
>         (name 'guix)
>         (url "https://git.savannah.gnu.org/git/guix.git")
>         (branch "master")
>         (commit
>           "74e96c4cb171b17949f638d8b452d047a8f2dc6f")
>         (introduction
>           (make-channel-introduction
>             "9edb3f66fd807b096b48283debdcddccfea34bad"
>             (openpgp-fingerprint
>               "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA"))))
>       (channel
>         (name 'guile)
>         (url "https://git.savannah.gnu.org/git/guile.git")
>         (branch "main")
>         (commit
>           "1ae50a7f80654f04d93d900e17f3160205700a75"))
>       (channel
>         (name 'shepherd)
>         (url "https://git.savannah.gnu.org/git/shepherd.git")
>         (branch "master")
>         (commit
>           "ab0c7ec989d3afe1933aebb2e03c1d6ecb558ca6")
>         (introduction
>           (make-channel-introduction
>             "788a6d6f1d5c170db68aa4bbfb77024fdc468ed3"
>             (openpgp-fingerprint
>               "3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5")))))
> $ guix build guile
> /gnu/store/1cssq3p4ndi4rvly5w607q7chrg2sj3v-guile-3.0.99-git-debug
> /gnu/store/qndx3hp7cv5z8mv899k58gr9ampaa4g0-guile-3.0.99-git
> $ guix show guile@3.0.99-git |grep location
> location: guile-package.scm:51:4
> $ guix shell guile -- guile
> The following derivation will be built:
>   /gnu/store/pih50yd938jz3h6zkz0kd5jffkxagp3l-profile.drv
>
> builder for `/gnu/store/8d71qslw04hz3dc9gk8yfp0gcp9z03bx-texlive-font-maps' failed previously (cached)
> build of /gnu/store/6h3k74mn5wpgcy0mqzh1zfa6r207jsqf-texlive-font-maps.drv failed
> View build log at '/var/log/guix/drvs/6h/3k74mn5wpgcy0mqzh1zfa6r207jsqf-texlive-font-maps.drv.gz'.
> cannot build derivation `/gnu/store/pih50yd938jz3h6zkz0kd5jffkxagp3l-profile.drv': 1 dependencies couldn't be built
> guix shell: error: build of `/gnu/store/pih50yd938jz3h6zkz0kd5jffkxagp3l-profile.drv' failed
>
>
> The log file for texlive-font-maps.drv ends with:
>
> updmap: open() failed: No such file or directory at /gnu/store/fd38qipvckr2jkkq2xja1n3rb9xz334r-texlive-bin-20210325/bin/updmap line 2158.
> updmap [ERROR]: The following map file(s) couldn't be found:
> updmap [ERROR]:         dvips35.map (in builtin)
> updmap [ERROR]:         pdftex35.map (in builtin)
> updmap [ERROR]:         ps2pk35.map (in builtin)
> updmap [ERROR]: Did you run mktexlsr?
>
>         You can disable non-existent map entries using the option
>           --syncwithtrees.
>
> Backtrace:
>            2 (primitive-load "/gnu/store/pnzmvmbx1smragwnw3rlq4n6zd6?")
> In ice-9/eval.scm:
>     619:8  1 (_ #(#(#(#<directory (guile-user) 7ffff5fdbc80> #) #) #))
> In guix/build/utils.scm:
>     762:6  0 (invoke "/gnu/store/fd38qipvckr2jkkq2xja1n3rb9xz334r-t?" ?)
>
> guix/build/utils.scm:762:6: In procedure invoke:
> ERROR:
>   1. &invoke-error:
>       program: "/gnu/store/fd38qipvckr2jkkq2xja1n3rb9xz334r-texlive-bin-20210325/bin/updmap-sys"
>       arguments: ("--cnffile=/gnu/store/8d71qslw04hz3dc9gk8yfp0gcp9z03bx-texlive-font-maps/share/texmf-dist/web2c/updmap.cfg" "--dvipdfmxoutputdir=/gnu/store/8d71qslw04hz3dc9gk8yfp0gcp9z03bx-texlive-font-maps/share/texmf-dist/fonts/map/dvipdfmx/updmap" "--dvipsoutputdir=/gnu/store/8d71qslw04hz3dc9gk8yfp0gcp9z03bx-texlive-font-maps/share/texmf-dist/fonts/map/dvips/updmap" "--pdftexoutputdir=/gnu/store/8d71qslw04hz3dc9gk8yfp0gcp9z03bx-texlive-font-maps/share/texmf-dist/fonts/map/pdftex/updmap")
>       exit-status: 1
>       term-signal: #f
>       stop-signal: #f
>
>
> The ‘texlive-font-maps-builder’ file starts with:
>
> (begin
>   (use-modules
>    (guix build utils)
>    (guix build union)
>    (ice-9 popen))
>   (union-build "/tmp/texlive"
> 	       (quote
> 		())
> 	       #:create-all-directories? #t #:log-port
> 	       (%make-void-port "w"))
>   (setenv "PATH"
> 	  (string-append "/gnu/store/8fpk2cja3f07xls48jfnpgrzrljpqivr-coreutils-8.32/bin" ":" "/gnu/store/hrgqa7m498wfavq4awai3xz86ifkjxdr-grep-3.6/bin" ":" "/gnu/store/zhd6blbfz40xp62i4d1rcgbyrpkynbkc-sed-4.8/bin"))
>   (setenv "PERL5LIB" "/gnu/store/fd38qipvckr2jkkq2xja1n3rb9xz334r-texlive-bin-20210325/share/tlpkg")
>   (setenv "GUIX_TEXMF" "/tmp/texlive/share/texmf-dist")
>
> So the failure is caused by the fact that /tmp/texlive is in fact empty.
>
> How does this happen?  I think there’s a logic failure in this bit of
> ‘texlive-font-maps’ in (guix profiles):
>
>   (mlet %store-monad ((texlive-base (manifest-lookup-package manifest "texlive-base")))
>     (if texlive-base
>         (gexp->derivation "texlive-font-maps" build
>                           #:substitutable? #f
>                           #:local-build? #t
>                           #:properties
>                           `((type . profile-hook)
>                             (hook . texlive-font-maps)))
>         (return #f)))
>
> In this case, ‘texlive-base’ is found among the native inputs of
> guile@3.0.99-git.
>
> However, the profile itself contains zero texlive-* packages, hence the
> failure.
>
> There are probably two things to fix:
>
>   1. The ‘manifest-lookup-package’ check seems inconsistent with what’s
>      passed to ‘union-build’.

I think this is the problem to fix.  It's non-intuitive that
manifest-lookup-package transitively looks for things instead of looking
at the profile.  I actually got tripped by that as well when I authored
gdk-pixbuf-loaders-cache-file, so there's now a comment in that same
file that reads:

             ;; XXX: MANIFEST-LOOKUP-PACKAGE transitively searches through
             ;; every input referenced by the manifest, while MANIFEST-INPUTS
             ;; only retrieves the immediate inputs as well as their
             ;; propagated inputs; to avoid causing an empty output derivation
             ;; we must ensure that the inputs contain at least one
             ;; loaders.cache file.  This is why we include gdk-pixbuf or
             ;; librsvg when they are transitively found.

I think we need a 'manifest-lookup-inputs' or similar that stops at the
profile, to work at the same depth as manifest-inputs.  Then it wouldn't
find texlive-base and the hook wouldn't run (and fail).

What do you think?

-- 
Thanks,
Maxim




  reply	other threads:[~2023-04-24  1:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23 23:07 bug#63043: texlive-font-maps.drv build failure when profiles lacks texlive-* packages Ludovic Courtès
2023-04-24  1:20 ` Maxim Cournoyer [this message]
2023-04-24 21:15   ` Ludovic Courtès
2023-04-25  1:41     ` Maxim Cournoyer
2023-04-30 20:51       ` Ludovic Courtès
2023-05-01 12:24         ` Maxim Cournoyer
2023-05-04 11:14           ` Ludovic Courtès

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=87zg6yt6ro.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=63043@debbugs.gnu.org \
    --cc=ludo@gnu.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.
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).