Compile fix for DB 4.3.x (Re: `DB_VERB_CHKPOINT' (deprecated) error in CyrusIMAP build with new BerkeleyDB4.3.21)

Oliver Falk oliver at linux-kernel.at
Fri Nov 19 09:35:55 EST 2004


Henrique de Moraes Holschuh wrote on 11/14/2004 12:08 PM:
> On Sat, 13 Nov 2004, pgn wrote:
> 
>>I just upgraded my BerkeleyDB version to v4.3.21.
> 
> AFAIK Cyrus is NOT supposed to be used with that yet.  So, yes, you will get
> compilation errors.

As usual Berkley fixed a lot of bugs within 4.3 and they changed a lot 
(eg. Database or Log File On-Disk Format).

And getting compilation errors trying to compile against 4.3.x was clear 
for me, but it was simple to fix. Now comes the question Cyrus needs 
more changes!?

> 
>>Since the docs say just remove any reference to it, is it OK to just
>>comment lineno 147?  I'm not exactly sure what it does but it isn't
>>used anywhere else.
> 
> 
> You can kill the whole IF block safely.

Killing the IF is OK, but it would be better if the cyrus crew would add 
something like this:

diff -uNr cyrus-imapd-2.2.8.orig/lib/cyrusdb_berkeley.c 
cyrus-imapd-2.2.8/lib/cyrusdb_berkeley.c
--- cyrus-imapd-2.2.8.orig/lib/cyrusdb_berkeley.c       2004-11-19 
14:32:06.951400032 +0100
+++ cyrus-imapd-2.2.8/lib/cyrusdb_berkeley.c    2004-11-19 
14:33:25.603443104 +0100
@@ -143,9 +143,12 @@
         dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1);
         dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1);
      }
+
+#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR < 3
      if (CONFIG_DB_VERBOSE > 1) {
         dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1);
      }
+#endif

      dbenv->set_errcall(dbenv, db_err);
      snprintf(errpfx, sizeof(errpfx), "db%d", DB_VERSION_MAJOR);

Another idea that just came up in my mind is to ifdef on DB_VERB_CHKPOINT...

> But do be warned that YOU are going to be the guinea pig on how Cyrus works
> with DB 4.3.

So far it seems fine on _my_ test-system...

Best,
  Oliver
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list