Subject: problems compiling nmh 1.2
To: NetBSD Users <netbsd-users@netbsd.org>
From: Igor Sobrado <igor@string1.ciencias.uniovi.es>
List: netbsd-users
Date: 12/21/2005 20:50:55
--Boundary_(ID_+Sje6ENiuK1p2o4h5a0KDw)
Content-id: <28174.1135194653.1@string1.ciencias.uniovi.es>
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

Hi all!

nmh-1.2 (a stable version, not a release candidate) was released
yesterday.  As a difference to previous releases (as the fine 1.0.4)
it seems that nmh-1.2 has not been heavily tested on NetBSD.  I have
some issues building it:

1. The configure script has some lines in the form "if test x == y;".
   I do not know the meaning of the "==" operator when using with test(1),
   but it certainly seems wrong to me.  I am accustomed to the assignment
   operator "=" instead.  A patch is included at the end of this post.

   By the way, OpenBSD does not complain when running the unpatched
   configure script.  It should, am I wrong?

2. Both OpenBSD and NetBSD fail when compiling slocal.c.  This is the
   error output for the latter (I am certainly most interested in
   NetBSD, but I tried it on OpenBSD too to see if it is a NetBSD
   only issue).  It seems that this problem does not happen with
   FreeBSD (Jon Steinhart has no problems compiling it on his computer):

[...]
gcc -c -DHAVE_CONFIG_H -I.. -I. -I..   -Wall -O2 slocal.c
slocal.c: In function `suppress_duplicates':
slocal.c:1533: error: `datum' undeclared (first use in this function)
slocal.c:1533: error: (Each undeclared identifier is reported only once
slocal.c:1533: error: for each function it appears in.)
slocal.c:1533: error: parse error before "key"
slocal.c:1534: error: `DBM' undeclared (first use in this function)
slocal.c:1534: error: `db' undeclared (first use in this function)
slocal.c:1563: error: `key' undeclared (first use in this function)
slocal.c:1568: warning: implicit declaration of function `dbm_open'
slocal.c:1586: error: `value' undeclared (first use in this function)
slocal.c:1586: warning: implicit declaration of function `dbm_fetch'
slocal.c:1595: warning: implicit declaration of function `dbm_store'
slocal.c:1595: error: `DBM_INSERT' undeclared (first use in this function)
slocal.c:1600: warning: implicit declaration of function `dbm_close'
*** Error code 1

Stop.
make: stopped in /home/sobrado/tmp/nmh-1.2/uip
*** Error code 1

Stop.
make: stopped in /home/sobrado/tmp/nmh-1.2


Any advice will be really helpful.  I certainly do not know what is
wrong with the latest stable release of nmh.  I will try to fix this
issue now, but I certainly believe that someone who knows more about
this problem than I do can provide better feedback.

It would be nice upgrading nmh from 1.0.4 to 1.2 in the NetBSD pkgsrc
if it finally works as it should.


--Boundary_(ID_+Sje6ENiuK1p2o4h5a0KDw)
Content-id: <28174.1135194653.2@string1.ciencias.uniovi.es>
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT

--- configure.orig	2005-12-21 18:55:37.000000000 +0100
+++ configure	2005-12-21 18:57:03.000000000 +0100
@@ -8188,7 +8188,7 @@
 
 
 
-if test "x" == "x"; then
+if test "x" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8279,7 +8279,7 @@
   LIBS="$nmh_libs$LIBS"
 else
 
-if test "xndbm" == "x"; then
+if test "xndbm" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8370,7 +8370,7 @@
   LIBS="$nmh_libs$LIBS"
 else
 
-if test "xdbm" == "x"; then
+if test "xdbm" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8461,7 +8461,7 @@
   LIBS="$nmh_libs$LIBS"
 else
 
-if test "xdb1" == "x"; then
+if test "xdb1" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8552,7 +8552,7 @@
   LIBS="$nmh_libs$LIBS"
 else
 
-if test "xdb" == "x"; then
+if test "xdb" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8643,7 +8643,7 @@
   LIBS="$nmh_libs$LIBS"
 else
 
-if test "xgdbm" == "x"; then
+if test "xgdbm" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else
@@ -8799,7 +8799,7 @@
 echo "${ECHO_T}$ac_cv_lib_gdbm_gdbm_open" >&6
 if test $ac_cv_lib_gdbm_gdbm_open = yes; then
 
-if test "xgdbm_compat" == "x"; then
+if test "xgdbm_compat" = "x"; then
    nmh_libs=
       nmh_testname=libc
 else

--Boundary_(ID_+Sje6ENiuK1p2o4h5a0KDw)--