Problem compiling clg (sbcl 1.0.13 - darwin)
Luigi Panzeri <[email protected]> Wed, 23 Jan 2008 03:31:19 +0100
| Newsgroups | gmane.lisp.clg.devel |
|---|---|
| Message-ID | <[email protected]> |
--=-=-=
Hi, i tried to compile clg (cvs version) on sbcl 1.0.13 (with threads)
on Mac OsX Tiger and with slime
First i got the following error (M-x slime-load-system):
READER-ERROR at 2779 (line 83, column 16) on #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}>
[Condition of type READER-ERROR]
Restarts:
0: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL {12FEAEE9}> on #<ASDF:CL-SOURCE-FILE "gtk" {13574369}>.
1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {12FEAEE9}> on #<ASDF:CL-SOURCE-FILE "gtk" {13574369}> as having been successful.
2: [ABORT] Abort SLIME compilation.
3: [ABORT] Return to SLIME's top level.
4: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {119D27B9}>)
Backtrace:
0: (PKG-CONFIG::|#?-reader| #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}> #<unavailable argument> #<unavailable argument>)
1: ((LAMBDA (STREAM CHAR)) #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}> #\#)
2: (READ-PRESERVING-WHITESPACE #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}> T NIL T)
3: (READ-PRESERVING-WHITESPACE #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}> T NIL NIL)
4: (READ #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtk.lisp" {120CC209}> T NIL NIL)
As i far understand slime-load-system binds *read-eval* to nil so there is the above cited error.
Then, i (after deleted .o .dylib .fasl and restarted the inferior
lisp) did on the slime-repl (asdf:oos 'asdf:load-op 'gtk)
Attempt to call an undefined alien function.
[Condition of type SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR]
Restarts:
0: [RETRY] Retry performing #<ASDF:COMPILE-OP NIL {129E9D41}> on #<ASDF:CL-SOURCE-FILE "gtkstyle" {129E9739}>.
1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {129E9D41}> on #<ASDF:CL-SOURCE-FILE "gtkstyle" {129E9739}> as having been successful.
2: [ABORT] Return to SLIME's top level.
3: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {119D27B9}>)
Backtrace:
0: (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
1: (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
2: ("foreign function: call_into_lisp")
3: ("foreign function: funcall0")
4: ("foreign function: undefined_alien_function")
5: (GTK::%STYLE-FONT-DESC-OFFSET)
6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (GTK::%STYLE-FONT-DESC-OFFSET) #<NULL-LEXENV>)
7: (SB-IMPL::READ-MAYBE-NOTHING #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtkstyle.lisp" {12B10B41}> #\#)
8: (SB-IMPL::READ-LIST #<SB-SYS:FD-STREAM for "file /Users/matley/src/clg/gtk/gtkstyle.lisp" {12B10B41}> #<unavailable argument>)
So i guessed that some compilation step of some lisp files depends on
some .dylib which should be loaded before .lisp files are compiled. So
with the patch attached, that simply load .dylib as soon they are
compiled, i managed to compile and load clg (after deleted .o .dylib
.fasl and restarted the inferior lisp).
Then i tried to (load "path/to/hello.world")
but i got:
When running clg in Slime, the communication style NIL must be
used in combination with asynchronous event handling on this
platform. See the README file and
<http://common-lisp.net/project/slime/doc/html/slime_45.html>
for more information.
The link is broken but i guessed to (gtk:clg-init) with
(gtk:clg-init-with-threading) (patch attached) and hello-world
started!
Hope these experiences can help other users.
Any ideas to make clg work on slime+sbcl+threaded-darwin?
--
Luigi Panzeri aka Matley
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
Quotes on Lisp: http://lispers.org/
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=asdf-extensions.patch
Index: tools/asdf-extensions.lisp
===================================================================
RCS file: /cvsroot/clg/clg/tools/asdf-extensions.lisp,v
retrieving revision 1.17
diff -r1.17 asdf-extensions.lisp
58c58,59
< (error 'operation-error :operation operation :component dso))))
---
> (error 'operation-error :operation operation :component dso))
> (load-shared-object output)))
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=hello-world.patch
Index: hello-world.lisp
===================================================================
RCS file: /cvsroot/clg/clg/hello-world.lisp,v
retrieving revision 1.9
diff -r1.9 hello-world.lisp
1c1,2
< (gtk:clg-init)
---
> #+sb-thread (gtk:clg-init-with-threading)
> #-sb-thread (gtk:clg-init)
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Clg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clg-devel
--=-=-=--