GNU bug report logs - #51903
[PATCH] gnu: Add cl-cmn.

Previous Next

Package: guix-patches;

Reported by: jgart <jgart <at> dismail.de>

Date: Wed, 17 Nov 2021 01:59:01 UTC

Severity: normal

Tags: patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51903 in the body.
You can then email your comments to 51903 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 01:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jgart <jgart <at> dismail.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 17 Nov 2021 01:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: guix-patches <at> gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>
Subject: [PATCH] gnu: Add cl-cmn.
Date: Tue, 16 Nov 2021 20:52:06 -0500
Hi Guixers,

This is a WIP.

I could use some help with it.

There are no releases and no version control.

CMN was written in the 90s and is still used today atleast by slippery-chicken (see below).

It currently builds successfully.

https://en.wikipedia.org/wiki/Common_Music_Notation  
https://ccrma.stanford.edu/software/cmn/cmn/cmn.html  

cmn is a dependency of slippery-chicken: 

https://github.com/mdedwards/slippery-chicken
http://michael-edwards.org/sc/

* gnu/packages/music.scm (cl-cmn): New variable.
---
 gnu/packages/music.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 60cff2cc28..ee130d7b54 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -66,6 +66,7 @@ (define-module (gnu packages music)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system asdf)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
@@ -6911,6 +6912,26 @@ (define-public shiru-lv2
       (home-page "http://shiru.untergrund.net/software.shtml")
       (license license:wtfpl2))))
 
+(define-public cl-cmn
+  (package
+    (name "cl-cmn")
+    (version "0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://ccrma.stanford.edu/software/cmn/cmn"
+                           ".tar.gz"))
+       (sha256
+        (base32
+         "1f4ivhg1vq2fwklmwjj30bj7ij1yab45rnjjwps3qpsh0lpd6yj3"))))
+    (build-system asdf-build-system/source)
+    (home-page "https://ccrma.stanford.edu/software/cmn/")
+    (synopsis "Western music notation package written in Common Lisp")
+    (description
+"CMN provides a package of functions to hierarchically describe a musical
+score. When evaluated, the musical score is rendered to an image.")
+    (license license:expat)))
+
 (define-public a2jmidid
   (package
     (name "a2jmidid")
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 07:51:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: jgart <jgart <at> dismail.de>, guix-patches <at> gnu.org
Cc: jgart <jgart <at> dismail.de>
Subject: Re: [PATCH] gnu: Add cl-cmn.
Date: Wed, 17 Nov 2021 08:49:48 +0100
[Message part 1 (text/plain, inline)]
Hi,

1. I believe you should place the lib in lisp-xyz.scm.

2. License is llgpl.

3. Then use the asdf-build-system/sbcl.
See the other sbcl- packages for reference.

Then define the cl- package with

--8<---------------cut here---------------start------------->8---
(define-public cl-cmn
  (sbcl-package->cl-source-package sbcl-cmn))
--8<---------------cut here---------------end--------------->8---

4. Since there are no version numbers, maybe use the date of the last
HISTORY.cmn entry, that is, 2016.8.17.

Hope that helps!
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 08:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: Pierre Neidhardt <mail <at> ambrevar.xyz>
Cc: 51903 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add cl-cmn.
Date: Wed, 17 Nov 2021 03:50:30 -0500
On Wed, 17 Nov 2021 08:49:48 +0100 Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:
> Hi,
> 
> 1. I believe you should place the lib in lisp-xyz.scm.
> 
> 2. License is llgpl.
> 
> 3. Then use the asdf-build-system/sbcl.
> See the other sbcl- packages for reference.
> 
> Then define the cl- package with
> 
> --8<---------------cut here---------------start------------->8---
> (define-public cl-cmn
>   (sbcl-package->cl-source-package sbcl-cmn))
> --8<---------------cut here---------------end--------------->8---
> 
> 4. Since there are no version numbers, maybe use the date of the last
> HISTORY.cmn entry, that is, 2016.8.17.
> 
> Hope that helps!

Hi Pierre,

Thanks for the suggestions. Much appreciated!

This is the error I currently get:

;   READ error during COMPILE-FILE:
;
;     Package CMN does not exist.
;
;       Line: 174, Column: 33, File-Position: 6136
;
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /gnu/store/wdsfha38v8mg638y6ilxar1qjkg57fbg-sbcl-cmn-2016.8.17/share/common-lisp/sbcl/cmn/cmn-all.lisp" {10057D4A03}>

; compilation aborted after 0:00:00.004
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                          {1001858103}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "cmn" "cmn-all">

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {1001858103}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {100586FF53}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK *INVOKE-DEBUGGER-HOOK* #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {100586FF53}>)
2: (INVOKE-DEBUGGER #<UIOP/LISP-BUILD:COMPILE-FILE-ERROR {100586FF53}>)
3: (ERROR UIOP/LISP-BUILD:COMPILE-FILE-ERROR :CONTEXT-FORMAT "~/asdf-action::format-action/" :CONTEXT-ARGUMENTS ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cmn" "cmn-all">)))
4: (UIOP/LISP-BUILD:CHECK-LISP-COMPILE-RESULTS NIL T T "~/asdf-action::format-action/" ((#<ASDF/LISP-ACTION:COMPILE-OP > . #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cmn" "cmn-all">)))
5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cmn" "cmn-all">)
6: ((LAMBDA NIL :IN ASDF/ACTION:CALL-WHILE-VISITING-ACTION))
7: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "cmn" "cmn-all">) [fast-method]
8: ((:METHOD ASDF/PLAN:PERFORM-PLAN (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1005608293}>) [fast-method]
9: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
10: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1005608293}>) [fast-method]
11: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/SYSTEM:SYSTEM "cmn"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) [fast-method]
12: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/SYSTEM:SYSTEM "cmn">)
13: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
14: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/SYSTEM:SYSTEM "cmn">) [fast-method]
15: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> ASDF/LISP-ACTION:COMPILE-OP "cmn")
16: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
17: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:COMPILE-OP "cmn") [fast-method]
18: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10055FFBCB}> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL)
19: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
20: (ASDF/SESSION:CALL-WITH-ASDF-SESSION #<FUNCTION (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {10055E0D2B}> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL)
21: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:COMPILE-OP "cmn") [fast-method]
22: (ASDF/OPERATE:COMPILE-SYSTEM "cmn")
23: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ASDF/OPERATE:COMPILE-SYSTEM "cmn") #<NULL-LEXENV>)
24: (EVAL (ASDF/OPERATE:COMPILE-SYSTEM "cmn"))
25: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(require :asdf)") (:EVAL . "(asdf:load-asd (truename \"/gnu/store/wdsfha38v8mg638y6ilxar1qjkg57fbg-sbcl-cmn-2016.8.17/share/common-lisp/sbcl/cmn/cmn.asd\"))") (:EVAL . "(asdf:compile-system \"cmn\")") (:QUIT)))
26: (SB-IMPL::TOPLEVEL-INIT)
27: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
28: ((FLET "WITHOUT-INTERRUPTS-BODY-1" :IN SB-IMPL::START-LISP))
29: (SB-IMPL::START-LISP)

