[uClibc]missing stdarg.h stddef.h, etc.

Todd Sundsted toddx503 at yahoo.com
Fri Oct 4 01:48:35 UTC 2002


I'm writing an article for IBM DeveloperWorks about installing Linux on
a laptop featuring uClibc and Busybox.  I managed to pull it off without
a hitch using uClibc-0.9.11 and busybox-0.60.3, but my attempts to do
the same with uClibc-0.9.15 have been blocked at every turn.

First, I can no longer compile uClibc out of the box.  I get errors like:

gcc -Wall -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -Os
-march=i386 -mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=0
-falign-loops=0 -fno-builtin -nostdinc  -I../../include -iwithprefix include
-I. -D_LIBC  -DNDEBUG  -fPIC -DLD_TRACE -DUCLIBC_TARGET_PREFIX=\"/\"
-DUCLIBC_DEVEL_PREFIX=\"/usr/i386-linux-uclibc\"
-DUCLIBC_BUILD_DIR=\"/home/todd/foo/uClibc-0.9.15\" -I. -I./i386 -I../libdl -c
ldso.c -o ldso.o
In file included from ldso.c:118:
ld_syscall.h:2:20: stdarg.h: No such file or directory
In file included from ../../include/sys/types.h:30,
                 from ld_syscall.h:4,
                 from ldso.c:118:
../../include/bits/types.h:29:20: stddef.h: No such file or directory
In file included from ld_syscall.h:4,
                 from ldso.c:118:
../../include/sys/types.h:146:20: stddef.h: No such file or directory

The compiler cannot find stddef.h and stdarg.h.  If I remove -nostdinc
from the compiler options I can get uClibc to compile.  However, I run
into another problem.  When I install the development environment in
/usr/i386-linux-uclibc and set the PATH variable, I cannot compile
Busybox.  This time I get errors like:

gcc -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -Wall -Wshadow -Os -march=i386
-mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=0
-falign-loops=0 -fomit-frame-pointer -D_GNU_SOURCE  -DBB_VER='"0.60.4"'
-DBB_BT='"2002.10.04-01:04+0000"'  -Ipwd_grp -c pwd_grp/__getpwent.c -o
pwd_grp/__getpwent.o
In file included from pwd_grp/__getpwent.c:21:
/usr/i386-linux-uclibc/include/stdlib.h:35:20: stddef.h: No such file or
directory
In file included from /usr/i386-linux-uclibc/include/sys/types.h:30,
                 from /usr/i386-linux-uclibc/include/stdlib.h:400,
                 from pwd_grp/__getpwent.c:21:

Once again, the compiler can't find stddef.h and stdarg.h.  Presumably
this is because they aren't available to install.  I can fix this problem
by manually copying stdarg.h and a couple other header files from my gcc
directory and then I can build Busybox.

Ultimately however, this is a problem because I'm never going to be able
to explain how to do this to my audience.  Does anyone have any insight
into this problem?  Am I using the wrong Linux distro, version of GCC or
GLIBC...?

Some other data:
o I'm building on a vanilla installation of Redhat 7.3
o gcc -v = "gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-112)"
o glibc is 2.2.5

Stdarg.h and stddef.h are in /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/.

Thanks in advance,
Todd


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



More information about the uClibc mailing list