Error while installing lispbuilder

178 views
Skip to first unread message

ben throttle

unread,
Sep 1, 2012, 3:53:53 PM9/1/12
to quic...@googlegroups.com
Hi. I tried to post this message directly using the googlegroups interface, but it looks like it's failed. Sorry for any double messages if that happened.

First, some info. I'm using OS X Lion (10.7.4) and LispWorks Personal 6.

I'm starting to learn Lisp and I decided to make a game instead of just doing exercises from books, so the best option is using SDL. I've checked the SDL port to Lisp (lispbuilder) and found that the best way to install the package is using quicklisp . After first error (cocoahelper), I searched the group messages and found this answer

https://groups.google.com/forum/?hl=pt-BR&fromgroups=#!searchin/quicklisp/error$20lispbuilder/quicklisp/0lwEhnRljvo/vh6VQRpsTvcJ

which suggested to do this

"cd ~/quicklisp/dists/quicklisp/software/lispbuilder-<version>/lispbuilder-sdl/cocoahelper make"

I ran make but it didn't work for me. Still the same error. I restarted LispWorks and tried again, but still no success. Any suggestion on how to solve the error?

Thanks, the log error is bellow

--------------------------------------------------------
To load "lispbuilder-sdl":
  Load 1 ASDF system:
    lispbuilder-sdl
; Loading "lispbuilder-sdl"

Error: Unable to load any of the alternatives:
   ((:FRAMEWORK "cocoahelper") (:DEFAULT "cocoahelper"))
   1 (continue) Try loading the foreign library again.
   2 Use another library instead.
   3 Try loading /Users/ben/.cache/common-lisp/lw-6.0.1-macosx-x86/Users/ben/quicklisp/dists/quicklisp/software/lispbuilder-20120520-svn/lispbuilder-sdl/cocoahelper/cocoahelper.xfasl again.
   4 Give up loading /Users/ben/.cache/common-lisp/lw-6.0.1-macosx-x86/Users/ben/quicklisp/dists/quicklisp/software/lispbuilder-20120520-svn/lispbuilder-sdl/cocoahelper/cocoahelper.xfasl.
   5 Try loading another file instead of /Users/ben/.cache/common-lisp/lw-6.0.1-macosx-x86/Users/ben/quicklisp/dists/quicklisp/software/lispbuilder-20120520-svn/lispbuilder-sdl/cocoahelper/cocoahelper.xfasl.
   6 Recompile cocoahelper and try loading it again
   7 Retry Loading component: ("cocoahelper" "cocoahelper" "cocoahelper").
   8 Continue, treating Loading component: ("cocoahelper" "cocoahelper" "cocoahelper") as having been successful.
   9 (abort) Give up on "lispbuilder-sdl"
  10 Return to level 2.
  11 Return to debug level 2.
  12 Give up on "lispbuilder"
  13 Return to level 1.
  14 Return to debug level 1.
  15 Give up on "lispbuilder"
  16 Return to level 0.
  17 Return to top loop level 0.

Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.

Zach Beane

unread,
Sep 1, 2012, 5:48:35 PM9/1/12
to quic...@googlegroups.com
ben throttle <benthr...@gmail.com> writes:

> Hi. I tried to post this message directly using the googlegroups interface, but
> it looks like it's failed. Sorry for any double messages if that happened.

Sorry about that, I got the moderation message earlier but I was at the
beach.

> First, some info. I'm using OS X Lion (10.7.4) and LispWorks Personal 6.
>
> I'm starting to learn Lisp and I decided to make a game instead of just doing
> exercises from books, so the best option is using SDL. I've checked the SDL
> port to Lisp (lispbuilder) and found that the best way to install the package
> is using quicklisp . After first error (cocoahelper), I searched the group
> messages and found this answer
>
> https://groups.google.com/forum/?hl=pt-BR&fromgroups=#!searchin/quicklisp/
> error$20lispbuilder/quicklisp/0lwEhnRljvo/vh6VQRpsTvcJ
>
> which suggested to do this
>
> "cd ~/quicklisp/dists/quicklisp/software/lispbuilder-<version>/lispbuilder-sdl/
> cocoahelper make"
>
> I ran make but it didn't work for me.

What happened when you ran make?

Zach

ben throttle

unread,
Sep 1, 2012, 8:16:59 PM9/1/12
to quic...@googlegroups.com
Thanks for your answer Zach. There's a warning about the signature of setApplicationMenu, but there was no error. The complete result of make is bellow.
Thanks again for your support.

Ben

------------------------------------------------------------------------------------------
gcc -fPIC  -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/Library/Frameworks/SDL.framework/Headers/ -c cocoahelper.m -o cocoahelper.o
cocoahelper.m: In function ‘setApplicationMenu’:
cocoahelper.m:163: warning: no ‘-setAppleMenu:’ method found
cocoahelper.m:163: warning: (Messages without a matching method signature
cocoahelper.m:163: warning: will be assumed to return ‘id’ and accept
cocoahelper.m:163: warning: ‘...’ as arguments.)
gcc -dynamiclib  -framework SDL -framework Cocoa -o cocoahelper.dylib cocoahelper.o



2012/9/1 Zach Beane <xa...@xach.com>

