lispgames / cl-sdl2-image

SDL_image 2.0 wrapper
MIT License
17 stars 14 forks source link

OSX install error on MacBook 2: missing sdl2-ffi:img-init-flags symbol #9

Closed mirkov closed 2 years ago

mirkov commented 2 years ago

Hello,

I am trying to get Sketch going on my MacBookAir laptop & SBCL. First step is to get SDL libraries. I got SDL2 running. Now I need to get sdl2-image running.

The error I get when loading the system is:

CL-USER> (ql:quickload "sdl2-image")
To load "sdl2-image":
  Load 1 ASDF system:
    sdl2-image
; Loading "sdl2-image"
; 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Symbol "IMG-INIT-FLAGS" not found in the SDL2-FFI package.
;   
;       Line: 7, Column: 73, File-Position: 259
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /Users/mirkov/.roswell/lisp/quicklisp/dists/quicklisp/software/cl-sdl2-image-20190202-git/src/general.lisp" {7005280793}>
; 

I got CL-SDL2 running following the post which provides an updated autowrap.lisp and SDL2.aarch64-apple-darwin9.spec files. I thought the same fix may work for sdl2-image.

I blindly applied the same fixes to SDL2-IMAGE as follows:

Any thoughts on how to fix this problem? Is this even the right path?

Thanks,

ZachFontenot commented 2 years ago

So that spec file is generated specifically for SDL2 itself. We need to generate one for SDL2_image for cl-autowrap to have anything to work with. I'm following more or less the same example here.

mirkov commented 2 years ago

There is a discussion and a posted solution on this Reddit Thread.

I will close this issue, redirecting interested users to that discussion.