On Mon, Dec 7, 2009 at 1:46 PM, Plamen . <span dir="ltr"><<a href="mailto:plamen.usenet@gmail.com">plamen.usenet@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Elliott & Jan,<br>
<br>
ty a lot for the DLLs - especially the libberkeley-db.dll saved me may<br>
be hours today looking in the gcc & dlltool docs...<br></blockquote><div><br>No problem :-)<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

But - now it seems LWW can talk to the DLLs & DB, but:<br>
<br>
1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new<br>
errors now :<br>
    - (db-env-set-max-locks env max-locks) gives error 22 - invalid argument..<br>
    - (db-env-set-max-transactions env max-transactions) - the same<br></blockquote><div><br>Aha! This is the same error I'm getting in SBCL.<br><br>I'll try debugging further tonight.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

>From what I see in the code - the invocation uses meaningfull<br>
arguments, putting some debug statements tells that at least on the<br>
Lisp side we have the right constant-values which correspond with the<br>
"db.h"-declarations.<br>
<br>
So - I'm a step further with your help, but still can't even open a<br>
database. I hope - there is a solution. Of course, I could try to make<br>
the binding using directly the LW FFI, but that would be sad private<br>
solution or unnesessery source fragmentation when there is UFFI/CFFI<br>
as a base.<br>
<br>
(Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I<br>
receved today)<br>
<br>
If there is a chance for help - I would be very happy.<br>
<div><div></div><div class="h5"><br>
On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter<br>
<<a href="mailto:elliottslaughter@gmail.com">elliottslaughter@gmail.com</a>> wrote:<br>
> Here are the dlls I built for the newest version of Elephant with BDB<br>
> 4.7.25. If they work for you, then Ian can put them on the project page.<br>
> Hope this helps.<br>
><br>
> On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick <<a href="mailto:eslick@media.mit.edu">eslick@media.mit.edu</a>> wrote:<br>
>><br>
>> Elliott said he was going to give this a shot. You might correspond with<br>
>> him directly.  -Ian<br>
>> On Dec 7, 2009, at 12:09 AM, Plamen . wrote:<br>
>><br>
>> > Hello Ian,<br>
>> ><br>
>> > thank you for the quick response!<br>
>> ><br>
>> > On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick <<a href="mailto:eslick@media.mit.edu">eslick@media.mit.edu</a>> wrote:<br>
>> >> Hey, quick answers:<br>
>> >><br>
>> >> 1) In the online FAQ you'll notice that you have to ensure that you are<br>
>> >> using uffi and not the uffi compatibility package from cffi.<br>
>> ><br>
>> > Ok, had missed that...<br>
>> ><br>
>> >> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made<br>
>> >> current against BDB 4.7 which Elephant 1.0 depends on.<br>
>> ><br>
>> > Ok, had no idea from the doc or source that 4.7 is the current target,<br>
>> > but that's even better.<br>
>> ><br>
>> >> 3) We have one or two lispworks users that I'm aware of, so it should<br>
>> >> work, but I can't rule out a lispworks specific problem, although I think #1<br>
>> >> and #2 above explain what you're seeing.<br>
>> >><br>
>> >> Are you a position to build the DLLs yourself?<br>
>> ><br>
>> > Haven't touched C for years now and never had the pleasure with cygwin<br>
>> > but now I'll try it :)<br>
>> ><br>
>> >><br>
>> >> Ian<br>
>> >><br>
>> >> On Dec 5, 2009, at 5:28 AM, Plamen . wrote:<br>
>> >><br>
>> >>> Hello,<br>
>> >>> I need to use BDB for my current application and from what I see on<br>
>> >>> the net, elephant seems to be the most mature and functional solution.<br>
>> >>> After following the installation instructions (I use LispWorks 5.1.2<br>
>> >>> for Windows - yes - I need that configuration at the moment, with<br>
>> >>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and<br>
>> >>> libmemutil.dll) in the elephant-root and from what I see a correct<br>
>> >>> my-config.sexp also in the elephant-root directory), after loading<br>
>> >>> Elephant I get the following error :<br>
>> >>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/"))<br>
>> >>> Error: The call (#<Function DB-BDB::%DB-ENV-CREATE 22053092> 0) does<br>
>> >>> not match definition (#<Function DB-BDB::%DB-ENV-CREATE 22053092><br>
>> >>> DB-BDB::FLAGS DB-BDB::ERRNO).<br>
>> >>> From what I see in the sources - there are 3 relevant definitions :<br>
>> >>> 1. the BDB one :<br>
>> >>><br>
>> >>> db_env_create<br>
>> >>><br>
>> >>> ________________________________<br>
>> >>><br>
>> >>> #include <db.h><br>
>> >>><br>
>> >>> int<br>
>> >>> db_env_create(DB_ENV **dbenvp, u_int32_t flags);<br>
>> >>><br>
>> >>> 2. then the libberkeley-db one :<br>
>> >>><br>
>> >>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) {<br>
>> >>>  DB_ENV *envp;<br>
>> >>>  *errno = db_env_create(&envp, flags);<br>
>> >>>  return envp;<br>
>> >>> }<br>
>> >>><br>
>> >>> 3. and finally the Lisp definitions :<br>
>> >>><br>
>> >>> (def-function ("db_env_cr" %db-env-create)<br>
>> >>>    ((flags :unsigned-int)<br>
>> >>>     (errno :int :out))<br>
>> >>>  :returning :pointer-void)<br>
>> >>><br>
>> >>> (defun db-env-create ()<br>
>> >>>  "Create an environment handle."<br>
>> >>>  (multiple-value-bind (env errno)<br>
>> >>>      (%db-env-create 0)<br>
>> >>>    (declare (type fixnum errno))<br>
>> >>>    (if (= errno 0)<br>
>> >>>       env<br>
>> >>>       (error 'db-error :errno errno))))<br>
>> >>><br>
>> >>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest<br>
>> >>> versions of that libraries).<br>
>> >>><br>
>> >>> The call (%db-env-create 0) in the db-env-create function looks of<br>
>> >>> course weird for me, but if people use these lines of source on all<br>
>> >>> other Lisp-implementations, obviously I miss something. I know the LW<br>
>> >>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see<br>
>> >>> the missing parts, but if there is someone outside in the WWW who runs<br>
>> >>> LWW & BDB and/or knows how to help, I would be very gratefull.<br>
>> >>><br>
>> >>> Regards<br>
>> >>> Plamen<br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> elephant-devel site list<br>
>> >>> <a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
>> >>> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> elephant-devel site list<br>
>> >> <a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
>> >> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
>> >><br>
>> ><br>
>> > _______________________________________________<br>
>> > elephant-devel site list<br>
>> > <a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
>> > <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
>><br>
>><br>
>> _______________________________________________<br>
>> elephant-devel site list<br>
>> <a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
>> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
><br>
><br>
><br>
> --<br>
> Elliott Slaughter<br>
><br>
> "Don't worry about what anybody else is going to do. The best way to predict<br>
> the future is to invent it." - Alan Kay<br>
><br>
> _______________________________________________<br>
> elephant-devel site list<br>
> <a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
> <a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
><br>
<br>
_______________________________________________<br>
elephant-devel site list<br>
<a href="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</a><br>
<a href="http://common-lisp.net/mailman/listinfo/elephant-devel" target="_blank">http://common-lisp.net/mailman/listinfo/elephant-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Elliott Slaughter<br><br>"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay<br>