aeriksson | 4 Sep 2007 09:21

nmh leaving gentoo?


Hi,

It seems the nmh ebuild is getting old and is considered for removal. I'm 
sending this to you nmh folks to see if there are any nmh & gentoo users out 
there interested in making this not happen.

http://bugs.gentoo.org/show_bug.cgi?id=189519

It appears the particular thing that triggered this is that it's packaged to 
require sys-libs/db-1 which, looking at configure.in, is not really true. That 
file says:

NMH_CHECK_DBM(,,
  NMH_CHECK_DBM(ndbm,,
    NMH_CHECK_DBM(dbm,,
      NMH_CHECK_DBM(db1,,
        NMH_CHECK_DBM(db,,
          NMH_CHECK_DBM(gdbm,,
            AC_CHECK_LIB(gdbm,gdbm_open,
              NMH_CHECK_DBM(gdbm_compat,LIBS="-lgdbm_compat -lgdbm $LIBS",
                 AC_MSG_ERROR([cannot find a library providing dbm_open()]),-lgdbm),
              AC_MSG_ERROR([cannot find a library providing dbm_open()]))))))))

Anybody knows what all of these database libs correspond to in terms of gentoo 
packages? I've built nmh vs. the gentoo gdbm package and it built fine 
(although the only db usage in nmh is slocal, which I don't use, so I cannot 
vouch for the correctness of it).

My thinking is to create an nmh-1.2 ebuild, fixing this db stuff, and attach 
(Continue reading)

Peter Maydell | 4 Sep 2007 10:44
Picon

Re: nmh leaving gentoo?

aeriksson <at> fastmail.fm wrote:
>It appears the particular thing that triggered this is that it's packaged to 
>require sys-libs/db-1 which, looking at configure.in, is not really true. That 
>file says:
>
>
>NMH_CHECK_DBM(,,
>  NMH_CHECK_DBM(ndbm,,
>    NMH_CHECK_DBM(dbm,,
>      NMH_CHECK_DBM(db1,,
>        NMH_CHECK_DBM(db,,
>          NMH_CHECK_DBM(gdbm,,
>            AC_CHECK_LIB(gdbm,gdbm_open,
>              NMH_CHECK_DBM(gdbm_compat,LIBS="-lgdbm_compat -lgdbm $LIBS",
>                 AC_MSG_ERROR([cannot find a library providing dbm_open()]),-lgdbm),
>              AC_MSG_ERROR([cannot find a library providing dbm_open()]))))))))

