unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Luis Felipe <sirgazil@zoho.com>
To: help-guix@gnu.org
Subject: Re: Custom channel is making guix pull fail
Date: Fri, 20 Sep 2024 18:26:53 +0000	[thread overview]
Message-ID: <b24d751a-7660-475f-a310-63a35344dded@zoho.com> (raw)
In-Reply-To: <4b16c607-9dc1-3960-24ab-ac550eda56f5@zoho.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 6451 bytes --]

On 13/09/24 17:14, Luis Felipe wrote:
> Hi,
>
> Could you help me find out what I'm doing wrong here, please? :)
>
> I have a custom channel 
> (https://codeberg.org/luis-felipe/guix-channel-x) that had been 
> working fine for a very long time, but now running "guix pull" fails 
> with the following error:
>
> #+begin_quote
> building /gnu/store/3aghnb3nbxmgl5f2fsjchz27iwsdz0rl-luflac-x.drv...
> -builder for 
> `/gnu/store/3aghnb3nbxmgl5f2fsjchz27iwsdz0rl-luflac-x.drv' failed to 
> produce output path
> `/gnu/store/zpmgrl9sz83ininzainjs9kjk25wymsw-luflac-x'
> build of /gnu/store/3aghnb3nbxmgl5f2fsjchz27iwsdz0rl-luflac-x.drv failed
> View build log at 
> '/var/log/guix/drvs/3a/ghnb3nbxmgl5f2fsjchz27iwsdz0rl-luflac-x.drv.gz'.
> cannot build derivation 
> `/gnu/store/99w71gp2rxzb7g1ij62qag769bryxwzi-profile.drv': 1 dependencies
> couldn't be built
> guix pull: error: build of 
> `/gnu/store/99w71gp2rxzb7g1ij62qag769bryxwzi-profile.drv' failed
> #+end_quote
>
> And the referenced build log reads as follows:
>
> #+begin_quote
> (repl-version 0 1 1)
> guix repl: warning: '%gnu-build-system-modules' is deprecated,
> use '%default-gnu-imported-modules' instead
> WARNING: (guix build guile-easy-build-system):
> imported module (guix build utils) overrides core binding `delete'
> (exception match-error (value "match") (value "no matching pattern") 
> (value ()))
> #+end_quote

Problem solved. And for the sake of closure:

Since I couldn't find the exact problem using guix c6ff1d6, I decided to 
exclude my channel and upgrade my system (now guix 0feeac3). This time, 
importing my build system module in a guix repl consistently reported a 
similar problem to the one displayed when performing "guix pull" in my 
initial message:

#+begin_src shell
❯ guix repl -L .
scheme@(guix-user)> (use-modules (guix build guile-easy-build-system))
While compiling expression:
Throw to key `match-error' with args `("match" "no matching pattern" ())'.
#+end_src

Great, because that way I could start debugging that module locally.

The problem was in the definition of the standard phases of my 
"guile-easy" build system:

#+begin_src scheme
(define %standard-phases
   (modify-phases gbs:%standard-phases
     (delete 'install-documentation)
     (delete 'compress-documentation)
     (delete 'delete-info-dir-file)
     (delete 'validate-documentation-location)

     (add-after 'set-paths 'add-output-to-guile-load-paths
       add-output-to-guile-load-paths)
     (add-after 'build 'check check)
     ;; These two below were responsible for the "match-error":
     (add-after 'install 'install-scripts install-scripts)
     (add-after 'install 'install-info-manual install-info-manual)))
#+end_src

The last two phases, "install-scripts" and "install-info-manual", were 
added after the "install" phase, but there is no such phase: The phases 
of my "guile-easy" build system inherit from "guile"'s build system 
phases (referred to as "gbs:%standard-phases" in the previous code), 
which in turn inherit from the "gnu"'s build system phases, but the 
guile build system explicitly deletes the "install" phase (among other 
phases).

Apparently, in this version of Guix referring to non-existing phases 
breaks the code. This wasn't the case in Guix c81ed09, for example, 
where I can build packages that use the guile-easy build system just fine.

So, the solution was to change the standard phases definition so that 
the faulty phases refer to phases that actually exist:

#+begin_src scheme
(define %standard-phases
   (modify-phases gbs:%standard-phases
     (delete 'install-documentation)
     (delete 'compress-documentation)
     (delete 'delete-info-dir-file)
     (delete 'validate-documentation-location)

     (add-after 'set-paths 'add-output-to-guile-load-paths
       add-output-to-guile-load-paths)
     (add-after 'build 'check check)
     (add-after 'check 'install-scripts install-scripts)
     (add-after 'check 'install-info-manual install-info-manual)))
#+end_src

On a side note, building a package that uses my faulty build system in 
my new Guix, a useful backtrace is printed, but it seems to me that 
there might be a defect in the Guix code there:

#+begin_src shell
❯ guix build -L . guile-documenta
guix build: warning: failed to load '(guix build guile-easy-build-system)':

Backtrace:
In guix/store.scm:
    1330:8 19 (call-with-build-handler #<procedure 7f7edc8811e0 at g?> ?)
In guix/scripts/build.scm:
     584:2 18 (_)
In srfi/srfi-1.scm:
    673:15 17 (append-map _ _ . _)
    586:17 16 (map1 ((argument . "guile-documenta") (build-mode . 0) ?))
In guix/scripts/build.scm:
    604:31 15 (_ _)
In gnu/packages.scm:
     485:2 14 (%find-package "guile-documenta" "guile-documenta" #f)
     365:6 13 (find-best-packages-by-name _ _)
    295:56 12 (_ "guile-documenta" _)
In unknown file:
           11 (force #<promise #<procedure 7f7edc8dc040 at gnu/packag?>)
In gnu/packages.scm:
    242:33 10 (fold-packages #<procedure 7f7edc6f35f0 at gnu/package?> ?)
In guix/discovery.scm:
    158:11  9 (all-modules ("." ("/gnu/store/03iqzmjsha60m3fk?" . #)) ?)
In srfi/srfi-1.scm:
    460:18  8 (fold #<procedure 7f7ed6611860 at guix/discovery.scm:1?> ?)
In guix/discovery.scm:
    145:31  7 (_ "." ())
     115:5  6 (scheme-modules _ _ #:warn _)
In srfi/srfi-1.scm:
    691:23  5 (filter-map #<procedure 7f7ed6611720 at guix/discove?> . #)
In guix/discovery.scm:
    123:24  4 (_ . _)
In guix/ui.scm:
     482:5  3 (warn-about-load-error "./guix/build/guile-easy-build-?" ?)
In unknown file:
            2 (display-error #f #<output: file /dev/pts/1> "match" "?" ?)
In ice-9/boot-9.scm:
   1685:16  1 (raise-exception _ #:continuable? _)
   1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong number of arguments to #<procedure display-error (_ _ _ _ _ _)>
#+end_src

It seems to me that "guix/ui.scm" tries to report more useful 
information about the problem loading "guile-easy-build-system" but then 
"display-error" complains about not getting the right number of 
arguments (?).

Anyways, my channel is working again, problem solved (or so it seems :)).


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 2881 bytes --]

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

      parent reply	other threads:[~2024-09-20 18:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 17:14 Custom channel is making guix pull fail Luis Felipe
2024-09-14  5:41 ` Moisés Simón
2024-09-14 15:27   ` Luis Felipe
2024-09-14 11:41 ` Marek Paśnikowski
2024-09-17  1:45 ` Felix Lechner via
2024-09-17 15:52   ` Luis Felipe
2024-09-20 18:26 ` Luis Felipe [this message]

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=b24d751a-7660-475f-a310-63a35344dded@zoho.com \
    --to=sirgazil@zoho.com \
    --cc=help-guix@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.
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).