[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling problem on OBSD2.7 (ndbm).



On Tue, Nov 14, 2000 at 11:27:28PM -0000, Tomasz Bojakowski wrote:
> Someone posted, that he needs sockaddr path to compile zmailer on OpenBSD
>  2.7 (afair I've made same thing for sockaddr a few months ago)... 
> But what about this ? I still have it... and realy don't know if it is problem
> of zmailer or my includes.
> 
> ndbm.c: In function `owner_ndbm':
> ndbm.c:274: `DBM_PAGFNO_NOT_AVAILABLE' undeclared
> (first use in this function)
> ndbm.c:274: (Each undeclared identifier is reported only once
> ndbm.c:274: for each function it appears in.)
> ndbm.c: In function `modp_ndbm':
> ndbm.c:297: `DBM_PAGFNO_NOT_AVAILABLE' undeclared (first use in this function)
> *** Error code 1
> 

Yes, configure does not detect that NDBM in FreeBSD & OpenBSD is
emulated by Berkeley DB 1.85.
As I have no real .dbm bases to use, nor real NDBM library, 
I just commented out the following line in config.h
#define HAVE_NDBM_H 1
Then Zmailer uses native DB 1.85 dbopen() from libc without problems.

On the other hand, if you've installed Berkeley DB 2.x or 3.x from SleepyCat
it never finds them in default locations (bug in configure.in IMHO)
/usr/local/BerkeleyDB/{include,lib} for 2.x
/usr/local/BerkeleyDB.3/{include,lib} for 3.0.x
/usr/local/BerkeleyDB.3.1/{include,lib} for 3.1.x
(And library is always called libdb.a, no matter which version).
I don't believe you should use funny -I and -L for default locations.

I'm not familiar enough with autoconf tools to make correct changes in
configure.in .

Maybe it's still better to be able to tweak configured db libraries
and locations from SiteConfig?

> Stop in /usr/local/src/zmailer/router/libdb.
> *** Error code 1
> 
> Definition of DBM_PAGFNO_NOT_AVAILABLE in my include/ndbm.h :
> #define dbm_pagfno(a)   DBM_PAGFNO_NOT_AVAILABLE
> Well... I think it should be:
> #define DBM_PAGFNO_NOT_AVAILABLE dbm_pagfno(a)
> 
> But I might be wrong (it seems to be a problem of openbsd anyway.) 

You are wrong. That definition is correct (there are no .pag file
when NDBM is emulated by Berkeley DB). But in some cases it may be
sufficient to
#define dbm_pagfno(a) dbm_dirfno(a)