This is an out of date version of the configure.in. The one in CVS says:
    dnl There are at least four implementations of ndbm, and
    dnl several of those can be in different places at the whim
    dnl of the system integrator. A good summary of this mess
    dnl can be found at http://www.unixpapa.com/incnote/dbm.html

    dnl Classic ndbm with no library required (eg NetBSD): try this
    dnl first so we don't accidentally link in a pointless but harmless
    dnl library in one of the later ndbm.h+libfoo tests:
    NMH_CHECK_NDBM(ndbm.h,,,
    dnl Berkeley DBv2 emulating ndbm: header in db.h:
      NMH_CHECK_NDBM(db.h,db,,
    dnl Berkeley DBv1 emulating ndbm:
(Continue reading)

Anders Eriksson | 5 Sep 2007 19:15

Re: nmh leaving gentoo?


> This is an out of date version of the configure.in. The one in CVS says:
>     dnl There are at least four implementations of ndbm, and
>     dnl several of those can be in different places at the whim
>     dnl of the system integrator. A good summary of this mess
>     dnl can be found at http://www.unixpapa.com/incnote/dbm.html
> 
>     dnl Classic ndbm with no library required (eg NetBSD): try this
>     dnl first so we don't accidentally link in a pointless but harmless
>     dnl library in one of the later ndbm.h+libfoo tests:
>     NMH_CHECK_NDBM(ndbm.h,,,
>     dnl Berkeley DBv2 emulating ndbm: header in db.h:
>       NMH_CHECK_NDBM(db.h,db,,
>     dnl Berkeley DBv1 emulating ndbm:
>         NMH_CHECK_NDBM(ndbm.h,db,,
>           NMH_CHECK_NDBM(ndbm.h,db1,,
>     dnl Classic ndbm:
>             NMH_CHECK_NDBM(ndbm.h,ndbm,,
>     dnl glibc2.1 systems put db1 in a subdir:
>               NMH_CHECK_NDBM(db1/ndbm.h,db1,,
>     dnl GNU gdbm emulating ndbm, with header possibly in gdbm/
>     dnl and possibly needing gbdm_compat library:
>                 NMH_CHECK_NDBM(gdbm/ndbm.h,gdbm,,
>                   NMH_CHECK_NDBM(gdbm/ndbm.h,gdbm_compat -lgdbm,,
>                     NMH_CHECK_NDBM(ndbm.h,gdbm,,
>                       NMH_CHECK_NDBM(ndbm.h,gdbm_compat -lgdbm))))))))))
> 
> (plus some logic I haven't quoted for allowing the user to override the
> autodetection.)
> 
(Continue reading)

Peter Maydell | 5 Sep 2007 19:31
Picon

Re: nmh leaving gentoo?

Anders Eriksson wrote:
>I'll see to that once I get a 1.2 build in decent shape. It seems swapping a 
>dependecy on berkdb for one on gdbm is the easy way out, though it'd be better 
>to be able to support any of the ones supported by nmh. Do you know what the 
>official package names are for that impressive pile of libs and headers?

Most of them are for non-Linux targets (eg BSDs) or for archaic versions
of Linux or for systems where the dbm library has been installed by the
sysadmin in some weird location. Go for gdbm, it's the only sensible thing.

-- PMM

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

Anders Eriksson | 6 Sep 2007 15:53

strcasecmp.c and gcc -O2


strcasecomp(a,b) segfaults if a=NULL and compiled with -O2 and gcc >= 4.1.1.

The code in question is:

int
mh_strcasecmp (const char *s1, const char *s2) 
{
    const unsigned char *us1, *us2;

    us1 = (const unsigned char *) s1,
    us2 = (const unsigned char *) s2;

    if (!us1)
        us1 = "";
    if (!us2)
        us2 = "";

    while (tolower(*us1) == tolower(*us2++)) 
        if (*us1++ == '\0')
            return (0);
    return (tolower(*us1) - tolower(*--us2));
}

It seems the compiler (using -O2) totally optimizes away the two if clauses. 
Looking at the assembler:

gcc-4.2.0 -S -DHAVE_CONFIG_H -I.. -I. -I.. -march=i386  -pipe -O2 strcasecmp.c

strcasecmp:
(Continue reading)

Josh Bressers | 6 Sep 2007 16:15
Gravatar

Re: strcasecmp.c and gcc -O2

> 
> strcasecomp(a,b) segfaults if a=NULL and compiled with -O2 and gcc >= 4.1.1.
> 
> The code in question is:
> 
> 
> int
> mh_strcasecmp (const char *s1, const char *s2) 
> {
>     const unsigned char *us1, *us2;
> 
>     us1 = (const unsigned char *) s1,
>     us2 = (const unsigned char *) s2;
> 
>     if (!us1)
>         us1 = "";
>     if (!us2)
>         us2 = "";
>  
>     while (tolower(*us1) == tolower(*us2++)) 
>         if (*us1++ == '\0')
>             return (0);
>     return (tolower(*us1) - tolower(*--us2));
> }
> 
> 
> It seems the compiler (using -O2) totally optimizes away the two if clauses. 
> Looking at the assembler:
> 

(Continue reading)

Anders Eriksson | 6 Sep 2007 16:24

Re: strcasecmp.c and gcc -O2


josh <at> bress.net said:
> I don't see this behavior with gcc 4.1.2 on Fedora 7.  It's quite possible
> you're seeing a gcc bug.  I'd suggest writing a minimalistic freestanding
> testcase.  If that testcase still exhibits this behavior, submit a bug report
> to the gcc folks.

Ok, good news. I'll see what I can do.

/A

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

Martin McCormick | 1 Oct 2007 18:10

What Happened to mha-mhedit?

	I moved my mail base of operations from one system to
another and installed the latest version of mhonarc, still using
the configuration files I had used on the slightly older system.
I started to reply to a mime message and got the error stating
that /usr/local/bin/mha-mhedit was missing. It had been part of
the source tree for the FreeBSD port of mhonarc but it seems to
have vanished.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group

_______________________________________________
Nmh-workers mailing list
Nmh-workers <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers


Gmane