lispgames / cl-sdl2

Common Lisp bindings for SDL2 using C2FFI.
MIT License
309 stars 82 forks source link

Preferred SDL2 library method for installation on OSX #73

Closed fud closed 6 years ago

fud commented 8 years ago

I have tried to install SDL2 via homebrew and also downloaded the dmg for SDL2 from the webpage and installed it in /Library/Frameworks/ but I get issues.

I'm using ccl 1.11-r16635 with quicklisp installed. I'm getting this,

? (ql:quickload "sdl2")
To load "sdl2":
  Load 1 ASDF system:
    sdl2
; Loading "sdl2"
> Error: Unable to load any of the alternatives:
>           ((:FRAMEWORK "SDL2") (:DEFAULT "libSDL2"))
> While executing: CFFI::FL-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 >
rpav commented 8 years ago

Odd. I've confirmed people have recently installed via the frameworks method and it is loading normally. One suggestion was to confirm /Library/Frameworks has SDL2.framework (not SDL.framework), but... otherwise this should be a no-brainer I think, but I'm not particularly familiar with the OSX end of things.

fud commented 8 years ago

I double checked and it's SDL2.framework as you said. Maybe someone with OSX experience can chime in.

baldric:cl-sdl2 billsb$ ls -la /Library/Frameworks/SDL2.framework/
lrwxr-xr-x  1 billsb wheel  24 Jan  3 06:00 Headers -> Versions/Current/Headers
lrwxr-xr-x  1 billsb wheel  26 Jan  3 06:00 Resources -> Versions/Current/Resources
lrwxr-xr-x  1 billsb wheel  21 Jan  3 06:00 SDL2 -> Versions/Current/SDL2
drwxr-xr-x  4 billsb wheel 136 Jan  3 06:00 Versions
paines commented 8 years ago

Easiest way (IMHO) to deal with SDL (either 1 or 2) is via homebrew. All Lisps (Scheme or CL) will find and use easily the SDL libs and headers from homebrew, or GL/GLFW etc... I always too had trouble with the Framework packages.

fud commented 8 years ago

@paines Interestingly that's what I did originally and it didn't work. People on the #lisp channel on freenode suggested I try frameworks. I might uninstall Clozure CL and ~/quicklisp/ and reinstall everything.

paines commented 8 years ago

@fud Did you use sbcl/ccl from brew together with SDL from brew?

fud commented 8 years ago

@paines Yes I usually do everything through homebrew actually unless there isn't anything available.

mfiano commented 6 years ago

Is this still an issue?

fud commented 6 years ago

I didn’t get any further and gave up.