From: Christopher Allan Webber <cwebber@dustycloud.org>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Fixing non-reproducibility in some guile packages
Date: Sun, 12 Feb 2017 11:29:45 -0600 [thread overview]
Message-ID: <87efz35ncm.fsf@dustycloud.org> (raw)
In-Reply-To: <87tw80pgpl.fsf@gnu.org>
[-- Attachment #1.1: Type: text/plain, Size: 1316 bytes --]
Jan Nieuwenhuizen writes:
> While building guile2.2-gdbm-ffi an error is printed that does not
> prevent the package from being built
>
> @ build-started /gnu/store/z9m20fz1ayyl0g9b4ad6wgmq3fv2h7gi-guile2.2-gdbm-ffi-20120209.fa1d5b6.drv - x86_64-linux /var/log/guix/drvs/z9//m20fz1ayyl0g9b4ad6wgmq3fv2h7gi-guile2.2-gdbm-ffi-20120209.fa1d5b6.drv.bz2
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> ;;; compiling /gnu/store/d3gli8g5bv6yhd3qwk5rfzqpsfvnj4lv-guile-next-2.1.5/bin/guild
> ;;; WARNING: compilation of /gnu/store/d3gli8g5bv6yhd3qwk5rfzqpsfvnj4lv-guile-next-2.1.5/bin/guild failed:
> ;;; ERROR: failed to create path for auto-compiled file "/gnu/store/d3gli8g5bv6yhd3qwk5rfzqpsfvnj4lv-guile-next-2.1.5/bin/guild"
> wrote `/gnu/store/xskgkfsxz936nifjs8vxqwk95kf62ia8-guile2.2-gdbm-ffi-20120209.fa1d5b6/share/guile/site/2.2/gdbm.go'
> @ build-succeeded /gnu/store/z9m20fz1ayyl0g9b4ad6wgmq3fv2h7gi-guile2.2-gdbm-ffi-20120209.fa1d5b6.drv -
> /gnu/store/xskgkfsxz936nifjs8vxqwk95kf62ia8-guile2.2-gdbm-ffi-20120209.fa1d5b6
> 22:00:06 janneke@dundal:~/src/guix
Ah yeah, okay! I fixed this by adding GUILE_AUTO_COMPILE=0 to the
environment while compiling. New patch attached!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-guile-gdbm-ffi-Write-to-correct-guile-output-directo.patch --]
[-- Type: text/x-patch, Size: 3956 bytes --]
From 447cf04e0fc5947e8384851ecfa9fffd61638c39 Mon Sep 17 00:00:00 2001
From: Christopher Allan Webber <cwebber@dustycloud.org>
Date: Fri, 10 Feb 2017 19:24:57 -0600
Subject: [PATCH] guile-gdbm-ffi: Write to correct guile output directory and
use guild.
* gnu/packages/guile.scm (make-guile-gdbm-ffi): New variable.
Adapts from the previous guile-gdbm-ffi definition. Also fixes
a bug where the guild command was not getting called, and instead
was calling the internal guile compile-file procedure. This meant
that the package produced was dependent on whatever version of
guile was powering Guix at the time. Also set GUILE_AUTO_COMPILE
to 0 to avoid gnarly looking warnings during build.
(guile-gdbm-ffi, guile2.2-gdbm-ffi): Use make-guile-gdbm-ffi.
---
gnu/packages/guile.scm | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 3e8ab007b..6e1831fb4 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -825,9 +825,11 @@ inspired by the SCSH regular expression system.")
;; There are two guile-gdbm packages, one using the FFI and one with
;; direct C bindings, hence the verbose name.
-(define-public guile-gdbm-ffi
+(define (make-guile-gdbm-ffi guile-2.2?)
(package
- (name "guile-gdbm-ffi")
+ (name (if guile-2.2?
+ "guile2.2-gdbm-ffi"
+ "guile-gdbm-ffi"))
(version "20120209.fa1d5b6")
(source (origin
(method git-fetch)
@@ -844,11 +846,14 @@ inspired by the SCSH regular expression system.")
((guix build utils))
#:builder
(begin
- (use-modules (guix build utils)
- (system base compile))
+ (use-modules (guix build utils))
+
+ (setenv "GUILE_AUTO_COMPILE" "0")
(let* ((out (assoc-ref %outputs "out"))
- (module-dir (string-append out "/share/guile/site/2.0"))
+ (module-dir (string-append out "/share/guile/site/"
+ ,(if guile-2.2?
+ "2.2" "2.0")))
(source (assoc-ref %build-inputs "source"))
(doc (string-append out "/share/doc"))
(guild (string-append (assoc-ref %build-inputs "guile")
@@ -856,7 +861,10 @@ inspired by the SCSH regular expression system.")
(gdbm.scm-dest
(string-append module-dir "/gdbm.scm"))
(gdbm.go-dest
- (string-append module-dir "/gdbm.go")))
+ (string-append module-dir "/gdbm.go"))
+ (compile-file
+ (lambda (in-file out-file)
+ (system* guild "compile" "-o" out-file in-file))))
;; Make installation directories.
(mkdir-p module-dir)
(mkdir-p doc)
@@ -874,10 +882,10 @@ inspired by the SCSH regular expression system.")
(assoc-ref %build-inputs "gdbm"))))
;; compile to the destination
- (compile-file gdbm.scm-dest
- #:output-file gdbm.go-dest)))))
+ (compile-file gdbm.scm-dest gdbm.go-dest)))))
(inputs
- `(("guile" ,guile-2.0)))
+ `(("guile" ,(if guile-2.2?
+ guile-next guile-2.0))))
(propagated-inputs
`(("gdbm" ,gdbm)))
(home-page "https://github.com/ijp/guile-gdbm")
@@ -887,8 +895,11 @@ inspired by the SCSH regular expression system.")
Guile's foreign function interface.")
(license gpl3+)))
+(define-public guile-gdbm-ffi
+ (make-guile-gdbm-ffi #f))
+
(define-public guile2.2-gdbm-ffi
- (package-for-guile-2.2 guile-gdbm-ffi))
+ (make-guile-gdbm-ffi #t))
(define-public guile-sqlite3
(let ((commit "607721fe1174a299e45d457acacf94eefb964071"))
--
2.11.0
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-02-12 17:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-11 1:29 guile2.2-gdbm-ffi issue Christopher Allan Webber
2017-02-11 17:08 ` Fixing non-reproducibility in some guile packages (was: guile2.2-gdbm-ffi issue) Christopher Allan Webber
2017-02-11 21:20 ` Fixing non-reproducibility in some guile packages Jan Nieuwenhuizen
2017-02-12 17:29 ` Christopher Allan Webber [this message]
2017-02-13 6:18 ` Maxim Cournoyer
2017-02-13 7:13 ` Andy Wingo
2017-02-13 16:25 ` Christopher Allan Webber
2017-02-13 17:39 ` Maxim Cournoyer
2017-02-13 14:40 ` Ludovic Courtès
2017-02-13 16:42 ` Christopher Allan Webber
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efz35ncm.fsf@dustycloud.org \
--to=cwebber@dustycloud.org \
--cc=guix-devel@gnu.org \
--cc=janneke@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.