unhandled condition in --disable-debugger mode, quitting
;
; compilation unit aborted
;   caught 2 fatal ERROR conditions
;   caught 1 ERROR condition
command "/gnu/store/42vycgb0gcyhhqsncyc5ybp83xwgp2dk-sbcl-2.1.9/bin/sbcl" "--non-interactive" "--eval" "(require :asdf)" "--eval" "(asdf:load-asd (truename \"/gnu/store/wdsfha38v8mg638y6ilxar1qjkg57fbg-sbcl-cmn-2016.8.17/share/common-lisp/sbcl/cmn/cmn.asd\"))" "--eval" "(asdf:compile-system \"cmn\")" failed with status 1
builder for `/gnu/store/0bz3b26x201mx7x1c6xmhyc98p04rhrs-sbcl-cmn-2016.8.17.drv' failed with exit code 1
build of /gnu/store/0bz3b26x201mx7x1c6xmhyc98p04rhrs-sbcl-cmn-2016.8.17.drv failed
Could not find build log for '/gnu/store/0bz3b26x201mx7x1c6xmhyc98p04rhrs-sbcl-cmn-2016.8.17.drv'.
guix build: error: build of `/gnu/store/0bz3b26x201mx7x1c6xmhyc98p04rhrs-sbcl-cmn-2016.8.17.drv' failed

Here's the package definition updated with the changes you requested:

