Subject: libnbcompat on Solaris 9
To: None <tech-pkg@netbsd.org>
From: Andrew <andrew@ugh.net.au>
List: tech-pkg
Date: 07/16/2005 03:42:53
Using the latest pkgsrc, CVSed today, I can't compile libnbcompat under 
Solaris 9.

gcc -I/usr/pkg/gcc34/include 
-I/usr/pkg/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.3/include -I/usr/include 
-I/usr/pkg/include -I. -I.  -O -I/usr/pkg/gcc34/include 
-I/usr/pkg/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.3/include -I/usr/include 
-I/usr/pkg/include -DHAVE_CONFIG_H -c glob.c
In file included from glob.c:12:
__glob13.c: In function `globextend':
__glob13.c:836: error: `ARG_MAX' undeclared (first use in this function)
__glob13.c:836: error: (Each undeclared identifier is reported only once
__glob13.c:836: error: for each function it appears in.)
*** Error code 1

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

Stop.
bmake: stopped in /usr/pkg/pkgsrc/pkgtools/libnbcompat


ARG_MAX is defined in /usr/include/limits.h. I tried to trace through the 
inlcudes in glob.c and it seems to pull in __glob13.c -> nbcompat.h -> 
nbcompat/limits.h 
-> /usr/pkg/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.3/include/limits.h
It doesn't seem to ever get to /usr/include/limits.h but perhaps I jsut 
missed it.

The interesting this is if I cd into work/libncompat-20041024 and run 
bmake everything builds fine...

Thanks,

Andrew