unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andreas Enge <andreas@enge.fr>
Cc: guix-devel@gnu.org
Subject: Re: Graceful handling of missing patches
Date: Tue, 20 Jan 2015 15:01:32 +0100	[thread overview]
Message-ID: <87egqpim9v.fsf@gnu.org> (raw)
In-Reply-To: <20150120093702.GA4495@debian.math.u-bordeaux1.fr> (Andreas Enge's message of "Tue, 20 Jan 2015 10:37:02 +0100")

Andreas Enge <andreas@enge.fr> skribis:

> On Tue, Jan 20, 2015 at 10:22:39AM +0100, Ludovic Courtès wrote:
>> With commits 6b1f972 and dbab515, patch-not-found errors are now
>> gracefully handled at run time:
>> 
>>   $ ./pre-inst-env guix build findutils
>>   guix build: error: WHAT?.patch: patch not found
>> 
>> This introduces an ABI change, so make sure to run:
>> 
>>   make clean-go && make
>
> Compilation now fails for me with
> /bin/mkdir -p `dirname "guix/scripts/refresh.go"` ;                     \
> LC_ALL=C                                                        \
> ./pre-inst-env                                  \
> /usr/bin/guild compile -L "." -L "."    \
>   -Wformat -Wunbound-variable -Warity-mismatch                  \
>   --target="x86_64-unknown-linux-gnu"                                           \
>   -o "guix/scripts/refresh.go" "guix/scripts/refresh.scm"
> ;;; note: source file ./guix/config.scm
> ;;;       newer than compiled /usr/local/guix-git/share/guile/site/2.0/guix/config.go
> ;;; note: source file ./gnu/packages.scm
> ;;;       newer than compiled /usr/local/guix-git/share/guile/site/2.0/gnu/packages.go
> ;;; note: source file ./gnu/packages/guile.scm
> ;;;       newer than compiled /usr/local/guix-git/share/guile/site/2.0/gnu/packages/guile.go
> ;;; note: source file ./gnu/packages/gnome.scm
> ;;;       newer than compiled /usr/local/guix-git/share/guile/site/2.0/gnu/packages/gnome.go
> Backtrace:
> In ice-9/boot-9.scm:
> 2111: 19 [save-module-excursion #<procedure 1adb390 at language/scheme/compile-tree-il.scm:29:3 ()>]
> In language/scheme/compile-tree-il.scm:
>   31: 18 [#<procedure 1adb390 at language/scheme/compile-tree-il.scm:29:3 ()>]
> In ice-9/psyntax.scm:
> 1101: 17 [expand-top-sequence ((define-module # # # ...)) () ((top)) ...]
>  986: 16 [scan ((define-module (guix scripts refresh) #:use-module ...)) () ...]
>  270: 15 [scan ((#(syntax-object let # ...) (#) (# #) ...)) () ...]
> In ice-9/eval.scm:
>  392: 14 [eval # ()]
> In ice-9/boot-9.scm:
> 2667: 13 [define-module* (guix scripts refresh) #:filename ...]
> 2642: 12 [resolve-imports (((guix ui)) ((guix hash)) ((guix store)) ...)]
> 2580: 11 [resolve-interface (gnu packages commencement) #:select ...]
> 2505: 10 [#<procedure 1733340 at ice-9/boot-9.scm:2493:4 (name #:optional autoload version #:key ensure)> # ...]
> 2772: 9 [try-module-autoload (gnu packages commencement) #f]
> 2111: 8 [save-module-excursion #<procedure 24d24b0 at ice-9/boot-9.scm:2773:17 ()>]
> 2783: 7 [#<procedure 24d24b0 at ice-9/boot-9.scm:2773:17 ()>]
> In unknown file:
>    ?: 6 [primitive-load-path "gnu/packages/commencement" #f]
> In gnu/packages/commencement.scm:
>  613: 5 [#<procedure 24e1360 ()>]
> In guix/utils.scm:
>  428: 4 [#<procedure 1a03870 at guix/utils.scm:424:4 args> #]
> In gnu/packages/bootstrap.scm:
>  147: 3 [#<procedure 2511b20 at gnu/packages/bootstrap.scm:134:3 (p)> #]
>   77: 2 [bootstrap-origin #]
> In unknown file:
>    ?: 1 [scm-error wrong-type-arg "map" ...]
> In ice-9/boot-9.scm:
>  106: 0 [#<procedure 1958b00 at ice-9/boot-9.scm:97:6 (thrown-k . args)> wrong-type-arg ...]
>
> ice-9/boot-9.scm:106:20: In procedure #<procedure 1958b00 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
> ice-9/boot-9.scm:106:20: In procedure map: Not a list: #<promise ("./gnu/packages/patches/guile-arm-fixes.patch")>
> Makefile:4030: die Regel für Ziel „guix/scripts/refresh.go“ scheiterte

Clearly this is a symptom of an old, ABI-incompatible .go being used.

After some discussion and investigation we found out that, during
compilation, ‘guild compile’ could end up loading the already-installed
.go files if their mtime is newer that than of the corresponding .scm
files in the source tree, which is often the case if the user ran ‘make
install’ recently.

Commit 28561d8 fixes that by resetting GUILE_LOAD_COMPILED_PATH
altogether during compilation.

Thanks,
Ludo’.

  reply	other threads:[~2015-01-20 14:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 13:25 Match-error for patches Andreas Enge
2015-01-18 14:21 ` Ludovic Courtès
2015-01-18 16:10   ` Andreas Enge
2015-01-18 16:32     ` Ludovic Courtès
2015-01-18 16:42       ` Andreas Enge
2015-01-20  9:22         ` Graceful handling of missing patches Ludovic Courtès
2015-01-20  9:37           ` Andreas Enge
2015-01-20 14:01             ` Ludovic Courtès [this message]
2015-01-20 22:29           ` Andreas Enge

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=87egqpim9v.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=andreas@enge.fr \
    --cc=guix-devel@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).