Re: Berkely DB check weakness
Fabian Groffen <grobian@xxxxxxxxxx> writes:
> Now I don't have a good solution here, but I can say that the berkely db
> check is not really working well. What happened is that my Berkely DB
> 4.5 installation headers from /my/place/usr were used to compile, while
> was linked using -ldb4.6 from /usr/lib/. This results in a nice
> mismatch -- not working.
> Anyway, I noticed mutt adds some default paths to the BDB search
> path if no path is given to --with-bdb argument, so I added my prefix
> where bdb 4.5 is installed, but that doesn't work either, because if
> some headers are found, it is tried to compile a small example using all
> libs from known versions in a loop, disregarding the version of the
> headers found. Aparently the example compiles fine with the mismatch.
> It doesn't guarantee that it works at runtime of course.
> Now this is probably a bit weird setup, and I know the berkely db check
> has had some incarnations trying to fix all possible combinations and
> problems... but nevertheless. In case someone experiences the same,
> this is what I did:
> The simple idea here is that "db" is the generic thing that points to
> the installation used "default" (at least on Gentoo), which means -ldb
> is used, resulting in no mismatch for me since /my/place/usr/lib is in
> my library search path. However, I don't think this works for everyone.
I'd second that it doesn't work for everyone.
I think the strategy should bes: grab the versions from the headers
(running the preprocessor should be sufficient) and then go hunt the
We made some efforts to do some sanity checks for bogofilter's configure
script and making sure it gets the version it expects from the
headers. Anyone who cares to look can find the source code in the SVN
department of the bogofilter project website at
<http://sourceforge.net/projects/bogofilter/>, but I'm not suggestion to
use that code verbatim in mutt.
For bogofilter, predefining preprocessor and linker flags/libs in
CPPFLAGS, LDFLAGS, LIBS works to help it grab a certain DB version- does
that work for mutt? Example at