Ticket #1074 (closed defect: notabug)

Opened 16 months ago

Last modified 16 months ago

Foreign function not found: WIN64::|gethostname|

Reported by: radack Owned by:
Priority: normal Milestone:
Component: Foreign Function Interface Version: trunk
Keywords: Cc:

Description

When I try to load usocket, an error "Foreign function not found: WIN64::|gethostname|" is displayed.

I am running CCL 64-bit on Windows 7 64-bit.

wx86cl64.exe -I ccl.save Welcome to Clozure Common Lisp Version 1.9-r15765 (WindowsX8664)! ? (ql:quickload "usocket") To load "usocket":

Load 1 ASDF system:

usocket

; Loading "usocket" Read error between positions 220 and 317 in C:/Users/Gerry/quicklisp/dists/quicklisp/software/usocket-0.6.0.1/backend/openmcl.lisp.

Error: Foreign function not found: WIN64::|gethostname| While executing: CCL::LOAD-EXTERNAL-FUNCTION, in process listener(1). Type :POP to abort, :R for a list of available restarts. Type :? for other options.

1 >

The error seems to be in the following code:

(defun get-host-name ()

(ccl::%stack-block ((resultbuf 256))

(when (zerop (#_gethostname resultbuf 256))

(ccl::%get-cstring resultbuf))))

Change History

comment:1 Changed 16 months ago by rme

Does ccl have access to its interface database? If you start up ccl and evaluate (probe-file "ccl:"), the output directory is what we call the ccl directory.

The ccl directory should contain a directory named win64-headers containing the interface database. If that directory is not there, ccl will not know how to turn #_gethostname into the proper external function call.

This could happen if you've copied the heap image (your file ccl.save" somewhere out of the distribution directory.

comment:2 Changed 16 months ago by radack

I was running CCL with a heap image outside the distribution directory. I copied the heap image to the distribution directory and ran it from there and it worked.

Is there a way to get it to work with the heap image outside the distribution directory?

comment:3 Changed 16 months ago by rme

You can set the environment CCL_DEFAULT_DIRECTORY to the location of the distribution directory (or whatever directory contains the interface database, sources, etc.).

See section 4.6.2 of the manual:  http://ccl.clozure.com/ccl-documentation.html#Predefined-Logical-Hosts

comment:4 Changed 16 months ago by radack

  • Status changed from new to closed
  • Resolution set to notabug

Thanks!

Note: See TracTickets for help on using tickets.