Bruce Dubbs wrote:
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.15.94.0.2.2/bfd -I. -D_GNU_SOURCE -DTRAD_CORE -I. -I../../binutils-2.15.94.0.2.2/bfd -I../../binutils-2.15.94.0.2.2/bfd/../include -I../../binutils-2.15.94.0.2.2/bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ../../binutils-2.15.94.0.2.2/bfd/bfdio.c -o bfdio.o ../../binutils-2.15.94.0.2.2/bfd/bfdio.c: In function `bfd_seek': ../../binutils-2.15.94.0.2.2/bfd/bfdio.c:352: error: `EINVAL' undeclared (first use in this function) ../../binutils-2.15.94.0.2.2/bfd/bfdio.c:352: error: (Each undeclared identifier is reported only once ../../binutils-2.15.94.0.2.2/bfd/bfdio.c:352: error: for each function it appears in.)
make[3]: *** [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).

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to