Subject: pkg/32331: pkgtools/libnbcompat broken on netbsd-2
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: pkgsrc-bugs
Date: 12/18/2005 18:10:00
>Number:         32331
>Category:       pkg
>Synopsis:       pkgtools/libnbcompat broken on netbsd-2
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 18 18:10:00 +0000 2005
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        NetBSD 2.1_STABLE
>Organization:
Mahlzeit!
>Environment:
	
	
System: NetBSD q700 2.1_STABLE NetBSD 2.1_STABLE (FG54) #0: Sat Dec 17 21:58:39 CET 2005 hauke@q700:/usr/src/sys/arch/mac68k/compile/FG54 mac68k
Architecture: m68k
Machine: mac68k
>Description:

Building pkgtools/libnbcompat breaks on netbsd-2 (mac68k). I am marking
this critical/high because it breaks pkg_install which breaks avery
other build.

The buildlog:

[...]

checking sys/statvfs.h usability... no
checking sys/statvfs.h presence... yes
configure: WARNING: sys/statvfs.h: present but cannot be compiled
configure: WARNING: sys/statvfs.h:     check for missing prerequisite headers?
configure: WARNING: sys/statvfs.h: see the Autoconf documentation
configure: WARNING: sys/statvfs.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/statvfs.h: proceeding with the preprocessor's result
configure: WARNING: sys/statvfs.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------- ##
configure: WARNING:     ## Report this to grant@NetBSD.org ##
configure: WARNING:     ## ------------------------------- ##
checking for sys/statvfs.h... yes

[...]

config.status: creating Makefile
config.status: creating nbcompat/config.h
===> Building for libnbcompat-20041024
cc  -I. -I.  -O2 -m68040 -DHAVE_CONFIG_H -c bits.c
cc -I. -I.  -O2 -m68040 -Wl,-R/usr/pkg/lib -o bits bits.o
./bits nbcompat/nbtypes.h
/usr/bin/awk -f nbcompat.awk nbcompat/config.h > nbcompat/nbconfig.h
cc  -I. -I.  -O2 -m68040 -DHAVE_CONFIG_H -c glob.c
In file included from nbcompat/statvfs.h:43,
                 from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
/usr/include/sys/statvfs.h:53: error: parse error before "fsblkcnt_t"
/usr/include/sys/statvfs.h:58: error: parse error before "fsfilcnt_t"
/usr/include/sys/statvfs.h:79: error: parse error before "__fsblkcnt_t"
/usr/include/sys/statvfs.h:82: error: parse error before "f_bavail"
/usr/include/sys/statvfs.h:83: error: parse error before "f_bresvd"
/usr/include/sys/statvfs.h:85: error: parse error before "f_files"
/usr/include/sys/statvfs.h:86: error: parse error before "f_ffree"
/usr/include/sys/statvfs.h:87: error: parse error before "f_favail"
/usr/include/sys/statvfs.h:88: error: parse error before "f_fresvd"
/usr/include/sys/statvfs.h:107: error: parse error before '}' token
In file included from nbcompat/statvfs.h:52,
                 from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
/usr/include/sys/mount.h:51: error: conflicting types for `fsid_t'
/usr/include/sys/fstypes.h:37: error: previous declaration of `fsid_t'
/usr/include/sys/mount.h:59: error: redefinition of `struct fid'
/usr/include/sys/mount.h:455: error: redefinition of `struct fhandle'
/usr/include/sys/mount.h:567: error: conflicting types for `getmntinfo'
/usr/include/sys/statvfs.h:156: error: previous declaration of `getmntinfo'
In file included from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
nbcompat/statvfs.h:67:1: warning: "VFS_NAMELEN" redefined
In file included from nbcompat/statvfs.h:43,
                 from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
/usr/include/sys/statvfs.h:111:1: warning: this is the location of the previous definition
In file included from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
nbcompat/statvfs.h:68:1: warning: "VFS_MNAMELEN" redefined
In file included from nbcompat/statvfs.h:43,
                 from nbcompat.h:67,
                 from __glob13.c:35,
                 from glob.c:12:
/usr/include/sys/statvfs.h:112:1: warning: this is the location of the previous definition
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/pkgtools/libnbcompat/work/libnbcompat-20041024
*** Error code 1

The .work.log is at 
http://la.causeuse.org/hauke/NetBSD/pkgsrc/libnbcompat.work.log.bz2

My /etc/mk.conf:

#	$Id: mk.conf,v 1.2 1999/12/03 21:27:15 hauke Exp hauke $
#
# Global make(1) options

.ifdef BSD_PKG_MK
###  pkgsrc options

COPTS =			-m68040 -Os -pipe 
CFLAGS +=		-m68040 
CXXFLAGS +=		-m68040 

#EXTRACT_USING_PAX =	yes
ACCEPTABLE_LICENSES =	shareware no-commercial-use no-profit
PKG_DEVELOPER =		1
PKG_SYSCONFBASE =	/etc
PAPERSIZE =		A4

CLEANDEPENDS =		yes

.else
###  System build -- set on command line

#USETOOLS =		no

.endif


>How-To-Repeat:

Attempt to build any package on a netbsd-2 mac68k system. Find that
you need to update pkg_install (the netbsd-2 sources are not
up-to-date), and that you cannot because it breaks on libnbcompat.
 

>Fix:

	Yes, please. The pkgsrc build system has grown way over my
	head.

>Unformatted: