I downloaded the latest OpenMCL distribution for OS x (openmcl-darwinppc-all-0.14.2-p1.tar.gz) and a fresh CVS slime. I tried to start slime with M-x slime from an emacs with a .emacs containing only:
(setq inferior-lisp-program "/Applications/ccl/scripts/openmcl") (add-to-list 'load-path "/Users/rif/Software/slime") (require 'slime) (slime-setup)
When I ran M-x slime, I got the following:
(load "/Users/rif/Software/slime/swank-loader.lisp" :verbose t) (swank:start-server "/tmp/slime.10272" :external-format :iso-latin-1-unix) Welcome to OpenMCL Version (Beta: Darwin) 0.14.2-p1! ? ;Loading #P"/Users/rif/Software/slime/swank-loader.lisp"... ;Loading #P"/Users/rif/.slime/fasl/openmcl/swank-backend.dfsl"... ;Loading #P"/Users/rif/.slime/fasl/openmcl/nregex.dfsl"... ;Loading #P"/Users/rif/.slime/fasl/openmcl/metering.dfsl"... ;Compiling "/Users/rif/Software/slime/swank-openmcl.lisp"... ;Compiler warnings for "/Users/rif/Software/slime/swank-openmcl.lisp" : ; Unused lexical variable STREAM, in (MAKE-STREAM-INTERACTIVE (T)). ; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 8480 and 8595 in /Users/rif/Software/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
Any suggestions?
Cheers,
rif
On Feb 25, 2005, at 2:54 PM, rif wrote:
; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 8480 and 8595 in /Users/rif/Software/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
Any suggestions?
Hmm. I see that in swank-openmcl.lisp there is this function:
(defun temp-file-name () "Return a temporary file name to compile strings into." (ccl:%get-cstring (#_tmpnam (ccl:%null-ptr))))
#_tmpnam is going to trigger the error you saw. OpenMCL's FFI #_ reader macro tries to intern OS::|tmpnam| and create a foreign function call. The specific problem is that this mechanism requires the interface databases for OpenMCL.
You may get them from here:
http://openmcl.clozure.com/Distributions/openmcl-release-0.14.2.html
Scroll down to section 2. Interface database issues.
You also need the interface databases if you ever care to compile OpenMCL yourself. I think there are some bug fixes in CVS you might need anyway.
I am confused. People keep telling me I need the interface database.
From the download page of openmcl
(http://openmcl.clozure.com/Distributions/openmcl-release-0.14.2.html), the current "Full Archive" includes the interface database.
------------------- Historically, OpenMCL has been distributed as "binary archives" (which contained the bare minimum: a lisp kernel, heap image, HTML documentation. and support files) and "source archives" (which contained system and example program sources); additionally, it was necessary to install an "interface database" appropriate for the target platform in order to have a fully functional system.
Many people found this confusing and unintuitive; beginning with this release, OpenMCL will also be available as complete, self-contained archives.
There's already a patched version of 0.14.2 available; most of the notes below describe 0.14.2, but the "Patches" section at the bottom of this page describes fixes in 0.14.2-p1. -------------------
I have downloaded and am using the file "Full Archive" file openmcl-linuxppc-all-0.14.2-p1.tar.gz. The documentation on the webpage indicates that this INCLUDES the interface file. When I try to start slime, I get the following message:
; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist. ; While executing: CCL::CDB-OPEN Read error between positions 8480 and 8595 in /Users/rif/Software/slime/swank-openmcl.lisp.
Error in process listener(1): Foreign function not found: OS::|tmpnam| While executing: CCL::LOAD-EXTERNAL-FUNCTION Type :POP to abort.
Type :? for other options. 1 >
However, the file functions.cdb DOES seem to exist in the proper place. In particular, right now my .emacs reads:
(setq inferior-lisp-program "/Applications/openmcl/ccl/dppccl")
and the file /Applications/openmcl/ccl/darwin-headers/libc/functions.cdb DOES exist. This makes me think I have some kind of pathname problem.
Can anyone offer assistance?
Cheers,
rif
ps. I have also tried downloading the interface separately and adding it in via the instructions; this does not change the error I get.
rif rif@MIT.EDU writes:
; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist.
the problem is here, probably. what does (truename #4P"ccl:darwin-headers;libc;functions.cdb") return? does that file acutally exist? OpenMCL attempts to figure out where to get interface files by examinig the environment variable CCL_DEFAULT_DIRECTORY, you could try (i think) setting this via emacs' setenv function (emacs on osx doesn't read .profile and friends), or you could edit openmcl's wrapper script and use that, here's what mine looks like:
#!/bin/sh if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then CCL_DEFAULT_DIRECTORY=/Users/mb/lisp/ccl/ fi DD=${CCL_DEFAULT_DIRECTORY} CCL_DEFAULT_DIRECTORY=${DD} exec ${DD}/dppccl -n -l /Users/mb/lisp/ccl-init.lisp "$@"
hth.
rif rif@MIT.EDU writes:
; Warning: Interface file #4P"ccl:darwin-headers;libc;functions.cdb" does not exist.
the problem is here, probably. what does (truename #4P"ccl:darwin-headers;libc;functions.cdb") return? does that file acutally exist? OpenMCL attempts to figure out where to get interface files by examinig the environment variable CCL_DEFAULT_DIRECTORY, you could try (i think) setting this via emacs' setenv function (emacs on osx doesn't read .profile and friends), or you could edit openmcl's wrapper script and use that, here's what mine looks like:
#!/bin/sh if [ -z "$CCL_DEFAULT_DIRECTORY" ]; then CCL_DEFAULT_DIRECTORY=/Users/mb/lisp/ccl/ fi DD=${CCL_DEFAULT_DIRECTORY} CCL_DEFAULT_DIRECTORY=${DD} exec ${DD}/dppccl -n -l /Users/mb/lisp/ccl-init.lisp "$@"
hth.
-- -Marco
Thanks! This finally fixed the problem.
Cheers,
rif