```
(define-public sbcl-cmn
  (package
    (name "sbcl-cmn")
    (version "2016.8.17")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://ccrma.stanford.edu/software/cmn/cmn"
                           ".tar.gz"))
       (sha256
        (base32
         "1f4ivhg1vq2fwklmwjj30bj7ij1yab45rnjjwps3qpsh0lpd6yj3"))
       (file-name (string-append name "-" version))))
    (build-system asdf-build-system/sbcl)
    (arguments
     `(#:asd-systems '("cmn")
       #:asd-files '("cmn.asd")))
    (home-page "https://ccrma.stanford.edu/software/cmn/")
    (synopsis "Western music notation package written in Common Lisp")
    (description
"CMN provides a package of functions to hierarchically describe a musical
score. When evaluated, the musical score is rendered to an image.")
    (license license:llgpl)))

(define-public cl-cmn
  (sbcl-package->cl-source-package sbcl-cmn))
```

Anything that might be wrong in the above?




Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 08:59:02 GMT) Full text and rfc822 format available.

Message #14 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 51903 <at> debbugs.gnu.org
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>
Subject: [PATCH v2] gnu: Add cl-cmn.
Date: Wed, 17 Nov 2021 03:55:47 -0500
Here's an updated patch. This one fails to build.

See previous message for error log.

* gnu/packages/music.scm (cl-cmn): New variable.
---
 gnu/packages/lisp-xyz.scm | 27 +++++++++++++++++++++++++++
 gnu/packages/music.scm    |  1 +
 2 files changed, 28 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 4b17c173c9..3da203cba9 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -19209,6 +19209,33 @@ (define-public sbcl-fxml
 (define-public cl-fxml
   (sbcl-package->cl-source-package sbcl-fxml))
 
+(define-public sbcl-cmn
+  (package
+    (name "sbcl-cmn")
+    (version "2016.8.17")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://ccrma.stanford.edu/software/cmn/cmn"
+                           ".tar.gz"))
+       (sha256
+        (base32
+         "1f4ivhg1vq2fwklmwjj30bj7ij1yab45rnjjwps3qpsh0lpd6yj3"))
+       (file-name (string-append name "-" version))))
+    (build-system asdf-build-system/sbcl)
+    (arguments
+     `(#:asd-systems '("cmn")
+       #:asd-files '("cmn.asd")))
+    (home-page "https://ccrma.stanford.edu/software/cmn/")
+    (synopsis "Western music notation package written in Common Lisp")
+    (description
+"CMN provides a package of functions to hierarchically describe a musical
+score. When evaluated, the musical score is rendered to an image.")
+    (license license:llgpl)))
+
+(define-public cl-cmn
+  (sbcl-package->cl-source-package sbcl-cmn))
+
 (define-public sbcl-vernacular
   ;; No release.
   (let ((commit "79be179e9ada423b3ec41d2a1ea6f6e0266ed21f"))
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 60cff2cc28..3f335fcf30 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -66,6 +66,7 @@ (define-module (gnu packages music)
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix build-system asdf)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ant)
   #:use-module (guix build-system cmake)
-- 
2.33.1





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 09:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: jgart <jgart <at> dismail.de>
Cc: 51903 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add cl-cmn.
Date: Wed, 17 Nov 2021 10:24:06 +0100
[Message part 1 (text/plain, inline)]
The build file "cmn-all.lisp" is broken.
I've managed to patch it, the following builds but I haven't tested if
the result works properly.

--8<---------------cut here---------------start------------->8---
(define-public sbcl-cmn
  (package
    (name "sbcl-cmn")
    (version "2016.8.17")
    (source
     (origin
       (method url-fetch)
       (uri (string-append "https://ccrma.stanford.edu/software/cmn/cmn"
                           ".tar.gz"))
       (sha256
        (base32
         "1f4ivhg1vq2fwklmwjj30bj7ij1yab45rnjjwps3qpsh0lpd6yj3"))
       (file-name (string-append name "-" version))))
    (build-system asdf-build-system/sbcl)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'fix-build
           (lambda _
             (substitute* "cmn-all.lisp"
               (("\\(setf cmn::\\*cmn-binary-directory\\* \\(namestring \\(truename cmn-bin-directory\\)\\)\\)")
                "")
               (("\\(setf cmn::\\*cmn-source-directory\\* \\(namestring \\(truename cmn-directory\\)\\)\\)")
                "")
               (("\\(cmn-compile-and-load file\\)")
                "(load (asdf:system-relative-pathname :cmn file :type \"lisp\"))")))))))
    (home-page "https://ccrma.stanford.edu/software/cmn/")
    (synopsis "Western music notation package written in Common Lisp")
    (description
     "CMN provides a package of functions to hierarchically describe a musical
	score. When evaluated, the musical score is rendered to an image.")
    (license license:llgpl)))
