pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

netatalk-2.2.1nb11 build failure

Hi, I'm having problems building netatalk-2.2.1nb11 on
NetBSD-current/alpha as of March 6, 2013
(NetBSD 6.99.17):

gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..    -D_PATH_AD=\"/usr/pkg/bin/ad\" 
-I../../sys/netbsd -I../../include -D_U_="__attribute__((unused))" -O2 -mieee 
-I/usr/pkg/include -I/usr/include -I/usr/pkg/include/db4 -I../../sys -MT 
ad-ad_cp.o -MD -MP -MF .deps/ad-ad_cp.Tpo -c -o ad-ad_cp.o `test -f 'ad_cp.c' 
|| echo './'`ad_cp.c
ad_cp.c: In function 'setfile':
ad_cp.c:848:5: error: 'const struct stat' has no member named 'st_atim'
ad_cp.c:848:5: error: 'const struct stat' has no member named 'st_atim'
ad_cp.c:849:5: error: 'const struct stat' has no member named 'st_mtim'
ad_cp.c:849:5: error: 'const struct stat' has no member named 'st_mtim'
gmake[3]: *** [ad-ad_cp.o] Error 1 
gmake[3]: Leaving directory 

The lines in question are:

#if defined(__FreeBSD__)
    TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atimespec);
    TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtimespec);
    TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim);
    TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim);

I had previously build netatalk-2.2.1nb8 on an earlier -current (from
around May 2012), and it didn't build ad.

It looks like netatalk is now building ad because it has detected the
openat(2), renameat(2), etc… family of functions, which were added to
NetBSD around November 2012, so the configure script has #defined
HAVE_ATFUNCS. Not sure why building ad is conditional on HAVE_ATFUNCS
though, since as far as I can tell, it doesn't use any of them. The
pkgsrc Makefile conditionalizes installation of bin/ad on PLIST.ea,
which is set on SunOS and DragonFly. I guess that's supposed to be set
if the OS has extended attribute support? But netatalk thinks that
NetBSD does have extended attribute support--the configure script found
/usr/include/sys/xattr.h and getxattr(), etc..., and config.h has
#define EA_MODULES "ad | sys".

In any case, I don't know what the right thing to do is, but I worked
around the build failure by adding || defined(__NetBSD__) to the #if,
and setting PLIST.ea = yes for NetBSD. However, I doubt that's the
proper fix. :)

Name: Dave Huang         |  Mammal, mammal / their names are called /
INet: |  they raise a paw / the bat, the cat /
FurryMUCK: Dahan         |  dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 37 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++

Home | Main Index | Thread Index | Old Index