<<< Date Index >>>     <<< Thread Index >>>

Mutt and Berkely DB, the results of the cruisade



Yesterday I was trying to get Mutt running on Solaris, and I experienced
crashes there, while not on Darwin and Linux.  The story behind it
follows:

On Linux I accidentially used both enable db and gdbm, and thus Mutt
used gdbm, disabling gdbm resulted in a crashing Mutt on Linux too.

So Darwin was the last platform that Mutt still worked, that is not
crashed in the header cache code.  Some inspection with otool and ldd
revealed that on Darwin Mutt was linked against db-4.5, while on Linux
and Solaris was linked against db-4.3.  For reasons not important here,
a faulty symlink usr/lib/libdb-4.dylib was existing on Darwin and
pointing to libdb-4.5.dylib.  After I "fixed" that, Mutt crashed as hard
on Darwin as on Solaris and Linux (because it was also linked against db
4.3).

A little peek in configure.ac revealed checks for Berkely DB don't look
for anything higher than 4.3, which I have installed on Solaris, Darwin
and Linux, next to versions 4.4 and 4.5.  In the attached patch I simply
added support for db 4.5 and 4.4 like done for 4.3 and below.

While the patch allows me to use Mutt on Solaris, Darwin and Linux, it
of course is just a workaround here.  I believe db 4.5 and 4.4 should be
checked, but if 4.3 (and below?) are found and taken as supported then
the code shouldn't crash.  Possible solutions are to either drop support
for <4.3 or fix it in some way.

Anyway, I hope this is useful information somehow.


-- 
Fabian Groffen
Gentoo on a different level
--- configure.ac.orig   2007-04-04 09:29:23.000000000 +0200
+++ configure.ac        2007-04-04 09:30:13.000000000 +0200
@@ -866,7 +866,7 @@
                 bdbpfx="$bdbpfx $d/$v"
             done
         done
-        BDB_VERSIONS="db-4 db4 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 
db4.1 db41 db ''"
+        BDB_VERSIONS="db-4 db4 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 
db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
         AC_MSG_CHECKING([for BerkeleyDB > 4.0])
         for d in $bdbpfx; do
             BDB_INCLUDE_DIR=""