[CM] errors when (use-system :clm) and (load "instrument") commands are called

Uğur Güney ugurguney at gmail.com
Sun, 17 Feb 2008 08:56:42 +0200


# Hi all,
# I just came to the world of Common Music. I bought and read "Notes
from the Metalevel" like a novel. Now I'm studying interactions. I
want to use CM with CLM and Csound to produce scores and parameters.

http://commonmusic.sourceforge.net/doc/install.html
# I installed cm and clm in a folder under my home directory. run cm
using "cm.sh -e emacs" command. But when I run
(use-system :clm)
# command I get some error:
# in the interaction buffer there are lots of ";"s and

; Loading #P"/home/sokratesla/music/lisp/clm-3/clm.asd".
; loading system definition from /home/sokratesla/music/lisp/clm-3/clm.asd
; into #<The ASDF5186 package>

# lines repeats itself again and again. And this message is in the debug buffer.

File-error in function LISP::FD-OPEN:
   Error opening #P"/home/sokratesla/music/lisp/clm-3/clm.asd", Too
many open files.
   [Condition of type KERNEL:SIMPLE-FILE-ERROR]

Restarts:
  0: [CONTINUE] Return NIL.
  1: [CONTINUE] Return NIL from load of
#P"/home/sokratesla/music/lisp/clm-3/clm.asd".
... until ...
  1019: [CONTINUE] Return NIL from load of
#P"/home/sokratesla/music/lisp/clm-3/clm.asd".
  1020: [ABORT-REQUEST] Abort handling SLIME request.
  1021: [ABORT] Return to Top-Level.