Bjoern Paschen

unread,
Sep 5, 2012, 7:58:54 AM9/5/12
to quic...@googlegroups.com
I just tried this with SBCL and lispbuilder-20120520. The make run on cocoahelper throws a warning, but that should be ok. It creates the cocoahelper.dylib.

After that the installation in quicklisp runs fine and a quick check of (explosion) from the lispbuilder-sdl-examples package shows that it works.

Do you have a cocoahelper.dylib lying around in the cocoahelper directory?

2012/9/2 ben throttle <benthr...@gmail.com>



--

Best regards

    Bjoern Paschen

    phone ++49 (0)171 2867047

Iconpack by Komodo Media 


ben throttle

unread,
Sep 5, 2012, 11:11:15 PM9/5/12
to quic...@googlegroups.com
Yeah, I have cocoa.dylib after running make. After some attempts with LispBuilder, I download SBCL to check if it was an issue with LB, but same error. It must be something related to my system configuration, but I can't figure out what it is. Does quicklisp (or lispbuilder) directory have to be on the Path?

I will keep trying to have this working in this weekend because I really want to port some projects from other languages to Lisp and compare how the languages differ from each other. If you have any other idea, please let me know. I will also ask around some general lisp foruns to check the typical problems to install Lisp on OS X.

Thanks again.

Ben

Here's sbcl log when I run (ql:quickload "lispbuilder-sdl") in case this helps you.


To load "lispbuilder-sdl":
  Load 1 ASDF system:
    lispbuilder-sdl
; Loading "lispbuilder-sdl"


debugger invoked on a LOAD-FOREIGN-LIBRARY-ERROR:

  Unable to load any of the alternatives:
   ((:FRAMEWORK "cocoahelper") (:DEFAULT "cocoahelper"))

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY          ] Try loading the foreign library again.
  1: [USE-VALUE      ] Use another library instead.
  2: [TRY-RECOMPILING] Recompile cocoahelper and try loading it again
  3: [RETRY          ] Retry
                       loading FASL for #<CL-SOURCE-FILE "cocoahelper" "cocoahelper" "cocoahelper">.
  4: [ACCEPT         ] Continue, treating
                       loading FASL for #<CL-SOURCE-FILE "cocoahelper" "cocoahelper" "cocoahelper">
                       as having been successful.
  5: [ABORT          ] Give up on "lispbuilder-sdl"
  6:                   Reduce debugger level (to debug level 1).
  7:                   Try loading the foreign library again.
  8:                   Use another library instead.
  9:                   Recompile cocoahelper and try loading it again
 10:                   Retry
                       loading FASL for #<CL-SOURCE-FILE "cocoahelper" "cocoahelper" "cocoahelper">.
 11:                   Continue, treating
                       loading FASL for #<CL-SOURCE-FILE "cocoahelper" "cocoahelper" "cocoahelper">
                       as having been successful.
 12:                   Give up on "lispbuilder-sdl"
 13:                   Exit debugger, returning to top level.

(CFFI::FL-ERROR
 "Unable to load any of the alternatives:~%   ~S"
 ((:FRAMEWORK "cocoahelper") (:DEFAULT "cocoahelper")))



2012/9/5 Bjoern Paschen <bpas...@gmail.com>

Elliott Slaughter

unread,
Sep 5, 2012, 11:30:46 PM9/5/12
to quic...@googlegroups.com
This is probably a lispbuilder, not a quicklisp issue.

Some things to check:

Is your lisp 32 or 64-bit? Check by typing *features* into the lisp REPL. SBCL, for example, prints :X86-64 on my machine.

* *features*
(... :X86-64 ...)

Is SDL 32 or 64-bit (or universal)? The file command can tell you what architectures are supported in your SDL. 

$ file /Library/Frameworks/SDL.framework/Versions/Current/SDL 
/Library/Frameworks/SDL.framework/Versions/Current/SDL: Mach-O universal binary with 3 architectures
/Library/Frameworks/SDL.framework/Versions/Current/SDL (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
...

Where is your SDL located? Mac OS X libraries have search paths embedded in them. If cocoahelper can't find SDL on one of the search paths embedded into the binary, then it'll fail to load. You can try putting SDL in /Library/Frameworks . Otherwise, the otool command can tell you what paths cocoahelper is searching.

$ otool -L cocoahelper.dylib 
cocoahelper.dylib:
@executable_path/../Frameworks/Version/A/Resources/cocoahelper (compatibility version 0.0.0, current version 0.0.0)
@loader_path/../../../../SDL.framework/Versions/A/SDL (compatibility version 1.0.0, current version 1.0.0)
...
--
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay

ben throttle

unread,
Sep 7, 2012, 7:49:57 PM9/7/12
to quic...@googlegroups.com
Thanks for your answer Elliot. It was really the 32-64 bit problem. I was using LispWorks and the personal edition only supports 32 bits. I was also dumb enough to download the 32 version of sbcl. I downloaded the 64-bit version and everything is working fine now. Thanks for your support guys. Now, time to get the hands dirty ...

Ben

2012/9/6 Elliott Slaughter <elliotts...@gmail.com>
Reply all
Reply to author
Forward
0 new messages