--8<---------------cut here---------------end--------------->8---
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Wed, 17 Nov 2021 10:40:02 GMT) Full text and rfc822 format available.

Message #20 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: bil <at> ccrma.Stanford.EDU
To: 51903 <at> debbugs.gnu.org
Subject: cmn license etc
Date: Wed, 17 Nov 2021 02:39:30 -0800
The license entry in cmn.asd is incorrect -- I never
noticed that Rick Taube specified GPL.  The BSD
or MIT licenses are ok.  I wrote all of cmn; Rick was
just helping by adding the asd file, and I paid no
attention to it.  We weren't so concerned with licenses
in those days.  (I'll update the ccrma tarball).

cmn-all.lisp builds cmn fine for me -- is the problem
the directory?  Also to run it you need to be in
the cmn package.

Thanks for your interest in this software!





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 13:00:02 GMT) Full text and rfc822 format available.

Message #23 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: bil <at> ccrma.stanford.edu
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 12:51:16 +0000
[Message part 1 (text/plain, inline)]
bil <at> ccrma.Stanford.EDU skribis:

> The license entry in cmn.asd is incorrect -- I never
> noticed that Rick Taube specified GPL.  The BSD
> or MIT licenses are ok.  I wrote all of cmn; Rick was
> just helping by adding the asd file, and I paid no
> attention to it.  We weren't so concerned with licenses
> in those days.  (I'll update the ccrma tarball).
>
> cmn-all.lisp builds cmn fine for me -- is the problem
> the directory?  Also to run it you need to be in
> the cmn package.
>
> Thanks for your interest in this software!

Hi,

I took a look at this package and I noticed that the tarball doesn't
contain an asd file anymore. Instead of removing it, wouldn't it be
possible to just put the correct license in the asdf system definition?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 14:18:01 GMT) Full text and rfc822 format available.

Message #26 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: bil <at> ccrma.Stanford.EDU
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 06:16:59 -0800
I did not remove it; for some reason it wasn't in the
directory I used to make the tarball.





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 16:56:01 GMT) Full text and rfc822 format available.

Message #29 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: bil <at> ccrma.Stanford.EDU
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 16:20:29 +0000
[Message part 1 (text/plain, inline)]
bil <at> ccrma.Stanford.EDU skribis:

> I did not remove it; for some reason it wasn't in the
> directory I used to make the tarball.

In order for the compilation of cmn to put the files in the standard
locations used in GNU Guix, I changed the asd file to replace

  :components ((:file "cmn-all\" ))

by

  :serial t
  :components ((:file "cmn-init")
               (:file "cmn-utils")
               (:file "cmn-objects")
               (:file "cmn0")
               (:file "cmn-grfx")
               (:file "cmn-glyphs")
               (:file "cmn1")
               (:file "cmn2")
               (:file "cmn3")
               (:file "cmn4")
               (:file "rqq")
               (:file "wedge")
               (:file "accent")
               (:file "pedal")
               (:file "percussion")
               (:file "ring")
               (:file "rests")
               (:file "lyrics")
               (:file "transpose")
               (:file "pmn")
               (:file "quarter"))

and it almost works.
The only issue making the compilation fail is a type error warning by
sbcl, which I think is due to a bug in the program.

In the IDENTIFY-SCORE function of the "cmn2.lisp" file, the TIED-TAG
variable is defined by a "(find :tied-to (store-data object))" form,
which means that TIED-TAG will be either :TIED-TO or NIL.
However a few lines lower, the "(setf (second tied-tag) ...)" form
indicates that TIED-TAG must be a non-empty list.

From the surrounding code, I got the impression that
"(store-data object)" probably contains lists, and that the definition
of TIED-TAG should be something like

  (find :tied-to (store-data object) :key #'car)

With this, the compilation succeeds with sbcl and ecl, and the little
"(cmn treble c4 q)" example from the README file works.

I don't know if you're interested in the modified asd file, we can keep
it as a Guix-only thing anyway. However the TIED-TAG thing looks like an
actual bug.
What do you think?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 17:46:02 GMT) Full text and rfc822 format available.

Message #32 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: bil <at> ccrma.Stanford.EDU
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 09:45:12 -0800
Please do not repair code you don't understand.  First,
sbcl issues a warning, not an error.  The warning is
asinine -- find (in the original form) returns a list;
I check whether it is nil before setting a portion of it.
If you change the find statement to add :key #'car, you've
changed it from memq to assq (in Scheme nomenclature) --
these are not the same thing.  Your test of running
(cmn treble c4 q) did not hit the code in question, so
it tested nothing.  All you've done is add a bug to
my code.





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 18:04:01 GMT) Full text and rfc822 format available.

Message #35 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: bil <at> ccrma.Stanford.EDU
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 17:54:30 +0000
[Message part 1 (text/plain, inline)]
bil <at> ccrma.Stanford.EDU skribis:

> Please do not repair code you don't understand.  First,
> sbcl issues a warning, not an error.  The warning is
> asinine -- find (in the original form) returns a list;
> I check whether it is nil before setting a portion of it.
> If you change the find statement to add :key #'car, you've
> changed it from memq to assq (in Scheme nomenclature) --
> these are not the same thing.  Your test of running
> (cmn treble c4 q) did not hit the code in question, so
> it tested nothing.  All you've done is add a bug to
> my code.

If you take a look at the Common Lisp spec [1], you'll see that 'find'
returns an element, not a list. The function returning a list is
'member' [2].

[1] http://www.lispworks.com/documentation/HyperSpec/Body/f_find_.htm
[2] http://www.lispworks.com/documentation/HyperSpec/Body/f_mem_m.htm
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Sun, 21 Nov 2021 19:23:01 GMT) Full text and rfc822 format available.

