Subject: Newest clisp broken?

From: Matti Koskinen <[email-masked]>
Date: Mon, 29 Mar 1999 16:25:30 +0300

hello all

	i've tried to build common music -package with the
	latest clisp (this year's version) but compilation
	terminates due to errors. I built clisp from sources
	using linux and rh5.1. then on my cds of red hat
	there's an old version (May 1997) of clisp and with
	that build goes ok.
	common music can be found from
ftp://ccrma-ftp.stanford.edu/pub/Lisp/cm/sources/cm.tar.gz if someone
	wants to look this. in my system compilation aborts 
	in midi.lisp.

	thanks

-matti
[email-masked]

---

From: Sam Steingold <[email-masked]>
Date: 29 Mar 1999 10:34:19 -0500

>>>> In message <[email-masked]>
>>>> On the subject of "Newest clisp broken?"
>>>> Sent on Mon, 29 Mar 1999 05:32:07 -0800 (PST)
>>>> Honorable Matti Koskinen <[email-masked]> writes:
 >> hello all
 >> 

could you please post the error message?

-- 
Sam Steingold (http://www.goems.com/~sds) running RedHat5.2 GNU/Linux
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
main(a){a="main(a){a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}

---

From: Matti Koskinen <[email-masked]>
Date: Mon, 29 Mar 1999 21:54:03 +0300

> could you please post the error message?

this is the tail of dribble:

The following special variables were not defined:
 CHANNEL-MESSAGE-CHANNEL MESSAGE CHANNEL-MESSAGE-OPCODE
 CHANNEL-MESSAGE-DATA1 CHANNEL-MESSAGE-DATA2 NOTE-OFF-CHANNEL
 NOTE-OFF-KEY NOTE-OFF-VELOCITY NOTE-ON-CHANNEL NOTE-ON-KEY
 NOTE-ON-VELOCITY KEY-PRESSURE-CHANNEL KEY-PRESSURE-KEY
 KEY-PRESSURE-PRESSURE CONTROL-CHANGE-CHANNEL CONTROL-CHANGE-CONTROLLER
 CONTROL-CHANGE-VALUE PROGRAM-CHANGE-CHANNEL PROGRAM-CHANGE-PROGRAM
 CHANNEL-PRESSURE-CHANNEL CHANNEL-PRESSURE-PRESSURE PITCH-BEND-CHANNEL
 PITCH-BEND-LSB PITCH-BEND-MSB SYSTEM-MESSAGE-ROUTE
 SYSTEM-MESSAGE-STATUS SYSTEM-MESSAGE-DATA1 SYSTEM-MESSAGE-DATA2
 SYSEX-ROUTE MTC-QUARTER-FRAME-ROUTE SONG-POSITION-ROUTE
 SONG-POSITION-LSB SONG-POSITION-MSB SONG-SELECT-ROUTE SONG-SELECT-SONG
 CABLE-SELECT-ROUTE CABLE-SELECT-CABLE TUNE-REQUEST-ROUTE EOX-ROUTE
 TIMING-CLOCK-ROUTE TIMING-TICK-ROUTE START-ROUTE CONTINUE-ROUTE
 STOP-ROUTE ACTIVE-SENSING-ROUTE SYSTEM-RESET-ROUTE META-MESSAGE-TYPE
;; Loading file /root/cm-1.3/midi/ml.fas ...
*** - symbol CHANNEL-MESSAGE-CHANNEL has no value

this is part of ml.lisp where these are defined:

(eval-when #+cltl2 (:load-toplevel :execute :compile-toplevel)
           #-cltl2 (load eval compile)
  (proclaim
   '(inline
     ;; channel messages
     make-channel-message channel-message-channel
     channel-message-opcode channel-message-data1
     channel-message-data2
     note-off-channel note-off-key note-off-velocity
     note-on-channel note-on-key note-on-velocity
     key-pressure-channel key-pressure-key key-pressure-pressure
     control-change-channel control-change-controller
control-change-value
     program-change-channel program-change-program
     channel-pressure-channel channel-pressure-pressure
     pitch-bend-channel pitch-bend-lsb pitch-bend-msb

	... etc.
	
(defun channel-message-channel (message)
  (ldb mi_d:+enc-logical-channel-byte+ message))

-matti
[email-masked]

---

From: Tobias Kunze <[email-masked]>
Date: Mon, 29 Mar 1999 17:36:05 -0500

Hi Matti-

I have no problems in my clisp.  I believe your clisp breaks
at l. 437 in ml.lisp, when 

  (define-message-setf channel-message-channel ...)

is called.  That is, for some reason this symbol gets evaluated
as a symbol instead of taken as name for define-setf-method:

In other words, it seems as if define-message-setf, defined 
on l. 389, is broken in your clisp.  Anyway, in order to 
try it out on a scaled-down version of cm, could you compile-
load the attached file in a vanilla clisp?  Here is what it 
should look like:

  tkunze@ulysses:~ [86]> clisp -q
  
  > (compile-file "~/tmp/matti.lisp")
  
  Compiling file /usr/people/tkunze/tmp/matti.lisp ...
  
  Compilation of file /usr/people/tkunze/tmp/matti.lisp is finished.
  0 errors, 0 warnings
  #P"/usr/people/tkunze/tmp/matti.fas" ;
  NIL ;
  NIL
  > (load *)
  ;; Loading file /usr/people/tkunze/tmp/matti.fas ...
  "-- proclaiming --" 
  "-- defining define-message-setf --" 
  "-- defining message-setf --" 
  ;; Loading of file /usr/people/tkunze/tmp/matti.fas is finished.
  T
  > (lisp-implementation-version)
  "1998-09-09 (September 1998)"

-Tobias

______________________________________________________________________

Tobias Kunze                     [email-masked]
CCRMA, Stanford University       http://www-ccrma.stanford.edu/~tkunze

;;;
;;; File:         matti.lisp
;;;
;;; Summary:      test matti's cm/clisp problem
;;;
;;; Author:       Tobias Kunze
;;; e-Mail:       [email-masked]
;;; Org:          CCRMA, Stanford University
;;;
;;; orig-Date:    29-Mar-99 at 17:16:52
;;; Last-Mod:     29-Mar-99 at 17:29:22 by Tobias Kunze
;;;
;;; Revision:     
;;;
;;; Description:  
;;;
;;; Changes:
;;;   dd-Mmm-yy   tk    <change>

(in-package :user)

;;;
;;;

(eval-when #+cltl2 (:load-toplevel) #-cltl2 (load)
  (print "-- proclaiming --"))

(eval-when #+cltl2 (:load-toplevel :execute :compile-toplevel)
	   #-cltl2 (load eval compile)
  (proclaim
   '(inline channel-message-channel)))

;;;
;;;

(eval-when #+cltl2 (:load-toplevel) #-cltl2 (load)
  (print "-- defining define-message-setf --"))

(eval-when (compile load eval)
(defmacro define-message-setf (accessor bytespec)
  `(#-(and cltl2 excl) define-setf-method
    #+(and cltl2 excl) define-setf-expander
    ,accessor (message)
    (multiple-value-bind (temps vals stores store-form access-form)
	(#-(and cltl2 excl) get-setf-method
	   #+(and cltl2 excl) get-setf-expansion
	   message)
      (let ((val (gensym))
	    (msg (first stores)))
	(values temps
		vals
		(list val)
		,`(list 'let* (list (list msg (list 'dpb val ',bytespec
						    access-form)))
		   store-form
		   val)
		,`(list 'ldb ',bytespec access-form))))))
  )

;;;
;;;

(eval-when #+cltl2 (:load-toplevel) #-cltl2 (load)
  (print "-- defining message-setf --"))

(define-message-setf channel-message-channel (byte 14 18))

;;;
;;; -*- EOF -*-

---

From: Sam Steingold <[email-masked]>
Date: 30 Mar 1999 09:14:03 -0500

>>>> In message <[email-masked]>
>>>> On the subject of "Re: Newest clisp broken?"
>>>> Sent on Tue, 30 Mar 1999 00:05:31 -0800 (PST)
>>>> Honorable Tobias Kunze <[email-masked]> writes:
 >> 

of course: `define-message-setf' is broken: clisp doesn't have
`define-setf-method' as it was replaced with `define-setf-expander' in
ANSI CL.  Please replace

with

(defmacro define-message-setf (accessor bytespec)
  `(#-ansi-cl define-setf-method
    #+ansi-cl define-setf-expander
    ,accessor (message)

and calll CLISP with the "-a" switch.

Type louder, please.

---

From: Tobias Kunze <[email-masked]>
Date: Tue, 30 Mar 1999 09:57:05 -0500

or probably better

(defmacro define-message-setf (accessor bytespec)
  `(#-(or ansi-cl cltl2) ansi-cl define-setf-method
    #+(or ansi-cl cltl2) define-setf-expander
    ,accessor (message)

as it is also in cltl2.

Thanks a lot, Sam!

-Tobias

---

From: Matti Koskinen <[email-masked]>
Date: Tue, 30 Mar 1999 18:13:20 +0300

>   "1998-09-09 (September 1998)"

	i get exactly the same output

[2]> (compile-file "matti.lisp")

Compiling file /home/mjkoskin/midi-comp/matti.lisp ...

Compilation of file /home/mjkoskin/midi-comp/matti.lisp is finished.
0 errors, 0 warnings
#P"/home/mjkoskin/midi-comp/matti.fas" ;
NIL ;
NIL
[3]> (load *)
;; Loading file /home/mjkoskin/midi-comp/matti.fas ...
"-- proclaiming --" 
"-- defining define-message-setf --" 
"-- defining message-setf --" 
;; Loading of file /home/mjkoskin/midi-comp/matti.fas is finished.
T
[4]> (lisp-implementation-version)
"1999-01-08 (January 1999)"
[5]> 

-matti
[email-masked]

---

From: Tobias Kunze <[email-masked]>
Date: Tue, 30 Mar 1999 11:04:48 -0500

>         i get exactly the same output

*that* is weird.  Why does it work now if, as Sam said, 
define-setf-method is undefined in the newest clisp?

what does 

  * (describe 'define-setf-expander)
  * (describe 'define-setf-method) and
  * *features* 

return for you?

---

From: Rick Taube <[email-masked]>
Date: Tue, 30 Mar 1999 10:09:41 -0600

CLISP isnt "broken" its just that the new release is more ansi compliant
than the earlier one so the common music sources need to get updated. Sam
Shepard was kind enough to send me a trace of the problem definitions and
ill fix them asap.

---

From: Sam Steingold <[email-masked]>
Date: 30 Mar 1999 12:17:34 -0500

>>>> In message <[email-masked]>
>>>> Sent on Tue, 30 Mar 1999 08:12:29 -0800 (PST)

I wasn't clear enough. sorry.

`define-setf-method' is defined in the package SYSTEM (for backwards
compatibility), but is not exported to COMMON-LISP and
COMMON-LISP-USER. 

-- 
Sam Steingold (http://www.goems.com/~sds) running RedHat5.2 GNU/Linux
Micros**t is not the answer.  Micros**t is a question, and the answer is Linux,
(http://www.linux.org) the choice of the GNU (http://www.gnu.org) generation.
Why use Windows, when there are Doors?

---

From: Tobias Kunze <[email-masked]>
Date: Tue, 30 Mar 1999 12:44:59 -0500

hm why does my little example work for matti 
but cm as a whole not?

---

From: Tobias Kunze <[email-masked]>
Date: Tue, 30 Mar 1999 12:46:33 -0500

sorry--i meant to reply to Rick Taube only but as usual
was too fast with my mouse...  :/

---

From: Matti Koskinen <[email-masked]>
Date: Wed, 31 Mar 1999 12:11:29 +0300

> hm why does my little example work for matti

first thanks to all for solving this problem. i got cm built now.
still, there is something weird. it doesn't work. stella starts
and stella-commands work, but everything in parentheses are silently
ignored, but this may be an issue to discuss on cm-list.

-matti
[email-masked]