Subject: Re: Netatalk 1.6.2 locking errors on -current?
To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
From: Frederick Bruckman <>
List: tech-pkg
Date: 09/29/2003 14:14:25
On Mon, 29 Sep 2003, Hauke Fath wrote:

> At 16:01 Uhr -0500 28.9.2003, Frederick Bruckman wrote:
> >> Build in process... Btw, what should I make of
> >>(work/netatalk-163/config.log)?
> >
> >Means nothing to me. Most "configure" tests are expected to fail...
> The stdout message that's related to this config.log entry is
> checking for mount.h... no
> checking sys/mount.h usability... no
> checking sys/mount.h presence... yes
> configure: WARNING: sys/mount.h: present but cannot be compiled
> configure: WARNING: sys/mount.h: check for missing prerequisite headers?
> configure: WARNING: sys/mount.h: proceeding with the preprocessor's result
> configure: WARNING:     ## ------------------------------------ ##
> configure: WARNING:     ## Report this to ##
> configure: WARNING:     ## ------------------------------------ ##
> checking for sys/mount.h... yes
> which _does_ sound serious. I had it on a different screen and so could not
> copy&paste at the time.

Look in "config.log" for the actual error:

    configure:9735: checking sys/mount.h usability
    configure:9748: cc -c -O2 -I/usr/pkg/include   -I/usr/pkg/include
    conftest.c >&5
    In file included from /usr/include/sys/mount.h:43,
		     from configure:9813:
    /usr/include/sys/ucred.h:47: error: `NGROUPS' undeclared here (not in a function)
    /usr/include/sys/ucred.h:55: error: `NGROUPS' undeclared here (not in a function)
    configure:9751: $? = 1
    configure: failed program was:
    | #line 9738 "configure"
    | /* confdefs.h.  */

It looks like <sys/ucred.h> should really include <sys/param.h> near
the top. In principle, all headers should be able to stand alone, but
it's not always the case. The application programmer (or porting
programmer) always has a simple work-around, which is, of course, to
include the needed file explicitly. It's evidently not a problem for
netatalk, or the build would have failed. No doubt, <sys/param.h> is
getting pulled in some other way. It's only a potential problem when
you see "implicit definintion" in the build log", and even then, if
the return type of the implicitly defined function is int, there are
generally no consequences.

Now, if "autoconf" ever backs up it's threat to go with the compiler
result, then the netatalk configure script would fail to define
SYS_MOUNT_H, and the afpd build would surely break. In that case, the
autoconf macros would just have to be fixed to include <sys/param.h>
in the appropriate places.