Loading usocket with asdf enters the debugger when it tries compiling get-host-name-internal in clisp.lisp. Adding :language and :library seem to solve the problem. Attached is a patch which implements that.
I'm using the Linux clisp binary for 2.41 from clisp.sf.net, and Ubuntu 7.04. Note: /lib/libc.so.6 is probably wrong for other unixes.
Matt
[3]> (asdf:oos 'asdf:load-op :usocket) ; loading system definition from usocket.asd into #<PACKAGE ASDF0> ; registering #<SYSTEM USOCKET #x203DADB6> as USOCKET ; loading system definition from /home/mkennedy/lispy-all-0.3/split-sequence-2002-04-10/split-sequence.asd into #<PACKAGE ASDF0> ; registering #<SYSTEM :SPLIT-SEQUENCE #x203F6366> as SPLIT-SEQUENCE WARNING: (FFI:DEF-CALL-OUT GET-HOST-NAME-INTERNAL (:NAME "gethostname") (:ARGUMENTS (NAME (FFI:C-PTR (FFI:C-ARRAY-MAX CHARACTER 256)) :OUT :ALLOCA) (LEN FFI:INT)) (:RETURN-TYPE FFI:INT)) : No :LANGUAGE argument and no FFI:DEFAULT-FOREIGN-LANGUAGE form in this compilation unit; :STDC assumed now and for the rest of this unit WARNING: COMPILE-FILE warned while performing #<COMPILE-OP NIL #x203C61CE> on #<CL-SOURCE-FILE "clisp" #x203C537E>. WARNING: (FFI:DEF-CALL-OUT GET-HOST-NAME-INTERNAL (:NAME "gethostname") (:ARGUMENTS (NAME (FFI:C-PTR (FFI:C-ARRAY-MAX CHARACTER 256)) :OUT :ALLOCA) (LEN FFI:INT)) (:RETURN-TYPE FFI:INT)) : No :LANGUAGE argument and no FFI:DEFAULT-FOREIGN-LANGUAGE form in this compilation unit; :STDC assumed now and for the rest of this unit ** - Continuable Error FFI::FIND-FOREIGN-FUNCTION: foreign function "gethostname" does not exist If you continue (by typing 'continue'): Skip foreign function creation The following restarts are also available: SKIP :R1 skip 9 16 (FFI:DEF-CALL-OUT GET-HOST-NAME-INTERNAL (:NAME "gethostname") ...)-2 STOP :R2 stop loading file /home/mkennedy/tmp/usocket-0.3.4/backend/clisp.fas RETRY :R3 Retry performing #<ASDF:LOAD-OP NIL #x203C417E> on #<ASDF:CL-SOURCE-FILE "clisp" #x203C537E>. ACCEPT :R4 Continue, treating #<ASDF:LOAD-OP NIL #x203C417E> on #<ASDF:CL-SOURCE-FILE "clisp" #x203C537E> as having been successful. ABORT :R5 ABORT Break 1 USOCKET[4]> (lisp-implementation-version) "2.41 (2006-10-13) (built on localhost.localdomain [127.0.0.1])" Break 1 USOCKET[4]>
On 7/28/07, Matthew Kennedy mkennedy@common-lisp.net wrote:
Loading usocket with asdf enters the debugger when it tries compiling get-host-name-internal in clisp.lisp. Adding :language and :library seem to solve the problem. Attached is a patch which implements that.
Hi Matthew!
Thanks for the report and patch. Hardcoding both the name and location of the C runtime library is a bit of a problem though, given the number of platforms supported by clisp.
On Debian Etch I got the same warning about the :stdc language specifier, but for me it didn't end in the debugger (also clisp 2.41, but the one delivered with the distribution). So, at the time, I didn't look too long at it, since for every platform, clisp tries to use a sensible default.
Adding (:language #-win32 :stdc #+win32 :stdc-stdcall) silenced the warning, but I never got the '"gethostname" not found' error. Does that disappear if you add the above language declaration?
If not, I suppose I'll have to install the clisp.sf.net version to find out what's happening myself. I'd be most gratefull if you could try the above for me though.
I'm using the Linux clisp binary for 2.41 from clisp.sf.net, and Ubuntu 7.04. Note: /lib/libc.so.6 is probably wrong for other unixes.
Yep, so that's why I prefer to look for a different solution for that part of the problem (for now).
Once more thanks for your report.
bye,
Erik.