From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] Add scheme-bytestructures Date: Thu, 20 Oct 2016 16:00:28 +0200 Message-ID: <878ttjaznn.fsf@gnu.org> References: <87fuo4hz3c.fsf@openmailbox.org> <8760p0gcer.fsf@gnu.org> <877f95ivf9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxDtd-0004tK-IT for guix-devel@gnu.org; Thu, 20 Oct 2016 10:00:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxDtY-00016S-QV for guix-devel@gnu.org; Thu, 20 Oct 2016 10:00:37 -0400 In-Reply-To: (Amirouche Boubekki's message of "Wed, 19 Oct 2016 07:18:37 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Amirouche Boubekki Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Amirouche Boubekki skribis: > find-files does the right thing, there is no need to filter what it retur= ns. > From ea88bf4b53a63ba0d54f71622d055c32cd7e346e Mon Sep 17 00:00:00 2001 > From: Amirouche > 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 =E2=80=98find-files=E2= =80=99 was called from the wrong directory): --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C2=A9 2016 Eraim Flashner ;;; Copyright =C2=A9 2016 Alex Kost ;;; Copyright =C2=A9 2016 Adonay "adfeno" Felipe Nogueira +;;; Copyright =C2=A9 2016 Amirouche ;;; ;;; This file is part of GNU Guix. ;;; @@ -1300,13 +1301,11 @@ is no support for parsing block and inline level HT= ML.") 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) =20 ;; Compile .scm files and install. @@ -1320,8 +1319,11 @@ is no support for parsing block and inline level HTM= L.") (string-r= index 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 un= wrapper getter setter meta) (%make-bytestructure-descriptor size alignment = unwrapper getter setter meta)))) Backtrace: In ice-9/boot-9.scm: 157: 12 [catch #t # ...] In unknown file: ?: 11 [apply-smob/1 #] 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 #] 4050: 7 [#] 1724: 6 [%start-stack load-stack #] 1729: 5 [#] 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 # #] 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/m0lqx4= wli55dfj45nsjhlhlvgql1p974-guile-bytestructures-20160726.53127f6/share/guil= e/site/2.0/bytestructures/r7/base.go"! --8<---------------cut here---------------end--------------->8--- Could you look into it and submit and updated patch? TIA! Ludo=E2=80=99. --=-=-=--