Message #38 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: bil <at> ccrma.Stanford.EDU
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 11:22:21 -0800
Oh hell.  I'm forgetting CL.  My apologies. Your fix
was probably correct.





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Mon, 22 Nov 2021 00:31:01 GMT) Full text and rfc822 format available.

Message #41 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: bil <at> ccrma.Stanford.EDU
Cc: Guillaume Le Vaillant <glv <at> posteo.net>,
 Pierre Neidhardt <mail <at> ambrevar.xyz>, 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Sun, 21 Nov 2021 19:30:45 -0500
On Sun, 21 Nov 2021 11:22:21 -0800 bil <at> ccrma.Stanford.EDU wrote:
> Oh hell.  I'm forgetting CL.  My apologies. Your fix
> was probably correct.
> 

Hi everyone,

It's great that this was able to be resolved.

I'm looking forward to having a cmn package for guix.

Guillaume would you be so kind to send your patch to Bill?

Bill, would that be helpful?

I can then update the guix package to use the newer version of cmn once it is released and avoid 
having to patch the asd file.

all the best,

jgart




Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Mon, 22 Nov 2021 10:25:01 GMT) Full text and rfc822 format available.

Message #44 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: jgart <jgart <at> dismail.de>
Cc: bil <at> ccrma.Stanford.EDU, Pierre Neidhardt <mail <at> ambrevar.xyz>,
 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Mon, 22 Nov 2021 10:10:08 +0000
[Message part 1 (text/plain, inline)]
jgart <jgart <at> dismail.de> skribis:

> Hi everyone,
>
> It's great that this was able to be resolved.
>
> I'm looking forward to having a cmn package for guix.
>
> Guillaume would you be so kind to send your patch to Bill?
>
> Bill, would that be helpful?
>
> I can then update the guix package to use the newer version of cmn once it is released and avoid 
> having to patch the asd file.
>
> all the best,
>
> jgart

The patches I used are in attachment. Concerning the first one, it fixes
the type issue, but I don't know how to test wether running this code
produces a correct result or not.

[0001-cmn-fix-type-issue.patch (text/x-patch, attachment)]
[0002-cmn-asdf-system.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Mon, 22 Nov 2021 14:14:02 GMT) Full text and rfc822 format available.

Message #47 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: bil <at> ccrma.Stanford.EDU
To: jgart <jgart <at> dismail.de>
Cc: Guillaume Le Vaillant <glv <at> posteo.net>,
 Pierre Neidhardt <mail <at> ambrevar.xyz>, 51903 <at> debbugs.gnu.org
Subject: Re: [bug#51903] cmn license etc
Date: Mon, 22 Nov 2021 06:13:38 -0800
I have made those changes to my version of cmn, and updated
the tarball.





Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Mon, 22 Nov 2021 18:44:02 GMT) Full text and rfc822 format available.

Message #50 received at 51903 <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: 51903 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>,
 Pierre Neidhardt <mail <at> ambrevar.xyz>, jgart <jgart <at> dismail.de>
