3 ms·
Has anyone gotten cl-sdl2 to work with ECL? I'm trying to load it via quicklisp via "(ql:quickload :sdl2)" on my mac m1 for starters, but I get the following:
by BaculumMeumEst 3y ago
Has anyone gotten cl-sdl2 to work with ECL? I'm trying to load it via quicklisp via "(ql:quickload :sdl2)" on my mac m1 for starters, but I get the following:
https://pastebin.com/1nq1gqLQ https://pastebin.com/1nq1gqLQ
SDL2 is installed to /opt/homebrew/lib/libSDL2.dylib but I've never really learned how to work with cffi in common lisp for different architectures other than to search github issues and pray
- i_don_t_know 3y agoNo idea, but when you build C projects you have to tell the compiler/linker where to look for the library with sdl2-config: https://manpages.ubuntu.com/manpages/jammy/man1/sdl2-config.1.html#:~:text=sdl2%2Dconfig%20is%20a%20tool,and%20plugins%20that%20use%20SDL https://manpages.ubuntu.com/manpages/jammy/man1/sdl2-config..... Have you tried that?
- BaculumMeumEst 3y agoI can build projects using sdl2 in C with sdl2-config, or using cl-sdl2 with SBCL by following some steps I found online to fix macbook m1 quirks (see below). Right now I’m trying and failing to load cl-sdl2 it from an ECL repl- I’m not sure how sdl2-config would be used in that situation. ECL is installed via homebrew but I’m not really sure how it’s configured to look for C libraries for cffi or how I should tell it where to look. https://github.com/lispgames/cl-sdl2/issues/154#issuecomment-1280030566 https://github.com/lispgames/cl-sdl2/issues/154#issuecomment...
- i_don_t_know 3y agoTry pointing one of the environment variables mentioned here to your installation of SDL2 before launching ECL: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/UsingDynamicLibraries.html https://developer.apple.com/library/archive/documentation/De... LD_LIBRARY_PATH DYLD_LIBRARY_PATH DYLD_FALLBACK_LIBRARY_PATH I don’t know if there’s a way to do that from within ECL.
- BaculumMeumEst 3y agoThank you! That got me past the error and on to the next one. :)
- r9550684 3y agoI'd start by trying to add all the different paths to cffi:*foreign-library-directories* cffi:*darwin-framework-directories* and if that doesn't work for whatever reason, patching the library definition in cl-sdl2 https://raw.githubusercontent.com/lispgames/cl-sdl2/main/src/library.lisp https://raw.githubusercontent.com/lispgames/cl-sdl2/main/src...