Subject: port-sparc64/26015: usr.sbin/makefs, built on solaris, fails to make sparc64 release
To: None <gnats-bugs@gnats.NetBSD.org>
From: Chris Ross <cross+netbsd@distal.com>
List: netbsd-bugs
Date: 06/22/2004 17:11:31
>Number:         26015
>Category:       port-sparc64
>Synopsis:       usr.sbin/makefs, built on solaris, fails to make sparc64 release
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 22 21:12:05 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Chris Ross
>Release:        NetBSD 2.0F (CVS HEAD as of 20040622)
>Organization:
>Environment:
SunOS palladium 5.10 s10_54 sun4u sparc SUNW,Sun-Fire-880
Architecture: sparc64
Machine: sparc64
>Description:
	When trying a "./build.sh release" (with numerous other options
as well), it will eventually fail when running nbmakefs, saying:

[ "work.built" = work.built -a -f install.fs -a ! install.fs -ot work.built ]  || {  echo '#  ' " create " instfs/install.fs;  rm -f install.fs install.fs.tmp; /data/NetBSD/obj/data/NetBSD/src/tooldir.SunOS-5.10-sparc/bin/nbmakefs -t ffs -B be -s 5m -F work.spec  -N /data/NetBSD/src/etc -o bsize=4096,fsize=512  -o optimization=space,minfree=0  -o bsize=16k,fsize=2k -f 15 install.fs.tmp work  && mv -f install.fs.tmp install.fs;  }
#    create  instfs/install.fs
Calculated size of `install.fs.tmp': 5242880 bytes, 949 inodes
block size 16384 is too large, maximum is 8192

*** Failed target:  install.fs

  This problem occurs because makefs.c includes sys/param.h.  On NetBSD,
or when building NetBSD binaries (and therefore using -isystem to point
at NetBSD headers), MAXBSIZE gets set to 64kb, at least on sparc64 and
quite a few other ports.  However, the /usr/include/sys/param.h on
Solaris 10_b54, sets MAXBSIZE to 8k.  So, when the "tool" version of
makefs runs, being given "-o bsize=16k" (which is in a sparc64 Makefile),
it fails.
>How-To-Repeat:
	Try to "build.sh -m sparc64 release" on a Solaris machine.
>Fix:
	The #include of sys/param.h should either not occur in the
case of a non-NetBSD compile, or the value of MAXBSIZE should be
modified if it's not expectedly high.  I'll leave it to the reader
to decide the best way to do this.
>Release-Note:
>Audit-Trail:
>Unformatted: