Subject: Re: problems compiling nmh 1.2
To: Jeremy C. Reed <>
From: Igor Sobrado <>
List: netbsd-users
Date: 12/21/2005 21:25:45
In message <>, "Jeremy C. Reed" writes:
> On Wed, 21 Dec 2005, Igor Sobrado wrote:
> > gcc -c -DHAVE_CONFIG_H -I.. -I. -I..   -Wall -O2 slocal.c
> Check to see if it includes ndbm.h.

Hi Jeremy!

First of all, thanks a lot for the fast and high-quality feedback
to this issue.

Indeed, slocal.c was not including ndbm.h.  I added the preprocessor
"include" directive by hand to slocal.c and it compiles fine now.
I am trying to guess what is wrong with "config.h".  Some systems have
this header file in /usr/include/db1 or /usr/include/gdbm instead.  I am
not too accustomed to this file syntax (e.g., does
"/* #undef HAVE_DB1_NDBM_H */" mean that HAVE_DB1_NDBM_H is defined by
default and that we must remove the "/*" and "*/" to undefine it?)

In any case, something is wrong with my patch.  Configure should make
a "config.h" file that clearly shows that ndbm.h is in /usr/include
instead of /usr/include/{db1,gdbm}!

By the way, it seems that the original (unpatched) configure script
does the same mistake in OpenBSD, but that operating system does not
complain when running the script.

> > It would be nice upgrading nmh from 1.0.4 to 1.2 in the NetBSD pkgsrc
> > if it finally works as it should.
> You may want to discuss this on the tech-pkg list.

As nmh-1.2 build cleanly once slocal.c does know where looking for that
header file, I will heartly suggest an upgrade to the latest stable
release in tech-pkg@, but I will work hard first on the configure
script to get it working again on NetBSD.  Certainly the ChangeLog
file shows that it is a recommendable upgrade.

Thanks again!