Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-18 Thread Amos Gouaux

So, I thought I'd try BerkeleyDB 4.0.14 with cyrus-imapd out of
CVS.  I was curious to see how it would handle the existing 3.3.11
db files.  Unless I'm mistaken, it looks almost as if it
automatically converted/upgraded/whatever the db files to 4.0.14.
Is that true?  When I first started things up I got:

DBERROR db3: Program version 4.0.14 doesn't match environment version 3.3.11
done recovering cyrus databases

Then master said it was ready for work.  Everything appears to work.
So I guess so.  Cool.

-- 
Amos




RE: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-18 Thread OCNS Consulting

Do you use LDAP? If so, did you recompile LDAP to use SleepyCat 4.0?

RB

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Amos Gouaux
Sent: Friday, January 18, 2002 12:33 PM
To: [EMAIL PROTECTED]
Subject: Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14


So, I thought I'd try BerkeleyDB 4.0.14 with cyrus-imapd out of
CVS.  I was curious to see how it would handle the existing 3.3.11
db files.  Unless I'm mistaken, it looks almost as if it
automatically converted/upgraded/whatever the db files to 4.0.14.
Is that true?  When I first started things up I got:

DBERROR db3: Program version 4.0.14 doesn't match environment version 3.3.11
done recovering cyrus databases

Then master said it was ready for work.  Everything appears to work.
So I guess so.  Cool.

--
Amos




Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-18 Thread Amos Gouaux

 On Fri, 18 Jan 2002 13:15:22 -0500,
 OCNS Consulting [EMAIL PROTECTED] (oc) writes:

oc Do you use LDAP? If so, did you recompile LDAP to use SleepyCat 4.0?

We do LDAP, but it's iPlanet DS.


-- 
Amos




Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-13 Thread Ken Murchison

Try this patch as submitted by Larry Rosenbaum:

*** cyrusdb_db3.c.orig  Wed Sep 19 20:13:43 2001
--- cyrusdb_db3.c   Thu Jan 10 10:31:22 2002
***
*** 71,76 
--- 71,81 
  
  /* --- cut here --- */
  
+ #if DB_VERSION_MAJOR = 4
+ #define txn_checkpoint(xx1,xx2,xx3,xx4)
(xx1)-txn_checkpoint(xx1,xx2,xx3,xx4)
+ #define txn_id(xx1) (xx1)-id(xx1)
+ #endif
+ 
  static int dbinit = 0;
  static DB_ENV *dbenv;
  
***
*** 145,151 
   retry:
  flags |= DB_INIT_LOCK | DB_INIT_MPOOL | 
 DB_INIT_LOG | DB_INIT_TXN;
! #if DB_VERSION_MINOR  0
  r = dbenv-open(dbenv, dbdir, flags, 0644); 
  #else
  r = dbenv-open(dbenv, dbdir, NULL, flags, 0644); 
--- 150,156 
   retry:
  flags |= DB_INIT_LOCK | DB_INIT_MPOOL | 
 DB_INIT_LOG | DB_INIT_TXN;
! #if (DB_VERSION_MAJOR  3) || ((DB_VERSION_MAJOR == 3) 
(DB_VERSION_MINOR  0))
  r = dbenv-open(dbenv, dbdir, flags, 0644); 
  #else
  r = dbenv-open(dbenv, dbdir, NULL, flags, 0644); 
***
*** 205,211 
  assert(dbinit);
  
  do {
! #if DB_VERSION_MINOR  0
r = txn_checkpoint(dbenv, 0, 0, 0);
  #else
r = txn_checkpoint(dbenv, 0, 0);
--- 210,216 
  assert(dbinit);
  
  do {
! #if (DB_VERSION_MAJOR  3) || ((DB_VERSION_MAJOR == 3) 
(DB_VERSION_MINOR  0))
r = txn_checkpoint(dbenv, 0, 0, 0);
  #else
r = txn_checkpoint(dbenv, 0, 0);




 Ilya Sedelnikov wrote:
 
 Hi,
 
   when trying to compile IMAPD-2.1.0-BETA with cyrus-sasl-2.0.5-BETA
 and BerkeleyDB 4.0.14 installed
 
   on Solaris 8,
 
   I get following error:
 
   cyrusdb_db3.c: In function `init'
 
   cyrusdb_db3.c:151: too many arguments to function
 
   Corresponding lines in cyrusdb_db3.c are
 
 #if DB_VERSION_MINOR  0
 
 r = dbenv-open(dbenv, dbdir, flags, 0644);
 
 #else
 
 r = dbenv-open(dbenv, dbdir, NULL, flags, 0644);
 
 #endif
 
 
 
Definition of type DB_ERR, found in include file db.h created
 when installing BerkeleyDB 4.0.14 and
 
used by cyrusdb_db3.c includes declaration of function open:
 
int  (*open) __P((DB_ENV *, const char *, u_int32_t, int));
 
 
 
Note that this function has 4 parameters.
 
   Also, db.h  contains following definition
 
  # define DB_VERSION_MINOR 0
 
  So, reason for the error message I get when trying to compile
 cyrusdb_db3.c is clear.
 
  Did anyone have similar problem ?
 
  Does anybody know how to solve the problem ?
 
 
 
  Regards,
 
 Ilya Sedelnikov
 
 P.S.
 
 
 
 
 
 
 
 
 
 

-- 
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26  Orchard Park, NY 14127
--PGP Public Key--http://www.oceana.com/~ken/ksm.pgp



Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-13 Thread Amos Gouaux

 On Sun, 13 Jan 2002 10:03:41 -0500,
 Ken Murchison [EMAIL PROTECTED] (km) writes:

km Try this patch as submitted by Larry Rosenbaum:

So, what do those that have tried this think of db 4.x so far?
Any problems encountered, that is after this compile problem is
resolved?

-- 
Amos




RE: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14

2002-01-13 Thread ???


I slightly modified IMAPD 2.1 to work with Berkeley Version 4.0.x
It works well.
I will post the cyrusdb_db3.c asap.


-Original Message-
From: Amos Gouaux [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 2:30 AM
To: [EMAIL PROTECTED]
Subject: Re: IMAPD 2.1.0 compilation with BerkeleyDB 4.0.14


 On Sun, 13 Jan 2002 10:03:41 -0500,
 Ken Murchison [EMAIL PROTECTED] (km) writes:

km Try this patch as submitted by Larry Rosenbaum:

So, what do those that have tried this think of db 4.x so far?
Any problems encountered, that is after this compile problem is
resolved?

-- 
Amos