Subject: [clisp-list] berkeley-db usage question

From: [email-masked]
Date: Fri Jul 30 15:27:01 2004

I've compiled CLISP from the sources distributed on sf.net (I can't get to 
cvs because of a company firewall) with the berkeley-db (among others) in a 
cygwin environment. 

clisp -K full --version
GNU CLISP 2.33.2 (2004-06-02) (built 3299436836) (memory 3299437271)
Software: GNU C 3.3.1 (cygming special) ANSI C program
Features:
(SYSCALLS REGEXP POSTGRESQL BERKELEY-DB CLOS LOOP COMPILER CLISP ANSI-CL
COMMON-LISP LISP=CL INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES
SCREEN FFI GETTEXT UNICODE BASE-CHAR=CHARACTER UNIX CYGWIN)
Installation directory: /usr/local/lib/clisp/
User language: ENGLISH
Machine: I686 (I686) DUSU3500B31.us.ad.hertz.com [10.0.148.76] 

(bdb:db-version)
"Sleepycat Software: Berkeley DB 4.1.25: (September 20, 2003)" ;
4 ;
1 ;
25 

I'm trying to learn how to use this module, and here is what I have come up 
with: 

[1]> (setf dbe (bdb:env-create))
#<BDB::ENV :HANDLE #<FOREIGN-POINTER #x101AF738>>
[2]> (bdb:env-open dbe :home "/cygdrive/h/" :create t) 

[3]> (setf dbh (bdb:db-create dbe)) 

** - Continuable Error
FUNCALL: undefined function MKDB
If you continue (by typing 'continue'): Retry
The following restarts are also available:
STORE-VALUE    :R1      You may input a new value for (FDEFINITION 'MKDB).
USE-VALUE      :R2      You may input a value to be used instead of 
(FDEFINITION
'MKDB). 

Break 1 [4]> 

I don't seem to have everything installed correctly (mkdb is missing), or 
maybe I'm using this wrong. Here is the set of instructions I think should 
work for a minimal type test. (this is based on reading parts of :
http://www.sleepycat.com/docs/api_c/api_index.html and
http://www.podval.org/~sds/clisp/impnotes/modules.html#berkeley-db) 

(setf dbe (bdb:env-create))
(bdb:env-open dbe :home "/cygdrive/h/" :create t)
(setf dbh (bdb:db-create dbe))
(bdb:db-open dbh "mydb.db")
(bdb:db-close dbh)
(bdb:env-close dbe) 

Can anyone give me some pointers? 

Thanks
Jeff

---

From: Sam Steingold <[email-masked]>
Date: Sat Jul 31 22:29:01 2004

> *  <[email-masked]> [2004-07-30 17:16:29 -0500]:
>
> I've compiled CLISP from the sources distributed on sf.net (I can't
> get to cvs because of a company firewall) with the berkeley-db (among
> others) in a cygwin environment.

berkeley-db in the release is incomplete and buggy.
cvs head is better.
I just built it for you, get the binary from
<http://www.podval.org/~sds/clisp/clisp-2.33-cygwin-1.5.10.tar.bz2>
don't forget to review impnotes.

***WARNING***
this is work in progress in many respects.
don't bother to report bugs in _anything_ except berkeley-db.
(e.g., the barrage of warnings about function redefinitions &c)

> (bdb:db-open dbh "mydb.db")

WFM, just use "bdb:dbe-" instead of "bdb:env-"
and set *print-circle* to T

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
My other CAR is a CDR.