Closed cxxxr closed 1 year ago
The issue is an old GLFW being used. This should already be fixed on the latest.
Thank you for the support.
I have updated the following libraries.
And I have prepared a minimal code.
;; trying-alloy-example.asd
(defsystem "trying-alloy-example"
:depends-on ("alloy"
"alloy-glfw")
:serial t
:components ((:file "main")))
;; main.lisp
(defpackage :trying-alloy-example
(:use :cl)
(:local-nicknames
(#:glfw #:org.shirakumo.alloy.renderers.glfw)))
(in-package :trying-alloy-example)
(defun test ()
(glfw:with-screen (screen 'glfw:screen)
screen))
And when I called this, I got an error.
* (trying-alloy-example::test)
33
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD tid=55528 "main thread" RUNNING {1001418073}>:
:SHARED is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM ORG.SHIRAKUMO.FRAF.GLFW.CFFI:FLAG>.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Ignore the window hint.
1: [ABORT ] Exit debugger, returning to top level.
(CFFI::%FOREIGN-ENUM-VALUE #<CFFI::FOREIGN-ENUM ORG.SHIRAKUMO.FRAF.GLFW.CFFI:FLAG> :SHARED :ERRORP T)
source: (ERROR "~S is not defined as a keyword for enum type ~S." KEYWORD
TYPE)
0] backtrace
Backtrace for: #<SB-THREAD:THREAD tid=55528 "main thread" RUNNING {1001418073}>
0: (CFFI::%FOREIGN-ENUM-VALUE #<CFFI::FOREIGN-ENUM ORG.SHIRAKUMO.FRAF.GLFW.CFFI:FLAG> :SHARED :ERRORP T)
1: (ORG.SHIRAKUMO.FRAF.GLFW.CFFI:WINDOW-HINT :SHARED #.(SB-SYS:INT-SAP #X00000000))
2: ((:METHOD SHARED-INITIALIZE :AFTER (ORG.SHIRAKUMO.FRAF.GLFW:WINDOW T)) #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> #<unused argument> :INITIALIZE-CONTEXT T :WIDTH 1 :HEIGHT 1 :OPENGL-FORWARD-COMPAT T :OPENGL-PROFILE :OPENGL-CORE-PROFILE :CONTEXT-VERSION-MAJOR 3 :CONTEXT-VERSION-MINOR 3 :SHARED #.(SB-SYS:INT-SAP #X00000000) :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>) [fast-method]
3: ((SB-PCL::EMF SHARED-INITIALIZE) #<unused argument> #<unused argument> #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> T :INITIALIZE-CONTEXT T :WIDTH 1 :HEIGHT 1 :OPENGL-FORWARD-COMPAT T :OPENGL-PROFILE :OPENGL-CORE-PROFILE :CONTEXT-VERSION-MAJOR 3 :CONTEXT-VERSION-MINOR 3 :SHARED #.(SB-SYS:INT-SAP #X00000000) :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>)
4: ((SB-PCL::EMF INITIALIZE-INSTANCE) #<unused argument> #<unused argument> #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> :INITIALIZE-CONTEXT T :WIDTH 1 :HEIGHT 1 :OPENGL-FORWARD-COMPAT T :OPENGL-PROFILE :OPENGL-CORE-PROFILE :CONTEXT-VERSION-MAJOR 3 :CONTEXT-VERSION-MINOR 3 :SHARED #.(SB-SYS:INT-SAP #X00000000) :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>)
5: ((FLET CALL-NEXT-METHOD :IN "/home/user/projects/trying-alloy-example/.qlot/dists/glfw/software/glfw-1540de752b428242b43b99585d064283374bedf5/wrapper.lisp") #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> :INITIALIZE-CONTEXT T :WIDTH 1 :HEIGHT 1 :OPENGL-FORWARD-COMPAT T :OPENGL-PROFILE :OPENGL-CORE-PROFILE :CONTEXT-VERSION-MAJOR 3 :CONTEXT-VERSION-MINOR 3 :SHARED #.(SB-SYS:INT-SAP #X00000000) :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>) [more]
6: ((FLET CALL-NEXT-METHOD :IN "/home/user/projects/trying-alloy-example/.qlot/dists/alloy/software/alloy-28d214abf4bc2ed2b21cf674051d16b036b01b1a/renderers/glfw/renderer.lisp") #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> :WIDTH 1 :HEIGHT 1 :OPENGL-FORWARD-COMPAT T :OPENGL-PROFILE :OPENGL-CORE-PROFILE :CONTEXT-VERSION-MAJOR 3 :CONTEXT-VERSION-MINOR 3 :SHARED #.(SB-SYS:INT-SAP #X00000000) :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>) [more]
7: ((:METHOD INITIALIZE-INSTANCE :AROUND (ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:RENDERER)) #<ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN DEAD> :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>) [fast-method]
8: ((:METHOD MAKE-INSTANCE (CLASS)) #<STANDARD-CLASS ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN> :LAYOUT-TREE #<ORG.SHIRAKUMO.ALLOY:LAYOUT-TREE {1002067783}> :FOCUS-TREE #<ORG.SHIRAKUMO.ALLOY:FOCUS-TREE {1004266D53}>) [fast-method]
9: (ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW::CALL-WITH-SCREEN #<FUNCTION (FLET "INIT0" :IN TRYING-ALLOY-EXAMPLE::TEST) {53CCD5FB}> ORG.SHIRAKUMO.ALLOY.RENDERERS.GLFW:SCREEN)
10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (TRYING-ALLOY-EXAMPLE::TEST) #<NULL-LEXENV>)
11: (EVAL (TRYING-ALLOY-EXAMPLE::TEST))
12: (INTERACTIVE-EVAL (TRYING-ALLOY-EXAMPLE::TEST) :EVAL NIL)
13: (SB-IMPL::REPL-FUN NIL)
14: ((LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL))
15: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<FUNCTION (LAMBDA NIL :IN SB-IMPL::TOPLEVEL-REPL) {7FB9CAA6FC1B}>)
16: (SB-IMPL::TOPLEVEL-REPL NIL)
17: (SB-IMPL::TOPLEVEL-INIT)
18: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
19: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
20: (SB-IMPL::%START-LISP)
0]
I will continue to try, but if you have any advice I would appreciate it :pray:
Hmm, looks like the port to the new glfw library is not yet correct. I'll have to take a look once I have the time.
I could not get font-mixing and canvas examples to work in gnome on Ubuntu 23.04 wayland. I don't know the specific cause yet, but I couldn't find the issue, so I made one. As a workaround, if I use Ubuntu on xorg in gdm, it works fine.
version