Subject: [PATCH v3] gnu: Add cl-cmn.
Date: Mon, 22 Nov 2021 13:35:50 -0500
Hi all,

I packaged the new tarball that Bill released. It builds successfully now.

Below is the new patch, v3:

Thank you to everyone for the help with this.

Guillaume and/or Pierre,

Here's a minimal example from the manual if you'd like to do a quick test in a repl:

```
(cmn (size 24) staff treble c4 w double-bar)
```

or a larger cmn example:

```
(cmn (size 24)
  (system brace 
    (staff treble (meter 6 8) 
      (c4 e. tenuto) (d4 s) (ef4 e sf) 
      (c4 e) (d4 s) (en4 s) (fs4 e (fingering 3))) 
    (staff treble (meter 3 4) 
      (c5 e. marcato) (d5 s bartok-pizzicato) (ef5 e) 
      (c5 e staccato tenuto) (d5 s down-bow) (en5 s) (fs5 e)))
  (system bracket
    (staff bar bass (meter 6 16) 
      (c4 e. wedge) (d4 s staccato) (ef4 e left-hand-pizzicato) 
      (c4 e tenuto accent rfz) (d4 s mordent) (en4 s pp) (fs4 e fermata))))
```

all best,

jgart

* gnu/packages/lisp-xyz.scm (cl-cmn, sbcl-cmn): New variable.
---
 gnu/packages/lisp-xyz.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index f891164fc8..3b11e169e6 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -19695,6 +19695,33 @@ (define-public sbcl-vernacular
 (define-public cl-vernacular
   (sbcl-package->cl-source-package sbcl-vernacular))
 
+(define-public sbcl-cmn
+  (package
+    (name "sbcl-cmn")
+    (version "2021.11.22")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://ccrma.stanford.edu/software/cmn/cmn"
+                           ".tar.gz"))
+       (sha256
+        (base32
+         "04j1l57cdyfi2zzxqwmvmf1hl899ffgs3bl4r42ba47zsw45kq14"))
+       (file-name (string-append name "-" version))))
+    (build-system asdf-build-system/sbcl)
+    (arguments
+     `(#:asd-systems '("cmn")
+       #:asd-files '("cmn.asd")))
+    (home-page "https://ccrma.stanford.edu/software/cmn/")
+    (synopsis "Western music notation package written in Common Lisp")
+    (description
+"CMN provides a package of functions to hierarchically describe a musical
+score. When evaluated, the musical score is rendered to an image.")
+    (license license:llgpl)))
+
+(define-public cl-cmn
+  (sbcl-package->cl-source-package sbcl-cmn))
+
 (define-public sbcl-cl-https-everywhere
   ;; No release.
   ;; Don't forget to update the https-everywhere input.
-- 
2.34.0





Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Mon, 22 Nov 2021 19:48:02 GMT) Full text and rfc822 format available.

Notification sent to jgart <jgart <at> dismail.de>:
bug acknowledged by developer. (Mon, 22 Nov 2021 19:48:02 GMT) Full text and rfc822 format available.

Message #55 received at 51903-done <at> debbugs.gnu.org (full text, mbox):

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: jgart <jgart <at> dismail.de>
Cc: 51903-done <at> debbugs.gnu.org, Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: Re: [PATCH v3] gnu: Add cl-cmn.
Date: Mon, 22 Nov 2021 19:45:39 +0000
[Message part 1 (text/plain, inline)]
Patch pushed as 6ac283bad7ace27ecd66dd8718b94db4628b48e5 with a few
modifications (copyright line, license field, ecl package).
Thanks.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51903; Package guix-patches. (Mon, 22 Nov 2021 20:13:01 GMT) Full text and rfc822 format available.

Message #58 received at 51903-done <at> debbugs.gnu.org (full text, mbox):

From: jgart <jgart <at> dismail.de>
To: Guillaume Le Vaillant <glv <at> posteo.net>
Cc: 51903-done <at> debbugs.gnu.org, Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: Re: [PATCH v3] gnu: Add cl-cmn.
Date: Mon, 22 Nov 2021 15:11:49 -0500
On Mon, 22 Nov 2021 19:45:39 +0000 Guillaume Le Vaillant <glv <at> posteo.net> wrote:
> Patch pushed as 6ac283bad7ace27ecd66dd8718b94db4628b48e5 with a few
> modifications (copyright line, license field, ecl package).
> Thanks.

Thank you! Much appreciated.

all best,

jgart




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 21 Dec 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.