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 # ?) 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 #) In gnu/packages.scm:    242:33 10 (fold-packages # ?) In guix/discovery.scm:    158:11  9 (all-modules ("." ("/gnu/store/03iqzmjsha60m3fk?" . #)) ?) In srfi/srfi-1.scm:    460:18  8 (fold # ?) In guix/discovery.scm:    145:31  7 (_ "." ())     115:5  6 (scheme-modules _ _ #:warn _) In srfi/srfi-1.scm:    691:23  5 (filter-map # . #) 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 # "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 # #+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 :)).