Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems compiling shader-entity.lisp in ccl and clasp #20

Closed
kpoeck opened this issue Apr 19, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@kpoeck
Copy link

commented Apr 19, 2019

Solved the first problems, now to the next.

I have trouble in ccl with that with the expression (find-class 'shader-entity) at
https://github.com/Shirakumo/trial/blob/master/shader-entity.lisp#L81
Had to change to

(defmethod compute-effective-shader-class ((class shader-entity-class))
  (if (direct-shaders class)
      class
      (let* ((effective-superclasses (list (find-class 'shader-entity nil))))
....

to enable ccl and clasp to compile.

This is called from
c2mop:finalize-inheritance :after ((class shader-entity-class))
well before

(defclass shader-entity (entity)
  ()
  (:metaclass shader-entity-class))

is executed.

Is it possible that you rely on undefined behavior here?

@Shinmera

This comment has been minimized.

Copy link
Member

commented Apr 19, 2019

Plase when you report bugs include the error message and a full backtrace.

@kpoeck

This comment has been minimized.

Copy link
Author

commented Apr 20, 2019

karsten-poecks-macbook-pro:local-projects karstenpoeck$ /Users/karstenpoeck/lisp/compiler/ccl-git/dx86cl64
Clozure Common Lisp Version 1.12-dev (v1.12-dev.4-6-gc3b1e184) DarwinX8664

For more information about CCL, please see http://ccl.clozure.com.

CCL is free software.  It is distributed under the terms of the Apache
Licence, Version 2.0.
? (load "~/quicklisp/setup.lisp")
#P"/Users/karstenpoeck/quicklisp/setup.lisp"
? (ql:quickload :trial) 
... 
[package cl+trial]................................
[package trial-user]..............................
..............
> Error: Class SHADER-ENTITY not found.
> While executing: CCL::CLASS-CELL-FIND-CLASS, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
 (1465290) : 0 (CLASS-CELL-FIND-CLASS #<CLASS-CELL for SHADER-ENTITY #x302003E3593D> T) 293
 (14652B8) : 1 (FUNCALL #'#<#<STANDARD-METHOD COMPUTE-EFFECTIVE-SHADER-CLASS (SHADER-ENTITY-CLASS)>> #<SHADER-ENTITY-CLASS SHADER-ENTITY>) 101
 (14652D0) : 2 (FUNCALL #'#<#<STANDARD-METHOD CCL:FINALIZE-INHERITANCE :AFTER (SHADER-ENTITY-CLASS)>> #<SHADER-ENTITY-CLASS SHADER-ENTITY>) 325
 (14652E8) : 3 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<STANDARD-METHOD CCL:FINALIZE-INHERITANCE :AFTER #> . 2673269)) 1261
 (1465358) : 4 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #<CCL::STANDARD-KERNEL-METHOD CCL:FINALIZE-INHERITANCE #>) 2673269) 237
 (14653B8) : 5 (UPDATE-CLASS #<SHADER-ENTITY-CLASS SHADER-ENTITY> NIL) 141
 (14653D8) : 6 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL::ENSURE-CLASS-INITIALIZED (CCL::SLOTS-CLASS)>> #<SHADER-ENTITY-CLASS SHADER-ENTITY> :DIRECT-SUPERCLASSES (#<STANDARD-CLASS ENTITY>) :DIRECT-SLOTS NIL :DIRECT-DEFAULT-INITARGS NIL :DOCUMENTATION NIL :PRIMARY-P NIL) 1789
 (1465440) : 7 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL #<CCL::STANDARD-KERNEL-METHOD INITIALIZE-INSTANCE :AFTER #> . 2673312)) 1261
 (14654B0) : 8 (%%STANDARD-COMBINED-METHOD-DCODE ((#<#>) (#<#>) #<CCL::STANDARD-KERNEL-METHOD INITIALIZE-INSTANCE #>) 2673312) 237
 (1465540) : 9 (%MAKE-STD-INSTANCE #<STANDARD-CLASS SHADER-ENTITY-CLASS> (:NAME SHADER-ENTITY :DIRECT-SUPERCLASSES (#<STANDARD-CLASS ENTITY>) :DIRECT-SLOTS ...)) 309
 (1465568) : 10 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD MAKE-INSTANCE (STANDARD-CLASS)>> #<STANDARD-CLASS SHADER-ENTITY-CLASS> :NAME SHADER-ENTITY :DIRECT-SUPERCLASSES (#<STANDARD-CLASS ENTITY>) :DIRECT-SLOTS NIL) 157
 (1465590) : 11 (FUNCALL #'#<#<CCL::STANDARD-KERNEL-METHOD CCL:ENSURE-CLASS-USING-CLASS (NULL T)>> NIL SHADER-ENTITY :DIRECT-SUPERCLASSES (ENTITY) :DIRECT-SLOTS NIL :METACLASS SHADER-ENTITY-CLASS) 301
 (14655C8) : 12 (ENSURE-CLASS-FOR-DEFCLASS SHADER-ENTITY :DIRECT-SUPERCLASSES (ENTITY) :DIRECT-SLOTS NIL :METACLASS SHADER-ENTITY-CLASS) 349
 (14655F8) : 13 (FUNCALL #'#<CCL::$FASL-LFUNCALL> #<CCL::FASLSTATE #x1587F4D>) 77
 (1465618) : 14 (%FASLOAD "/Users/karstenpoeck/.cache/common-lisp/ccl-1.12-f98-macosx-x64/Users/karstenpoeck/quicklisp/local-projects/trial/shader-entity.dx64fsl" #(#<Compiled-function CCL::$FASL-NOOP (Non-Global)  #x300000120B4F> #<Compiled-function CCL::$FASL-S32-VECTOR (Non-Global)  #x300000120BBF> CCL::%BAD-FASL #<Compiled-function CCL::$FASL-CLFUN (Non-Global)  #x300000120C2F> #<Compiled-function CCL::$FASL-LFUNCALL (Non-Global)  #x300000120E2F> ...)) 1325
 (14656B0) : 15 (%LOAD #P"/Users/karstenpoeck/.cache/common-lisp/ccl-1.12-f98-macosx-x64/Users/karstenpoeck/quicklisp/local-projects/trial/shader-entity.dx64fsl" NIL NIL :ERROR :DEFAULT NIL) 4477
 (1465828) : 16 (LOAD #P"/Users/karstenpoeck/.cache/common-lisp/ccl-1.12-f98-macosx-x64/Users/karstenpoeck/quicklisp/local-projects/trial/shader-entity.dx64fsl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT :PRESERVE-OPTIMIZATION-SETTINGS NIL) 1141
 (14658D0) : 17 (CALL-WITH-MUFFLED-CONDITIONS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL UIOP/LISP-BUILD:LOAD*) #x302003E05CDF> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS))) 429
 (1465920) : 18 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE ((NIL) #<STANDARD-METHOD ASDF/ACTION:PERFORM #> #<LOAD-OP> #<CL-SOURCE-FILE "trial" "shader-entity">)) 861
 (1465980) : 19 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD ASDF/ACTION:PERFORM #> #<LOAD-OP> #<CL-SOURCE-FILE "trial" "shader-entity">)) 485
 (14659E8) : 20 (FUNCALL #'#<(:INTERNAL ASDF/ACTION:CALL-WHILE-VISITING-ACTION)>) 757
 (1465A58) : 21 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/ACTION:PERFORM :AROUND #> (#<#>) (#<#>) #<STANDARD-METHOD ASDF/ACTION:PERFORM #>) 2673495) 701
 (1465AD0) : 22 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS #> . 2673562)) 1037
 (1465B48) : 23 (FUNCALL #'#<#<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)>> #<LOAD-OP> #<CL-SOURCE-FILE "trial" "shader-entity">) 477
 (1465BA0) : 24 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS #> . 2673562)) 1037
 (1465C18) : 25 (FUNCALL #'#<#<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)>> #<LOAD-OP> #<CL-SOURCE-FILE "trial" "shader-entity">) 717
 (1465C78) : 26 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND #> #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS #> #<STANDARD-METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS #>) 2673562) 701
 (1465CE8) : 27 (FUNCALL #'#<#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN (T)>> #<ASDF/PLAN:SEQUENTIAL-PLAN #x302000999E8D>) 325
 (1465D20) : 28 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN #> . 2673622)) 1037
 (1465D98) : 29 (CALL-WITH-COMPILATION-UNIT #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY #) #x158892F> :OVERRIDE NIL) 197
 (1465DE0) : 30 (FUNCALL #'#<#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)>> #<ASDF/PLAN:SEQUENTIAL-PLAN #x302000999E8D>) 493
 (1465E50) : 31 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN :AROUND #> #<STANDARD-METHOD ASDF/PLAN:PERFORM-PLAN #>) 2673622) 701
 (1465EC0) : 32 (%%CHECK-KEYWORDS #(1 #() #<Combined-Method ASDF/PLAN:PERFORM-PLAN #x3020007B0D5F>) 2673633) 261
 (1465F18) : 33 (FUNCALL #'#<#<STANDARD-METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)>> #<LOAD-OP> #<SYSTEM "trial"> :PLAN-CLASS NIL :PLAN-OPTIONS NIL) 229
 (1465F60) : 34 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE #> #<LOAD-OP> #<SYSTEM "trial"> :VERBOSE ...)) 485
 (1465FC8) : 35 (FUNCALL #'#<(:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T)))>) 1565
 (14660B0) : 36 (FUNCALL #'#<#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)>> ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE #> #<LOAD-OP> #<SYSTEM "trial"> :VERBOSE ...) #<LOAD-OP> #<SYSTEM "trial">) 573
 (1466120) : 37 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND #> (#<#> #<#>) NIL #<STANDARD-METHOD ASDF/OPERATE:OPERATE #>) 2673712) 701
 (14661A8) : 38 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE #> ASDF/LISP-ACTION:LOAD-OP "trial" :VERBOSE ...)) 485
 (1466210) : 39 (FUNCALL #'#<(:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T)))>) 1565
 (14662F8) : 40 (FUNCALL #'#<#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)>> ((NIL) #<STANDARD-METHOD ASDF/OPERATE:OPERATE #> ASDF/LISP-ACTION:LOAD-OP "trial" :VERBOSE ...) ASDF/LISP-ACTION:LOAD-OP "trial") 573
 (1466368) : 41 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND #> (#<#>) NIL #<STANDARD-METHOD ASDF/OPERATE:OPERATE #>) 2673785) 701
 (14663F0) : 42 (CALL-WITH-ASDF-SESSION #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x30200099A95F> :OVERRIDE T :KEY NIL :OVERRIDE-CACHE T :OVERRIDE-FORCING NIL) 1413
 (14664A0) : 43 (FUNCALL #'#<(:INTERNAL (ASDF/OPERATE:OPERATE :AROUND (T T)))>) 1077
 (1466518) : 44 (CALL-WITH-ASDF-SESSION #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x302000981A2F> :OVERRIDE NIL :KEY NIL :OVERRIDE-CACHE NIL :OVERRIDE-FORCING NIL) 1413
 (14665C8) : 45 (FUNCALL #'#<#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND (T T)>> ((NIL) (# NIL #<#>) ASDF/LISP-ACTION:LOAD-OP "trial" :VERBOSE ...) ASDF/LISP-ACTION:LOAD-OP "trial") 573
 (1466638) : 46 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD ASDF/OPERATE:OPERATE :AROUND #> (#<#>) NIL #<STANDARD-METHOD ASDF/OPERATE:OPERATE #>) 2673874) 701
 (14666B8) : 47 (LOAD-SYSTEM "trial" :VERBOSE NIL) 173
 (1466718) : 48 (CALL-WITH-MACROEXPAND-PROGRESS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL QUICKLISP-CLIENT::APPLY-LOAD-STRATEGY) #x302000981C1F>) 229
 (1466770) : 49 (AUTOLOAD-SYSTEM-AND-DEPENDENCIES "trial" :PROMPT NIL) 1141
 (14667F0) : 50 (FUNCALL #'#<#<STANDARD-METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)>> #<QL-IMPL:CCL #x3020007E738D> #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL QUICKLISP-CLIENT::QL #) #x30200095D48F>) 493
 (14668B8) : 51 (FUNCALL #'#<#<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD (T)>> (:TRIAL) :PROMPT NIL :SILENT NIL :VERBOSE NIL) 637
 (1466958) : 52 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD #> :TRIAL)) 901
 (14669D0) : 53 (CALL-WITH-CONSISTENT-DISTS #<CCL:COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x30200095CF6F>) 213
 (1466A10) : 54 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD :AROUND #> #<STANDARD-METHOD QUICKLISP-CLIENT:QUICKLOAD #>) 2673998) 701
 (1466A80) : 55 (CALL-CHECK-REGS QUICKLISP-CLIENT:QUICKLOAD :TRIAL) 229
 (1466AB8) : 56 (TOPLEVEL-EVAL (QUICKLISP-CLIENT:QUICKLOAD :TRIAL) NIL) 789
 (1466B30) : 57 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x3020003CB72D> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #x3020003CB5CD> :BREAK-LEVEL 0 :PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP) (Non-Global)  #x30000058319F>) 2421
 (1466D78) : 58 (RUN-READ-LOOP :BREAK-LEVEL 0) 157
 (1466DA0) : 59 (TOPLEVEL-LOOP) 93
 (1466DB0) : 60 (FUNCALL #'#<(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 109
 (1466DD0) : 61 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 661
 (1466E68) : 62 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1) [Active] #x3020003CA41D> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020003C9F4F>)) 741
 (1466EF0) : 63 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL (CCL:PROCESS)))> #<TTY-LISTENER listener(1) [Active] #x3020003CA41D> (#<CCL:COMPILED-LEXICAL-CLOSURE # #x3020003C9F4F>)) 581
 (1466F98) : 64 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 277

@Shinmera Shinmera closed this in a7b38d9 Apr 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.