packaged version and SBCL

10 views
Skip to first unread message

Nate Blaylock

unread,
May 4, 2007, 2:47:14 PM5/4/07
to km-qa
I had trouble loading the packaged version of KM (2.0.53) with SBCL on
an Intel Mac. For some reason, SBCL needed a :use '(:common-lisp)
argument when doing (make-package :km) --- otherwise, it didn't seem
to be able to see any of the :common-lisp symbols (the first error it
threw was not being able to find KM::DEFVAR).

Pete, if you think this is worth patching, it looks like there are 3
places which have (make-package :km) (2 are in the cut-and-paste
scripts for dividing up the source files). Switching these to (make-
package :km :use '(:common-lisp)) worked for me.

nate

Pete

unread,
May 10, 2007, 2:33:41 PM5/10/07
to km-qa

Thanks, Nate, your tweak seems to work fine. It'll be in the next
release (2.0.56). Best wishes! Pete

Francis Leboutte

unread,
May 11, 2007, 4:41:53 AM5/11/07
to km...@googlegroups.com
Hello,

In Common Lisp, packages are a way to organize
names of function in independent namespaces, to
avoid collisions between names in different libraries.

The COMMON-LISP package contains the functions
defined in standard CL. To use them directly in
the KM package, you have to tell the KM package
should inherit the exported symbols of the COMMON-LISP package.

A common way to handle the packages is to have a
separate file packages.lisp (to be loaded first)
where you put all your packages definitions. For example:

(defpackage :km
(:use :common-lisp))


This packages.lisp file must be loaded before the other files.

This way, it is enough to put an (in-package :km)
form in the beginning of each file of the KM program.

More about packages:
http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html
http://cl-cookbook.sourceforge.net/packages.html

Francis


Le 10/05/2007 20:33, Pete écrivait :

Reply all
Reply to author
Forward
0 new messages