From: ludo@gnu.org (Ludovic Courtès)
To: Amirouche Boubekki <amirouche.boubekki@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add scheme-bytestructures
Date: Thu, 20 Oct 2016 16:00:28 +0200 [thread overview]
Message-ID: <878ttjaznn.fsf@gnu.org> (raw)
In-Reply-To: <CAL7_Mo8ChzCQZA+BQCPxQZZKDUH_8KnC08HAp--xwVwbfp-eJg@mail.gmail.com> (Amirouche Boubekki's message of "Wed, 19 Oct 2016 07:18:37 +0000")
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
Hello,
Amirouche Boubekki <amirouche.boubekki@gmail.com> skribis:
> find-files does the right thing, there is no need to filter what it returns.
> From ea88bf4b53a63ba0d54f71622d055c32cd7e346e Mon Sep 17 00:00:00 2001
> From: Amirouche <amirouche@hypermove.net>
> Date: Sun, 9 Oct 2016 12:31:20 +0200
> Subject: [PATCH] gnu: Add guile-bytestructures
>
> * gnu/packages/guile.scm (guile-bytestructures): New variable.
I had to make these extra modifications (the package you sent built but
the result was a bunch of empty directories because ‘find-files’ was
called from the wrong directory):
[-- Attachment #2: Type: text/x-patch, Size: 2188 bytes --]
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index a03cb44..f99077b 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
+;;; Copyright © 2016 Amirouche <amirouche@hypermove.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1300,13 +1301,11 @@ is no support for parsing block and inline level HTML.")
effective))
(source (assoc-ref %build-inputs "source"))
(doc (string-append out "/share/doc/scheme-bytestructures"))
- (scm-files (find-files "bytestructures" "\\.scm$"))
+ (scm-files (with-directory-excursion source
+ (find-files "bytestructures" "\\.scm$")))
(guild (string-append (assoc-ref %build-inputs "guile")
"/bin/guild")))
;; Make installation directories.
- (mkdir-p (string-append module-dir "/bytestructures/guile"))
- (mkdir-p (string-append module-dir "/bytestructures/r6"))
- (mkdir-p (string-append module-dir "/bytestructures/body"))
(mkdir-p doc)
;; Compile .scm files and install.
@@ -1320,8 +1319,11 @@ is no support for parsing block and inline level HTML.")
(string-rindex file #\.))
".go")))
;; Install source module.
+ (mkdir-p (dirname dest-file))
(copy-file file dest-file)
+
;; Install compiled module.
+ (mkdir-p (dirname go-file))
(unless (zero? (system* guild "compile"
"-L" source
"-o" go-file
[-- Attachment #3: Type: text/plain, Size: 1816 bytes --]
However, with those changes, I get:
--8<---------------cut here---------------start------------->8---
ice-9/boot-9.scm:106:20: Syntax error:
bytestructures/body/base.scm:38:0: definition in expression context, where definitions are not allowed, in form (define make-bytestructure-descriptor (case-lambda ((size alignment unwrapper getter setter) (%make-bytestructure-descriptor size alignment unwrapper getter setter #f)) ((size alignment unwrapper getter setter meta) (%make-bytestructure-descriptor size alignment unwrapper getter setter meta))))
Backtrace:
In ice-9/boot-9.scm:
157: 12 [catch #t #<catch-closure 8c9560> ...]
In unknown file:
?: 11 [apply-smob/1 #<catch-closure 8c9560>]
In ice-9/boot-9.scm:
63: 10 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
432: 9 [eval # #]
In ice-9/boot-9.scm:
2401: 8 [save-module-excursion #<procedure 8e7880 at ice-9/boot-9.scm:4045:3 ()>]
4050: 7 [#<procedure 8e7880 at ice-9/boot-9.scm:4045:3 ()>]
1724: 6 [%start-stack load-stack #<procedure 8fa7a0 at ice-9/boot-9.scm:4041:10 ()>]
1729: 5 [#<procedure 8fdc60 ()>]
In unknown file:
?: 4 [primitive-load "/gnu/store/jx9byzydknqixyv4dn19cxa5q7r6s6v9-guile-bytestructures-20160726.53127f6-guile-builder"]
In ice-9/eval.scm:
387: 3 [eval # ()]
432: 2 [eval # #]
In ice-9/boot-9.scm:
768: 1 [for-each #<procedure ca5030 at ice-9/eval.scm:416:20 (a)> #]
In unknown file:
?: 0 [scm-error misc-error #f ...]
ERROR: In procedure scm-error:
ERROR: Failed to compile "bytestructures/r7/base.scm" to "/gnu/store/m0lqx4wli55dfj45nsjhlhlvgql1p974-guile-bytestructures-20160726.53127f6/share/guile/site/2.0/bytestructures/r7/base.go"!
--8<---------------cut here---------------end--------------->8---
Could you look into it and submit and updated patch?
TIA!
Ludo’.
next prev parent reply other threads:[~2016-10-20 14:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-09 10:38 [PATCH] Add scheme-bytestructures Amirouche Boubekki
2016-10-10 17:51 ` Kei Kebreau
2016-10-10 20:46 ` Ludovic Courtès
2016-10-11 13:15 ` Taylan Ulrich Bayırlı/Kammer
2016-10-18 13:14 ` Amirouche Boubekki
2016-10-18 14:27 ` Ludovic Courtès
2016-10-19 7:18 ` Amirouche Boubekki
2016-10-20 14:00 ` Ludovic Courtès [this message]
2016-10-20 16:03 ` Amirouche Boubekki
2016-10-24 20:56 ` Ludovic Courtès
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=878ttjaznn.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=amirouche.boubekki@gmail.com \
--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 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.