Backtrace:
  0: (LISP::FD-OPEN #P"/home/sokratesla/music/lisp/clm-3/clm.asd"
:INPUT NIL NIL ...)
  1: (LISP::OPEN-FD-STREAM
#P"/home/sokratesla/music/lisp/clm-3/clm.asd" :DIRECTION :INPUT
:ELEMENT-TYPE ...)
  2: (LISP::INTERNAL-LOAD
#P"/home/sokratesla/music/lisp/clm-3/clm.asd"
#P"/home/sokratesla/music/lisp/clm-3/clm.asd" :ERROR NIL)
  3: (LOAD #P"/home/sokratesla/music/lisp/clm-3/clm.asd" :VERBOSE NIL
:PRINT ...)
  4: (ASDF:FIND-SYSTEM "clm" NIL)
  5: ((METHOD ASDF:FIND-COMPONENT NIL (# T)) #<#1=unused-arg> #<#1#>
#<#1#> "clm" ...)
  6: (ASDF::PARSE-COMPONENT-FORM NIL (:MODULE "clm" :PATHNAME
#P"/home/sokratesla/music/lisp/clm-3/" :DESCRIPTION ...))
  7: (ASDF::PARSE-COMPONENT-FORM 2 NIL (:MODULE "clm" :PATHNAME
#P"/home/sokratesla/music/lisp/clm-3/" :DESCRIPTION ...))[:EXTERNAL]
  8: (LISP::SLOLOAD #<Stream for file
"/home/sokratesla/music/lisp/clm-3/clm.asd">)
  9: (LISP::INTERNAL-LOAD
#P"/home/sokratesla/music/lisp/clm-3/clm.asd"
#P"/home/sokratesla/music/lisp/clm-3/clm.asd" :ERROR :SOURCE)
 10: (LISP::INTERNAL-LOAD
#P"/home/sokratesla/music/lisp/clm-3/clm.asd"
#P"/home/sokratesla/music/lisp/clm-3/clm.asd" :ERROR NIL)
 11: (LOAD #P"/home/sokratesla/music/lisp/clm-3/clm.asd" :VERBOSE NIL
:PRINT ...)
 12: (ASDF:FIND-SYSTEM "clm" NIL)
 13: ((METHOD ASDF:FIND-COMPONENT NIL (# T)) #<#1=unused-arg> #<#1#>
#<#1#> "clm" ...)
 14: (ASDF::PARSE-COMPONENT-FORM NIL (:MODULE "clm" :PATHNAME
#P"/home/sokratesla/music/lisp/clm-3/" :DESCRIPTION ...))
 15: (ASDF::PARSE-COMPONENT-FORM 2 NIL (:MODULE "clm" :PATHNAME
#P"/home/sokratesla/music/lisp/clm-3/" :DESCRIPTION ...))[:EXTERNAL]
...

# I am new both to lisp, emacs and cm so I can not figure out how to
handle this problem.





# Then, I pressed "1" and the system continued to loading:
; Loading #P"/home/sokratesla/music/lisp/clm-3/all.lisp".
;   using existing configuration file mus-config.h
; Compiling "/home/sokratesla/music/lisp/clm-3/io.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/headers.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/audio.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/sound.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/clm.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/sc.c"
; Compiling "/home/sokratesla/music/lisp/clm-3/cmus.c"
; Creating "/home/sokratesla/music/lisp/clm-3/libclm.so"
;;ld  -shared -fPIC -o /home/sokratesla/music/lisp/clm-3/libclm.so
/home/sokratesla/music/lisp/clm-3/headers.o
/home/sokratesla/music/lisp/clm-3/audio.o
/home/sokratesla/music/lisp/clm-3/io.o
/home/sokratesla/music/lisp/clm-3/sound.o
/home/sokratesla/music/lisp/clm-3/clm.o
/home/sokratesla/music/lisp/clm-3/cmus.o
/home/sokratesla/music/lisp/clm-3/sc.o  -L/usr/X11R6/lib -lX11
;; Loading #P"/home/sokratesla/music/lisp/clm-3/clm-package.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/initmus.x86f".
;;; Opening shared library /home/sokratesla/music/lisp/clm-3/libclm.so ...
;;; Done.
;; Loading #P"/home/sokratesla/music/lisp/clm-3/sndlib2clm.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/defaults.x86f".
; Building sndplay program: "/home/sokratesla/music/lisp/clm-3/sndplay"
;; Loading #P"/home/sokratesla/music/lisp/clm-3/ffi.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/mus.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/run.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/sound.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/defins.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/env.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/clm-snd.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/export.x86f".
;; Loading #P"/home/sokratesla/music/lisp/clm-3/clm1.x86f".
#<ASDF:SYSTEM "clm" {59617E0D}>

# Then I tried to compile a file:

(compile-file "beep.ins")

which is:

;;;
;;; A simple CLM instrument
;;;

(definstrument beep (start dur freq amp amp-env)
  (let* ((beg (seconds->samples start))
         (end (seconds->samples (+ start dur)))
         (osc (make-oscil :frequency freq))
         (env (make-env :envelope amp-env :scaler amp
                        :duration dur)))
    (run
     (loop for i from beg to end
           do
           (outa i (* (env env) (oscil osc)))))))

# It finished with this message:

; beep.x86f written.
; Compilation finished in 0:00:00.
#P"/home/sokratesla/music/lisp/instruments/beep.x86f"

# I think this is the expected result. But when I try to load the
instrument I get another error message:

(load "beep")
; Loading #P"/home/sokratesla/music/lisp/instruments/beep.x86f".


Undefined foreign symbol: "clm_beep2"
   [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

Backtrace:
  0: (KERNEL:UNDEFINED-FOREIGN-SYMBOL-ERROR-HANDLER "<error finding
name>" #.(SYSTEM:INT-SAP #x3FFFBE6C) #<Alien (* (ALIEN:STRUCT NIL # #
# ...)) at #x3FFFBAE4> (14))
  1: (KERNEL::INTERNAL-ERROR #.(SYSTEM:INT-SAP #x3FFFBAE4) #<unused-arg>)
  2: ("call_into_lisp+#x8C [#x805531C] /usr/bin/lisp")
  3: ("funcall2+#x2C [#x805510A] /usr/bin/lisp")
  4: ("interrupt_internal_error+#xC3 [#x80504A9] /usr/bin/lisp")
  5: ("sigtrap_handler+#x187 [#x8054F7C] /usr/bin/lisp")
  6: ("__kernel_sigreturn+#x0 [#xFFFFE420] ")
  7: ("os_link_one_symbol+#xC3 [#x8056303] /usr/bin/lisp")
  8: (LISP::ADD-FOREIGN-LINKAGE "clm_beep2" :CODE
#("resolve_linkage_tramp" 1 NIL "undefined_tramp" 1 ...) #<EQUAL hash
table, 301 entries {2807BB8D}> ...)
  9: (LISP::FOREIGN-SYMBOL-ADDRESS-AUX "clm_beep2" :CODE)
 10: (LISP::FOP-FOREIGN-FIXUP)
 11: (LISP::LOAD-GROUP #<Stream for file
"/home/sokratesla/music/lisp/instruments/beep.x86f">)
 12: (LISP::FASLOAD #<Stream for file
"/home/sokratesla/music/lisp/instruments/beep.x86f">)
 13: (LISP::INTERNAL-LOAD #P"beep.x86f"
#P"/home/sokratesla/music/lisp/instruments/beep.x86f" :ERROR :BINARY)
 14: (LOAD "beep" :VERBOSE NIL :PRINT ...)
 15: (SWANK::EVAL-REGION "(load \"beep\")
" T)
 16: ("DEFSLIMEFUN LISTENER-EVAL")
 17: (SWANK::CALL-WITH-BUFFER-SYNTAX #<Closure Over Function
"DEFSLIMEFUN LISTENER-EVAL" {595DFE99}>)
 18: ("DEFUN EVAL-FOR-EMACS")
 19: ("DEFINTERFACE CALL-WITH-DEBUGGER-HOOK" #<Function
SWANK:SWANK-DEBUGGER-HOOK {588F5D39}> #<Closure Over Function "DEFUN
EVAL-FOR-EMACS" {595DFD81}>)
 20: ("DEFUN HANDLE-REQUEST")
 21: ("DEFINTERFACE CALL-WITH-DEBUGGER-HOOK" #<Function
SWANK:SWANK-DEBUGGER-HOOK {588F5D39}> #<Function "DEFUN
HANDLE-REQUEST" {584E4559}>)
 22: (SWANK::CALL-WITH-REDIRECTED-IO #<SWANK::CONNECTION {58AB8D25}>
#<Closure Over Function "DEFUN CALL-WITH-CONNECTION" {595DEEB1}>)
 23: (SWANK::CALL-WITH-CONNECTION #<SWANK::CONNECTION {58AB8D25}>
#<Function "DEFUN HANDLE-REQUEST" {584E4559}>)
 24: (SWANK::HANDLE-REQUEST #<SWANK::CONNECTION {58AB8D25}>)
 25: (SWANK::PROCESS-AVAILABLE-INPUT #<Stream for descriptor 6>
#<Closure Over Function "DEFUN INSTALL-SIGIO-HANDLER" {595DEE61}>)
 26: ((FLET SWANK::HANDLER SWANK::INSTALL-SIGIO-HANDLER))
 27: (SWANK-BACKEND::SIGIO-HANDLER #<#1=unused-arg> #<#1#> #<#1#>)
 28: ("call_into_lisp+#x8C [#x805531C] /usr/bin/lisp")
 29: ("funcall3+#x32 [#x805513E] /usr/bin/lisp")
 30: ("interrupt_handle_now+#x105 [#x80506F8] /usr/bin/lisp")
 31: ("NIL+#x8050BBF [#x8050BBF] /usr/bin/lisp")
 32: ("__kernel_sigreturn+#x0 [#xFFFFE420] ")
 33: (SYSTEM:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL)
 34: (LISP::DO-INPUT #<Stream for Standard Input>)
 35: (LISP::INPUT-CHARACTER #<Stream for Standard Input> NIL (LISP::*EOF*))
 36: (LISP::SYNONYM-IN #<Synonym Stream to SYSTEM:*STDIN*> NIL (LISP::*EOF*))
 37: (LISP::TWO-WAY-IN #<Two-Way Stream, Input = #<Synonym Stream to
SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL
(LISP::*EOF*))
 38: (READ-CHAR #<Two-Way Stream, Input = #<Synonym Stream to
SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL
(LISP::*EOF*) NIL)
 39: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL #<Two-Way Stream,
Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output = #<Synonym Stream
to SYSTEM:*STDOUT*>> NIL (:EOF) T)
 40: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL #<Two-Way Stream,
Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output = #<Synonym Stream
to SYSTEM:*STDOUT*>> NIL (:EOF) NIL)
 41: (LISP::READ-PRESERVING-WHITESPACE-INTERNAL 4 #<Two-Way Stream,
Input = #<Synonym Stream to SYSTEM:*STDIN*>, Output = #<Synonym Stream
to SYSTEM:*STDOUT*>> NIL (:EOF) ...)[:EXTERNAL]
 42: (LISP::READ-INTERNAL #<Two-Way Stream, Input = #<Synonym Stream
to SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL
(:EOF) NIL)
 43: (READ #<Two-Way Stream, Input = #<Synonym Stream to
SYSTEM:*STDIN*>, Output = #<Synonym Stream to SYSTEM:*STDOUT*>> NIL
(:EOF) NIL)
 44: (LISP::%TOP-LEVEL)
 45: ((LABELS LISP::RESTART-LISP EXTENSIONS:SAVE-LISP))


# Sorry for filling the mail with error messages. If someone can help
me through this, I will be very happy. Thanks!
-ugur guney-