Hi,
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
TIA
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
Doesn't M-n take you to the error?
- Bill
"Bill Clementson" billclem@gmail.com writes:
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
Doesn't M-n take you to the error?
Excellent, just what I was looking for. It's my first real day with slime, so somethings are quite unfamiliar (at least compared to my usual C).
"Bill Clementson" billclem@gmail.com writes:
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
Doesn't M-n take you to the error?
I may have spoke too soon with my last message. It does let me walk through the stack trace to find the error that the compiler had, but it doesn't tell me where the compiler is in the file that it is compiling. Now that I think about it, this seems to be problem in the compiler, rather than in the source file, but i'm new to actually using lisp so I could just be totally wrong. Here is a listing of the stack trace (just up to the call to compile file, the actual trace is 200+ deep):
CL-USER> (compile-file "mus.lisp")
0.0 can't be converted to type NIL. [Condition of type SIMPLE-TYPE-ERROR]
Restarts: 0: [ABORT] Return to sldb level 4. 1: [ABORT] Return to sldb level 3. 2: [ABORT] Return to sldb level 2. 3: [ABORT] Return to sldb level 1. 4: [ABORT-REQUEST] Abort handling SLIME request. 5: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {9A66E61}>)
Backtrace: 0: ((FLET SB-IMPL::COERCE-ERROR)) 1: (COERCE 0.0 NIL) 2: (SB-KERNEL::ROUND-NUMERIC-BOUND 0.0 FLOAT NIL T) 3: (SB-KERNEL::NUMBER-SIMPLE-INTERSECTION2-TYPE-METHOD #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 4: (SB-KERNEL::%TYPE-INTERSECTION2 #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 5: (SB-KERNEL:TYPE-INTERSECTION2 #<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) 6: (SB-KERNEL::SIMPLIFY-INTERSECTIONS (#<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>)) 7: (SB-KERNEL::%TYPE-INTERSECTION (#<SB-KERNEL:NUMERIC-TYPE NUMBER> #<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>)) 8: (SB-KERNEL::FIXED-VALUES-OP (#<SB-KERNEL:NUMERIC-TYPE NUMBER>) (#<SB-KERNEL:NUMERIC-TYPE (FLOAT 0.0)>) #<SB-KERNEL:NAMED-TYPE T> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION>) 9: (SB-KERNEL::ARGS-TYPE-OP #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION> #<FUNCTION MAX>) 10: (SB-KERNEL::VALUES-TYPE-OP #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)> #<FUNCTION SB-KERNEL:TYPE-INTERSECTION> #<FUNCTION MAX>) 11: (SB-KERNEL:VALUES-TYPE-INTERSECTION #<SB-KERNEL:VALUES-TYPE (VALUES NUMBER &OPTIONAL)> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)>) 12: (SB-C::DERIVE-NODE-TYPE #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME / :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DECLARED :KIND :GLOBAL-FUNCTION {9D8D141}> {9D92CD9}> :ARGS (#<SB-C::REF :LEAF # {9D92DB1}> #<SB-C::REF :LEAF # {9D92E49}>) {9D92D11}> #<SB-KERNEL:VALUES-TYPE (VALUES (FLOAT 0.0) &REST T)>) 13: (SB-C::IR1-OPTIMIZE-COMBINATION #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME / :TYPE #<SB-KERNEL:FUN-TYPE #> :WHERE-FROM :DECLARED :KIND :GLOBAL-FUNCTION {9D8D141}> {9D92CD9}> :ARGS (#<SB-C::REF :LEAF # {9D92DB1}> #<SB-C::REF :LEAF # {9D92E49}>) {9D92D11}>) 14: (SB-C::IR1-OPTIMIZE-BLOCK #<SB-C::CBLOCK 7 :START c1 {9D890F9}>) 15: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}> NIL) 16: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 17: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 18: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "DEFUN BES-I0" :REANALYZE T {9D94A41}>) 19: (SB-C::COMPILE-TOPLEVEL (#<SB-C::CLAMBDA :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (SB-C::TOP-LEVEL-FORM #) :KIND :TOPLEVEL :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)> :WHERE-FROM :DEFINED :VARS NIL {9D88541}>) NIL) 20: (SB-C::CONVERT-AND-MAYBE-COMPILE (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL)) (#1=(SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL)) #2=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) #1#) (PROGN (EVAL-WHEN # #) #2#) SB-C::ORIGINAL-SOURCE-START 0 75)) 21: ((FLET SB-C::DEFAULT-PROCESSOR) (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL))) 22: (SB-C::PROCESS-TOPLEVEL-FORM (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 (CLM::X) (BLOCK CLM::BES-I0 #)) NIL (QUOTE NIL)) (#1=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #)) (PROGN (EVAL-WHEN # #) #1#) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 23: (SB-C::PROCESS-TOPLEVEL-PROGN ((SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL))) (#1=(EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #)) (PROGN (EVAL-WHEN # #) #1#) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 24: (SB-C::PROCESS-TOPLEVEL-FORM (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN (QUOTE CLM::BES-I0) (SB-INT:NAMED-LAMBDA CLM::BES-I0 # #) NIL (QUOTE NIL))) ((PROGN (EVAL-WHEN # #) (EVAL-WHEN # #)) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 25: (SB-C::PROCESS-TOPLEVEL-PROGN ((EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-C:%COMPILER-DEFUN # # T)) (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #))) ((PROGN (EVAL-WHEN # #) (EVAL-WHEN # #)) SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 26: (SB-C::PROCESS-TOPLEVEL-FORM (PROGN (EVAL-WHEN (:COMPILE-TOPLEVEL) (SB-C:%COMPILER-DEFUN # # T)) (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (SB-IMPL::%DEFUN # # NIL #))) (SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 27: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFUN CLM::BES-I0 (CLM::X) (IF (< # 3.75) (LET* # #) (LET* # #)))) 28: (SB-C::PROCESS-TOPLEVEL-FORM (DEFUN CLM::BES-I0 (CLM::X) (IF (< # 3.75) (LET* # #) (LET* # #))) (SB-C::ORIGINAL-SOURCE-START 0 75) NIL) 29: (SB-C::SUB-SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 30: ((LAMBDA NIL)) 31: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA NIL) {A3C2CB5}>) 32: (SB-C::SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 33: (COMPILE-FILE "mus.lisp")
I'm getting back into actual lisp development and I'm trying to install the common lisp music (clm) package using sbcl. I've gotten a compile error (in mus.lisp for those that are interested) that I'd like to figure out how to fix it, but I can't really find it since the error doesn't seem to provide line numbers for the error. Is there a way to get the line number that the error occured on printed?
Doesn't M-n take you to the error?
I may have spoke too soon with my last message. It does let me walk through the stack trace to find the error that the compiler had, but it doesn't tell me where the compiler is in the file that it is compiling. Now that I think about it, this seems to be problem in the compiler, rather than in the source file, but i'm new to actually using lisp so I could just be totally wrong. Here is a listing of the stack trace (just up to the call to compile file, the actual trace is 200+ deep):
[snipped stack trace]
Ok, I thought you had compiled the music.lisp as part of a build of the CLM package. I'm not familiar with CLM, but the documentation says:
How To Build CLM: In general start lisp and (load "all.lisp").
Have you done this? The README.clm file has full instructions.
- Bill
"Bill Clementson" billclem@gmail.com writes:
Ok, I thought you had compiled the music.lisp as part of a build of the CLM package. I'm not familiar with CLM, but the documentation says:
How To Build CLM: In general start lisp and (load "all.lisp").
Have you done this? The README.clm file has full instructions.
Yes, I have and the load/build failed during the compile of mus.lisp. I provided the stack trace from a call to compile-file since it gave the same compile error.
Ok, I thought you had compiled the music.lisp as part of a build of the CLM package. I'm not familiar with CLM, but the documentation says:
How To Build CLM: In general start lisp and (load "all.lisp").
Have you done this? The README.clm file has full instructions.
Yes, I have and the load/build failed during the compile of mus.lisp. I provided the stack trace from a call to compile-file since it gave the same compile error.
To me, it looks like it's a problem with the bes-i0 function; however, you will probably get better advice on a CLM mailing list.
Instead of using compile-file at the REPL in SLIME, try just doing C-c M-k when you are in the mus.lisp source file. That will compile the file and produce a list of compile errors in a separate *compiler-notes* buffer. In the *compiler-notes* buffer, you can place your cursor on the particular error message and press Enter. That will take you to the place in the mus.lisp source file where the compilation error occured.
- Bill
Ok, I thought you had compiled the music.lisp as part of a build of the CLM package. I'm not familiar with CLM, but the documentation says:
How To Build CLM: In general start lisp and (load "all.lisp").
Have you done this? The README.clm file has full instructions.
Yes, I have and the load/build failed during the compile of mus.lisp. I provided the stack trace from a call to compile-file since it gave the same compile error.
To me, it looks like it's a problem with the bes-i0 function; however, you will probably get better advice on a CLM mailing list.
Instead of using compile-file at the REPL in SLIME, try just doing C-c M-k when you are in the mus.lisp source file. That will compile the file and produce a list of compile errors in a separate *compiler-notes* buffer. In the *compiler-notes* buffer, you can place your cursor on the particular error message and press Enter. That will take you to the place in the mus.lisp source file where the compilation error occured.
I forgot to say that once you have done that, M-n and M-p take you to the next/previous compilation note. That was why I asked whether M-n worked in my first reply to you.
- Bill
Burton Samograd kruhft@gmail.com writes:
I found a solution to the problem I am having on the cmdist mailing list. Thanks for the help though.