bug-gnu-utils
[Top][All Lists]
Advanced

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

lack of param.h causing compilation problem in a custom environment


From: Daniel Bradley
Subject: lack of param.h causing compilation problem in a custom environment
Date: Sun, 24 Aug 2003 00:35:32 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3

Hi,

I think i've identified a compilation problem while building gawk in a custom environment roughly based on Linux from scratch 4.1.

Glibc-2.2.5
binutils-2.13
gcc-3.2
gawk-3.1.1 (but visual checking of source would indicate problem is also in 3.1.3)

I think i've traced the problem to being that <sys/params.h> isn't being #included in awk.h yet there exists a #if defined test that relies upon NGROUPS_MAX, which is retrieved via that header (original definition is in <linux/limits.h>).

Therefore if NGROUPS_MAX is defined it will not be detected in awk.h thus "groups" and "groupset" will not be declared - a similar test is also in main.c where the two are defined.

This results in the code at "io.c:1364" trying to use the ngroups
global variable that hasn't been defined yet.

The compile error I get is:

gcc -DDEFPATH="\".:/system/software/text_processing/gawk-3.1.1/share/awk\""
-DHAVE_CONFIG_H -DGAWK
-DLOCALEDIR="\"/system/software/text_processing/gawk-3.1.1/share/locale\""
-I. -I. -I. -I./intl    -march=i386 -c `test -f io.c || echo './'`io.c
io.c: In function `useropen':
io.c:1365: `ngroups' undeclared (first use in this function)
io.c:1365: (Each undeclared identifier is reported only once
io.c:1365: for each function it appears in.)
io.c:1367: `groupset' undeclared (first use in this function)
make[2]: *** [io.o] Error 1
make[2]: Leaving directory `/local/build/gawk-3.1.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/local/build/gawk-3.1.1'
make: *** [all] Error 2
software@/local/build/gawk-3.1.1$

Cheers,
Daniel Bradley.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]