unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#45308: Unexpected fail with build transformation --with-commit
@ 2020-12-18  2:54 zimoun
  2020-12-18 17:21 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: zimoun @ 2020-12-18  2:54 UTC (permalink / raw)
  To: 45308

Dear,

Using Guix f4450e8, the package emacs-next builds:

  $ guix build emacs-next
  /gnu/store/93hb0g731f64avayj8rdz26bz48xg2ri-emacs-next-28.0.50-0.2ea3466

and the recipe reads:

--8<---------------cut here---------------start------------->8---
(define-public emacs-next
  (let ((commit "2ea34662c20f71d35dd52a5ed996542c7386b9cb")
        (revision "0"))
    (package/inherit emacs
      (name "emacs-next")
      (version (git-version "28.0.50" revision commit))
      (source
       (origin
         (inherit (package-source emacs))
         (method git-fetch)
         (uri (git-reference
               (url "https://git.savannah.gnu.org/git/emacs.git/")
               (commit commit)))
[...]               
--8<---------------cut here---------------end--------------->8---

However, the equivalent but specifying the exact same commit fails:

--8<---------------cut here---------------start------------->8---
$ guix build emacs-next --with-commit=emacs-next=2ea34662c20f71d35dd52a5ed996542c7386b9cb

[...]

In end of data:
site-start.el:3:1: Warning: the function ‘guix-emacs-autoload-packages’ is not
    known to be defined.
Done (Total of 2 files compiled)
phase `install-site-start' succeeded after 0.1 seconds
starting phase `glib-or-gtk-wrap'
phase `glib-or-gtk-wrap' succeeded after 0.0 seconds
starting phase `strip-double-wrap'
Backtrace:
           9 (primitive-load "/gnu/store/nqja2pn6mqyqq8gpvsp8jnjaz9c…")
In ice-9/eval.scm:
   191:35  8 (_ _)
In guix/build/gnu-build-system.scm:
    838:2  7 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
  1736:10  6 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
   857:16  5 (every1 #<procedure 7ffff4befc40 at guix/build/gnu-bui…> …)
In guix/build/gnu-build-system.scm:
   847:30  4 (_ _)
In ice-9/boot-9.scm:
    142:2  3 (dynamic-wind #<procedure 7ffff4ba7ca0 at ice-9/eval.s…> …)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7ffff5bb8f00>)))
In unknown file:
           1 (copy-file "bin/emacs-git.2ea3466" "bin/emacs")
In ice-9/boot-9.scm:
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
In procedure copy-file: No such file or directory
builder for `/gnu/store/h7s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv' failed with exit
code 1
build of /gnu/store/h7s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv failed
View build log at
'/var/log/guix/drvs/h7/s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv.bz2'.
guix build: error: build of `/gnu/store/h7s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv'
failed
--8<---------------cut here---------------end--------------->8---

Note that the items in the derivation are not ordered the same way
(which should not be, IMHO, i.e., should be sorted):

--8<---------------cut here---------------start------------->8---
Derive
([("out","/gnu/store/93hb0g731f64avayj8rdz26bz48xg2ri-emacs-next-28.0.50-0.2ea3466","","")]
 ,[("/gnu/store/09224jzfa4albcdp321czpjxf6b7s9az-librsvg-2.40.21.drv",["out"])
   ,("/gnu/store/097awwm6ypakc4hgzak3nbhhnax1kb4n-dbus-1.12.16.drv",["out"])
   ,("/gnu/store/0x7akam0zda5cyaarxjxmcrph801ldf5-glib-2.62.6.drv",["out"])

[...]

   ,("/gnu/store/z7hfbdl9xrjjx1nq6v94xwq1ivy82zn3-fontconfig-2.13.1.drv",["out"])]
 ,["/gnu/store/dqbd35sjzmj1hb4s83p6x2k65dyh28xx-emacs-next-28.0.50-0.2ea3466-guile-builder","/gnu/store/jm5y2ys7fwasip9gy6pdv0pn5nf1k49k-module-import"]
 ,"x86_64-linux","/gnu/store/2wrp7x9aclqsapm58dz5i654qds8nbb8-guile-2.0.14/bin/guile",["--no-auto-compile","-L","/gnu/store/jm5y2ys7fwasip9gy6pdv0pn5nf1k49k-module-import","/gnu/store/dqbd35sjzmj1hb4s83p6x2k65dyh28xx-emacs-next-28.0.50-0.2ea3466-guile-builder"]
 ,[("GUILE_LOAD_COMPILED_PATH","/gnu/store/57arpl064shmcfnszyi93cm6xhpkm1sr-module-import-compiled")
   ,("allowSubstitutes","0")
   ,("guix properties","((type . graft) (graft (count . 24)))")
   ,("out","/gnu/store/93hb0g731f64avayj8rdz26bz48xg2ri-emacs-next-28.0.50-0.2ea3466")
   ,("preferLocalBuild","1")])
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Derive
([("out","/gnu/store/9a8labbn5r7c6aavazvi9zhy75srxp0a-emacs-next-git.2ea3466","","")]
 ,[("/gnu/store/0914wj4m75qvn2wlxi5gw85dna6n2v7f-mesa-20.1.9.drv",["out"])
   ,("/gnu/store/09224jzfa4albcdp321czpjxf6b7s9az-librsvg-2.40.21.drv",["out"])
   ,("/gnu/store/097awwm6ypakc4hgzak3nbhhnax1kb4n-dbus-1.12.16.drv",["out"])

[...]

   ,("/gnu/store/yshx9iapfwhk90wn3c1nw5jp1hqzx09x-util-linux-2.35.1.drv",["lib"])
   ,("/gnu/store/z7hfbdl9xrjjx1nq6v94xwq1ivy82zn3-fontconfig-2.13.1.drv",["out"])]
 ,["/gnu/store/8qm8aklnh0937bvy9kpy8n7jy8nqwldj-guix-emacs.el","/gnu/store/nqja2pn6mqyqq8gpvsp8jnjaz9cb71js-emacs-next-git.2ea3466-guile-builder","/gnu/store/s48w5zmgchqp8rjl9z2bg8wb0v3j44gj--2ea3466","/gnu/store/ziqkzr6gbllc2rbp0cg18vmr02grf8xi-module-import"]
 ,"x86_64-linux","/gnu/store/0m0vd873jp61lcm4xa3ljdgx381qa782-guile-3.0.2/bin/guile",["--no-auto-compile","-L","/gnu/store/ziqkzr6gbllc2rbp0cg18vmr02grf8xi-module-import","/gnu/store/nqja2pn6mqyqq8gpvsp8jnjaz9cb71js-emacs-next-git.2ea3466-guile-builder"]
 ,[("GUILE_LOAD_COMPILED_PATH","/gnu/store/hr3djx0ls96i9llwqhi8abfk72nym0jv-module-import-compiled")
   ,("out","/gnu/store/9a8labbn5r7c6aavazvi9zhy75srxp0a-emacs-next-git.2ea3466")])
--8<---------------cut here---------------end--------------->8---

Three things appears in the transformed build only:

 1. util-linux-2.35.1.drv,["lib"]
 2. guix-emacs.el
 3. /gnu/store/s48w5zmgchqp8rjl9z2bg8wb0v3j44gj--2ea3466

Do I miss something?  Is it Emacs specific because of ’inherit’?  Or
coming from the ’transform’ option?

All the best,
simon




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45308: Unexpected fail with build transformation --with-commit
  2020-12-18  2:54 bug#45308: Unexpected fail with build transformation --with-commit zimoun
@ 2020-12-18 17:21 ` Ludovic Courtès
  2021-02-08 21:31   ` bug#45308: Emacs package broken with --with-commit transformation Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2020-12-18 17:21 UTC (permalink / raw)
  To: zimoun; +Cc: 45308

Hi!

zimoun <zimon.toutoune@gmail.com> skribis:

>            1 (copy-file "bin/emacs-git.2ea3466" "bin/emacs")
> In ice-9/boot-9.scm:
>   1669:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> In procedure copy-file: No such file or directory
> builder for `/gnu/store/h7s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv' failed with exit
> code 1

This comes from this phase in the ‘emacs’ package:

--8<---------------cut here---------------start------------->8---
             (with-directory-excursion (assoc-ref outputs "out")
               (copy-file (string-append
                           "bin/emacs-"
                           ,(let ((this-version (package-version this-package)))
                              (or (false-if-exception
                                   (version-major+minor+point this-version))
                                  (version-major+minor this-version))))
                          "bin/emacs")
               #t)
--8<---------------cut here---------------end--------------->8---

When using ‘--with-commit’, the ‘version’ field you end up with is
‘git.2ea3466’ as shown above, and so the trick above that constructs the
file name from the ‘version’ field no longer works.

Probably, instead of constructing the ‘emacs-X.Y’ file name like this,
we should instead use ‘scandir’ or ‘find-files’ and pick
‘bin/emacs-[0-9]+.[0-9]+’.

HTH!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#45308: Emacs package broken with --with-commit transformation
  2020-12-18 17:21 ` Ludovic Courtès
@ 2021-02-08 21:31   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2021-02-08 21:31 UTC (permalink / raw)
  To: zimoun; +Cc: 45308-done

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

> zimoun <zimon.toutoune@gmail.com> skribis:
>
>>            1 (copy-file "bin/emacs-git.2ea3466" "bin/emacs")
>> In ice-9/boot-9.scm:
>>   1669:16  0 (raise-exception _ #:continuable? _)
>>
>> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
>> In procedure copy-file: No such file or directory
>> builder for `/gnu/store/h7s176h5d0fqjzz0ac4pdvzb7rb0dm9i-emacs-next-git.2ea3466.drv' failed with exit
>> code 1
>
> This comes from this phase in the ‘emacs’ package:
>
>              (with-directory-excursion (assoc-ref outputs "out")
>                (copy-file (string-append
>                            "bin/emacs-"
>                            ,(let ((this-version (package-version this-package)))
>                               (or (false-if-exception
>                                    (version-major+minor+point this-version))
>                                   (version-major+minor this-version))))
>                           "bin/emacs")
>                #t)

This was fixed by 8d2465fcfef96552517bef7d182a04255d5707c2.

Closing!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-08 23:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18  2:54 bug#45308: Unexpected fail with build transformation --with-commit zimoun
2020-12-18 17:21 ` Ludovic Courtès
2021-02-08 21:31   ` bug#45308: Emacs package broken with --with-commit transformation Ludovic Courtès

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).