LFS-6.1-testing binutils failure
bryan at kadzban.is-a-geek.net
Mon Apr 4 03:58:44 PDT 2005
Bruce Dubbs wrote:
> gcc -DHAVE_CONFIG_H -I. -I../../binutils-126.96.36.199.2.2/bfd -I.
> -D_GNU_SOURCE -DTRAD_CORE -I. -I../../binutils-188.8.131.52.2.2/bfd
> -I../../binutils-184.108.40.206.2.2/bfd/../intl -I../intl -W -Wall
> -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c
> ../../binutils-220.127.116.11.2.2/bfd/bfdio.c -o bfdio.o
> ../../binutils-18.104.22.168.2.2/bfd/bfdio.c: In function `bfd_seek':
> ../../binutils-22.214.171.124.2.2/bfd/bfdio.c:352: error: `EINVAL' undeclared (first use in this function)
> ../../binutils-126.96.36.199.2.2/bfd/bfdio.c:352: error: (Each undeclared identifier is reported only once
> ../../binutils-188.8.131.52.2.2/bfd/bfdio.c:352: error: for each function it appears in.)
> make: *** [bfdio.lo] Error 1
> The boot CD has /usr/include/linux/errno.h:#define EINVAL 22 /* Invalid argument */
I didn't see it, but I didn't build from the boot CD either (it was from
an LFS-5-more-or-less system).
Does the bfdio.c function #include <errno.h>? Does the boot CD's
/usr/include/errno.h #include <linux/errno.h>?
On my system (the LFS-5-more-or-less one), /usr/include/errno.h pulls in
/usr/include/bits/errno.h, which pulls in /usr/include/linux/errno.h,
which does nothing but include /usr/include/asm/errno.h, which is where
most of the actual definitions are. Those were Fedora headers, though
(the LLH project didn't exist at the time). I also used the NPTL hint.
On the newly built 6.1-testing system, however, with LLH headers, it
looks more like the CD -- /usr/include/errno.h pulls in <bits/errno.h>,
which pulls in <linux/errno.h> (and <asm/errno.h> just pulls in
<linux/errno.h>, which is probably done for backwards compatibility).
The compiler should never see an EINVAL symbol -- that should be removed
by the preprocessor when it runs through the files, pulls in all the
headers, and replaces all the #defines with their values. My thinking
is that this didn't happen because either <errno.h> wasn't included, or
<linux/errno.h> wasn't included (so the preprocessor didn't have a
definition for EINVAL).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 256 bytes
Desc: OpenPGP digital signature
More information about the lfs-dev