(ql:quickload "sdl2") failures

575 views
Skip to first unread message

Donald Winiecki

unread,
Mar 9, 2014, 12:05:55 PM3/9/14
to quic...@googlegroups.com
Attempting to quickload cl-sdl2 this morning, I find no `cl-sdl2'.

I'm using SBCL 1.1.10, in SLIME.



CL-USER> (ql:quickload "cl-sdl2")

System "cl-sdl2" not found
[Condition of type QUICKLISP-CLIENT:SYSTEM-NOT-FOUND]

Restarts:
0: [ABORT] Give up on "cl-sdl2"
1: [RETRY] Retry SLIME REPL evaluation request.
2: [*ABORT] Return to SLIME's top level.
3: [ABORT] Abort thread (#<THREAD "repl-thread" RUNNING {C066DC1}>)

Backtrace:
0: ((LABELS QUICKLISP-CLIENT::RECURSE :IN
QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "cl-sdl2")
1: ((LAMBDA NIL :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY)) [external]
2: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN
QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) {C03C9A5}>)
3: (QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY #<unavailable argument>)
4: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "cl-sdl2" :PROMPT NIL)
5: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T))
#<unavailable argument> #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN
QUICKLISP-CLIENT:QUICKLOAD) {C03C51D}>) [fast-method]
6: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND
(QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {CF84B81}> #<CLOSURE (FLET
QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {C03C51D}>)
[fast-method]
7: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) #<unavailable argument>
:PROMPT NIL :VERBOSE NIL) [fast-method]
8: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN
QUICKLISP-CLIENT:QUICKLOAD) {C00E8D5}>)
9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-CLIENT:QUICKLOAD
"cl-sdl2") #<NULL-LEXENV>)
10: (EVAL (QUICKLISP-CLIENT:QUICKLOAD "cl-sdl2"))
--more--





No problem. Let's try SDL2. When trying to (ql:quickload "sdl2") I get
the following:


CL-USER> (ql:quickload "sdl2")
To load "sdl2":
Load 7 ASDF systems:
alexandria bordeaux-threads cl-autowrap cl-opengl
cl-plus-c cl-ppcre trivial-garbage
Install 3 Quicklisp releases:
cl-sdl2 trivial-channels trivial-timeout
; Fetching #<URL
"http://beta.quicklisp.org/archive/trivial-timeout/2013-08-13/trivial-timeout-20130813-darcs.tgz">
; 6.72KB
==================================================
6,884 bytes in 0.01 seconds (672.27KB/sec)
; Fetching #<URL
"http://beta.quicklisp.org/archive/trivial-channels/2013-12-11/trivial-channels-20131211-git.tgz">
; 2.64KB
==================================================
2,699 bytes in 0.00 seconds (2635.74KB/sec)
; Fetching #<URL
"http://beta.quicklisp.org/archive/cl-sdl2/2014-02-11/cl-sdl2-20140211-git.tgz">
; 296.48KB
==================================================
303,595 bytes in 2.76 seconds (107.38KB/sec)
; Loading "sdl2"
..................................................
[package plus-c]..................................
[package com.metabang.trivial-timeout]............
[package trivial-channels.queue]..................
[package trivial-channels]........................
[package sdl2-ffi]................................
[package sdl2-ffi.accessors]......................
[package sdl2-ffi.functions]......................
[package sdl2]....................................
[package sdl2-examples]



At this point the debugger blasts into action. I have to apologise
because this is TMI for me. I'm stuck not knowing what to do here. Any
assistance is greatly appreciated.



Unable to load any of the alternatives:
("libSDL2-2.0.so.0" "libSDL2")
[Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Restarts:
0: [RETRY] Try loading the foreign library again.
1: [USE-VALUE] Use another library instead.
2: [TRY-RECOMPILING] Recompile library and try loading it again
3: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "sdl2" "library">.
4: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE
"sdl2" "library"> as having been successful.
5: [ABORT] Give up on "sdl2"
--more--

Backtrace:
0: (CFFI::FL-ERROR "Unable to load any of the alternatives:~% ~S"
("libSDL2-2.0.so.0" "libSDL2"))
1: (CFFI::TRY-FOREIGN-LIBRARY-ALTERNATIVES SDL2::LIBSDL2
("libSDL2-2.0.so.0" "libSDL2"))
2: ((FLET CFFI::%DO-LOAD :IN CFFI::%DO-LOAD-FOREIGN-LIBRARY)
#<CFFI:FOREIGN-LIBRARY LIBSDL2> SDL2::LIBSDL2 (:OR "libSDL2-2.0.so.0"
"libSDL2"))
3: (CFFI:LOAD-FOREIGN-LIBRARY SDL2::LIBSDL2 :SEARCH-PATH NIL)
4: (CFFI:LOAD-FOREIGN-LIBRARY SDL2::LIBSDL2 :SEARCH-PATH NIL)
5: (SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for "file
/home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl"..
6: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file
/home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl"
{B..
7: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for
"file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/l..
8: (LOAD #P"/home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl"
:VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T ..
9: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL
:IN ASDF/LISP-ACTION:PERFORM-LISP-LOAD-FASL) {BA56075}> ("Overwriting
already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-..
10: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unavailable argument>
#<unavailable argument> #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL>
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">)
11: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS
(ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE))
#<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL>
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [f..
12: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T))
#<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL>
#<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [fast-method]
13: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST))
((#1=#<ASDF/LISP-ACTION:PREPARE-OP > . #2=#<ASDF/SYSTEM:SYSTEM
#3="alexandria">) (#1# . #4=#<ASDF/COMPONENT:STATIC-FILE #3#
"LICENCE">) (#5=#<ASDF/LISP-ACTION:..
14: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
15: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T))
((#1=#<ASDF/LISP-ACTION:PREPARE-OP > . #2=#<ASDF/SYSTEM:SYSTEM
#3="alexandria">) (#1# . #4=#<ASDF/COMPONENT:STATIC-FILE #3#
"LICENCE">) (#5=#<ASDF/LISP-AC..
16: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
17: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T))
#<ASDF/PLAN:SEQUENTIAL-PLAN {BDD8F79}> :VERBOSE NIL) [fast-method]
18: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION
ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL>
#<ASDF/SYSTEM:SYSTEM "sdl2"> :VERBOSE NIL) [fast-method]
19: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused
argument> #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL>
#<ASDF/SYSTEM:SYSTEM "sdl2"> :VERBOSE NIL)
--more--



Best wishes,

_don

Luís Oliveira

unread,
Mar 9, 2014, 12:30:39 PM3/9/14
to quic...@googlegroups.com
On Sun, Mar 9, 2014 at 4:05 PM, Donald Winiecki
<dwin...@boisestate.edu> wrote:
> Unable to load any of the alternatives:
> ("libSDL2-2.0.so.0" "libSDL2")
> [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

This means cl-sdl2 couldn't find libSDL in your system. Did you install libSDL?

--
Luís Oliveira
http://kerno.org/~luis/

djw

unread,
Mar 9, 2014, 1:17:37 PM3/9/14
to quic...@googlegroups.com
On Sunday, March 9, 2014 10:30:39 AM UTC-6, Luís Oliveira wrote:
On Sun, Mar 9, 2014 at 4:05 PM, Donald Winiecki
<dwin...@boisestate.edu> wrote:
> Unable to load any of the alternatives:
>    ("libSDL2-2.0.so.0" "libSDL2")
>    [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

This means cl-sdl2 couldn't find libSDL in your system. Did you install libSDL?


Thanks. I did miss some critical stuff about installing, in this case the SDL2 C libraries (https://github.com/lispgames/cl-sdl2).

But even after installing them following directions at the just-mentioned URL, I still get the same when trying (ql:quickload "sdl2"). The debugger output below looks the same as before.




Unable to load any of the alternatives:
   ("libSDL2-2.0.so.0" "libSDL2")
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Restarts:
 0: [RETRY] Try loading the foreign library again.
 1: [USE-VALUE] Use another library instead.
 2: [TRY-RECOMPILING] Recompile library and try loading it again
 3: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "sdl2" "library">.
 4: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE "sdl2" "library"> as having been successful.
 5: [ABORT] Give up on "sdl2"
 --more--

Backtrace:
  0: (CFFI::FL-ERROR "Unable to load any of the alternatives:~%   ~S" ("libSDL2-2.0.so.0" "libSDL2"))
  1: (CFFI::TRY-FOREIGN-LIBRARY-ALTERNATIVES SDL2::LIBSDL2 ("libSDL2-2.0.so.0" "libSDL2"))
  2: ((FLET CFFI::%DO-LOAD :IN CFFI::%DO-LOAD-FOREIGN-LIBRARY) #<CFFI:FOREIGN-LIBRARY LIBSDL2> SDL2::LIBSDL2 (:OR "libSDL2-2.0.so.0" "libSDL2"))
  3: (CFFI:LOAD-FOREIGN-LIBRARY SDL2::LIBSDL2 :SEARCH-PATH NIL)
  4: (SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl"..
  5: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl" {D..
  6: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/l..
  7: (LOAD #P"/home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T ..
  8: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL :IN ASDF/LISP-ACTION:PERFORM-LISP-LOAD-FASL) {DCA3495}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-..
  9: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unavailable argument> #<unavailable argument> #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">)
 10: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [f..
 11: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [fast-method]
 12: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST)) ((#1=#<ASDF/LISP-ACTION:COMPILE-OP > . #2=#<ASDF/COMPONENT:STATIC-FILE #3="trivial-timeout" #4="notes" "notes.text">) (#5=#<ASDF/LISP-ACTION:LOAD-OP > . #2#) (..
 13: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 14: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) ((#1=#<ASDF/LISP-ACTION:COMPILE-OP > . #2=#<ASDF/COMPONENT:STATIC-FILE #3="trivial-timeout" #4="notes" "notes.text">) (#5=#<ASDF/LISP-ACTION:LOAD-OP > . #..
 15: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 16: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {D732CC9}> :VERBOSE NIL) [fast-method]
 17: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/SYSTEM:SYSTEM "sdl2"> :VERBOSE NIL) [fast-method]
 18: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) #<unused argument> #<unused argument> #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/SYSTEM:SYSTEM "sdl2"> :VERBOSE NIL)
 19: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE))
 --more--


Antoni Grzymała

unread,
Mar 9, 2014, 12:34:24 PM3/9/14
to quic...@googlegroups.com
Tako rzecze Luís Oliveira (2014-03-09, 16:30):

> On Sun, Mar 9, 2014 at 4:05 PM, Donald Winiecki
> <dwin...@boisestate.edu> wrote:
> > Unable to load any of the alternatives:
> > ("libSDL2-2.0.so.0" "libSDL2")
> > [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
>
> This means cl-sdl2 couldn't find libSDL in your system. Did you install libSDL?

Actually, it's the sdl2 library, as I said in my earlier e-mail,
different to sdl, in my distro it's provided in separate packages:

antoni@lemongrass ~ $ qfile /usr/lib64/libSDL-1.2.so.0
media-libs/libsdl (/usr/lib64/libSDL-1.2.so.0)

antoni@lemongrass ~ $ qfile /usr/lib64/libSDL2-2.0.so.0
media-libs/libsdl2 (/usr/lib64/libSDL2-2.0.so.0)

--
[アントシカ]

Antoni Grzymała

unread,
Mar 9, 2014, 12:12:54 PM3/9/14
to quic...@googlegroups.com
Tako rzecze Donald Winiecki (2014-03-09, 10:05):

> At this point the debugger blasts into action. I have to apologise
> because this is TMI for me. I'm stuck not knowing what to do here. Any
> assistance is greatly appreciated.
>
> Unable to load any of the alternatives:
> ("libSDL2-2.0.so.0" "libSDL2")
> [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

This is the root cause of the problem – you're missing the sdl2 shared
library. Depending on what unix/linux you're using there are various
ways you may want to obtain the library – if you give us more
information we might be able to suggest a solution (if it'll still
turn on to be necessary).

--
[アントシカ]

djw

unread,
Mar 9, 2014, 2:01:57 PM3/9/14
to quic...@googlegroups.com

I can now confirm that "libSDL2-2.0.so.0" is on the machine, yet the same issue occurs, as shown below.

In the meantime, I have traces of cl-sdl2 in my "~/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git" directory. Does this directory have to be removed for me to start over now that the libSDL2-2.0.so.0 library is available? (And if so, is accomplishing removal an RTFM?)




CL-USER> (ql:quickload "sdl2")
To load "sdl2":
  Load 1 ASDF system:
    sdl2
; Loading "sdl2"
.........

and then the debugger:


Unable to load any of the alternatives:
   ("libSDL2-2.0.so.0" "libSDL2")
   [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]

Restarts:
 0: [RETRY] Try loading the foreign library again.
 1: [USE-VALUE] Use another library instead.
 2: [TRY-RECOMPILING] Recompile library and try loading it again
 3: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "sdl2" "library">.
 4: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE "sdl2" "library"> as having been successful.
 5: [ABORT] Give up on "sdl2"
 --more--

Backtrace:
  0: (CFFI::FL-ERROR "Unable to load any of the alternatives:~%   ~S" ("libSDL2-2.0.so.0" "libSDL2"))
  1: (CFFI::TRY-FOREIGN-LIBRARY-ALTERNATIVES SDL2::LIBSDL2 ("libSDL2-2.0.so.0" "libSDL2"))
  2: ((FLET CFFI::%DO-LOAD :IN CFFI::%DO-LOAD-FOREIGN-LIBRARY) #<CFFI:FOREIGN-LIBRARY LIBSDL2> SDL2::LIBSDL2 (:OR "libSDL2-2.0.so.0" "libSDL2"))
  3: (CFFI:LOAD-FOREIGN-LIBRARY SDL2::LIBSDL2 :SEARCH-PATH NIL)
  4: (SB-FASL::LOAD-FASL-GROUP #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl"..
  5: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl" {D..
  6: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/l..
  7: (LOAD #P"/home/dwiniecki/.cache/common-lisp/sbcl-1.1.10-linux-x86/home/dwiniecki/quicklisp/dists/quicklisp/software/cl-sdl2-20140211-git/src/library.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T ..
  8: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL :IN ASDF/LISP-ACTION:PERFORM-LISP-LOAD-FASL) {D736D45}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-..

  9: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unavailable argument> #<unavailable argument> #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">)
 10: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS (ASDF/LISP-ACTION:LOAD-OP ASDF/LISP-ACTION:CL-SOURCE-FILE)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [f..
 11: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/LISP-ACTION:CL-SOURCE-FILE "sdl2" "library">) [fast-method]
 12: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST)) ((#1=#<ASDF/LISP-ACTION:COMPILE-OP > . #2=#<ASDF/COMPONENT:STATIC-FILE #3="trivial-timeout" #4="notes" "notes.text">) (#5=#<ASDF/LISP-ACTION:LOAD-OP > . #2#) (..
 13: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 14: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) ((#1=#<ASDF/LISP-ACTION:COMPILE-OP > . #2=#<ASDF/COMPONENT:STATIC-FILE #3="trivial-timeout" #4="notes" "notes.text">) (#5=#<ASDF/LISP-ACTION:LOAD-OP > . #..
 15: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 16: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {D1C6AF1}> :VERBOSE NIL) [fast-method]

Antoni Grzymała

unread,
Mar 9, 2014, 2:09:33 PM3/9/14
to quic...@googlegroups.com
Tako rzecze djw (2014-03-09, 11:01):

> I can now confirm that "libSDL2-2.0.so.0" is on the machine, yet the same
> issue occurs, as shown below.

What's the location of the shared library file?

> […]

> CL-USER> (ql:quickload "sdl2")
> To load "sdl2":
> Load 1 ASDF system:
> sdl2
> ; Loading "sdl2"
> .........
>
> and then the debugger:
>
> Unable to load any of the alternatives:
> ("libSDL2-2.0.so.0" "libSDL2")
> [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
>
> Restarts:
> 0: [RETRY] Try loading the foreign library again.
> 1: [USE-VALUE] Use another library instead.
^^^^^^^^^

Try the USE-VALUE restart and enter the full path of the
libSDL2-2.0.so.0 file and see if that works.

If it does, then we can sort out why QL isn't detecting the library
location automatically.

--
[アントシカ]

djw

unread,
Mar 9, 2014, 3:11:50 PM3/9/14
to quic...@googlegroups.com

it is in "/usrlocal/lib/libSDL2-2.0.so.0"

Invoking the restart suggested, I enter ("/usr/local/lib/libSDL2-2.0.so.0"), and the quickload continues, displaying lines of lots of happy little dots, until

CL-USER> (ql:quickload "sdl2")
To load "sdl2":
  Load 1 ASDF system:
    sdl2
; Loading "sdl2"
Enter a new value (unevaluated): ("/usr/local/lib/libSDL2-2.0.so.0")
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
.........................................
("sdl2")
CL-USER>

So this is apparently successful.  Yippie!  But why did we have to point things out to quicklisp quickload?

Antoni Grzymała

unread,
Mar 9, 2014, 3:14:47 PM3/9/14
to quic...@googlegroups.com
Tako rzecze djw (2014-03-09, 12:11):

> So this is apparently successful. Yippie! But why did we have to point
> things out to quicklisp quickload?

Because quicklisp doesn't know about libraries located in
/usr/local/lib/.

Try adding that directory to /etc/ld.so.conf, then running ldconfig
and seeing if that helps (THB, I'm not sure about QL's mechanism of
resolving library files, so perhaps someone more knowledgeable here
could chime in, please).

--
[アントシカ]

djw

unread,
Mar 9, 2014, 3:20:09 PM3/9/14
to quic...@googlegroups.com

Okay, and many thanks (!) for your patience and assistance.

Though the begging question (by this begging newbie) is, where should the library go so QL can find it, and how could I get it there during make install?

_don

Antoni Grzymała

unread,
Mar 9, 2014, 4:55:35 PM3/9/14
to quic...@googlegroups.com
Tako rzecze djw (2014-03-09, 12:20):
As I said earlier – editing /etc/ld.so.conf to include /usr/local/lib
(and running ldconfig) should probably be sufficient, did you try
that?

Also – are you certain, that your OS doesn't provide that library
prepackaged? If so, you wouldn't have to worry about compiling it by
hand and installing into /usr/local/.

--
[アントシカ]

djw

unread,
Mar 9, 2014, 5:06:34 PM3/9/14
to quic...@googlegroups.com
On Sunday, March 9, 2014 2:55:35 PM UTC-6, Antoni Grzymała wrote:
Tako rzecze djw (2014-03-09, 12:20):

> On Sunday, March 9, 2014 1:14:47 PM UTC-6, Antoni Grzymała wrote:
> >
> > Tako rzecze djw (2014-03-09, 12:11):
> >
> > > So this is apparently successful.  Yippie!  But why did we have to point
> > > things out to quicklisp quickload?
> >
> > Because quicklisp doesn't know about libraries located in
> > /usr/local/lib/.
> >
> > Try adding that directory to /etc/ld.so.conf, then running ldconfig
> > and seeing if that helps (THB, I'm not sure about QL's mechanism of
> > resolving library files, so perhaps someone more knowledgeable here
> > could chime in, please).
> >
> <snip>

> Though the begging question (by this begging newbie) is, where should the
> library go so QL can find it, and how could I get it there during make install?

As I said earlier – editing /etc/ld.so.conf to include /usr/local/lib
(and running ldconfig) should probably be sufficient, did you try
that?

Also – are you certain, that your OS doesn't provide that library
prepackaged? If so, you wouldn't have to worry about compiling it by
hand and installing into /usr/local/.

I haven't done that at this point. (On my phone now and away from the machines on which I'll have to do this. I won't be at those machines again until tomorrow.)

I have verified that Ubuntu 12.4 does *not* have this file -- the package manager provides libSDL1.2 only and CL-SDL2 requires 2.0.

Ubuntu 13.n apparently *does* have this file, but I'm not in a position to update the OS at this point.

Now that I know how to get CL-SDL2 running with QL, I'm mostly trying to understand the system so I can reduce maintenance issues across several development machines. 

Best,

_don

Evan

unread,
Mar 9, 2014, 6:51:20 PM3/9/14
to quic...@googlegroups.com
You could probably find a .deb for libsdl2, and then `dpkg -i` install it. The part about /etc/ld.conf and ldconfig is that it updates the system info on where to find libs, so any software package can use it.

.deb's are the quickest and cleanest way to handle this problem (most likely).


--
You received this message because you are subscribed to the Google Groups "Quicklisp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quicklisp+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

djw

unread,
Mar 9, 2014, 10:38:23 PM3/9/14
to quic...@googlegroups.com

Had a chance to get to one of the machines in question. Adjustment of the path suggested by Antoni Grzymała above, did the job.

I hesitate to go looking for a .deb at this point. If the next OS update contains this file -- and Ubuntu indicates it does -- I'll only have to keep two machines with the adjusted path. When they are updated to Ubuntu 14.4 or 14.10 (whichever one is the LTS), this issue will go away.

I'll just have to keep up with what developers of CL-SDL2 are doing and manually address the issue if any updated libraries become necessary.

Thanks for your patience and tolerance on this day. Best wishes, 

_don
Reply all
Reply to author
Forward
0 new messages