Glibc compile fails in chapter 5 (solved, or maybe not)
Hello, this is my first attempt at LFS.
I have been tinkering with Gentoo for about a year now, and thought I would give LFS a shot. However, glibc (version 2.5) fails to build with this error: Code:
gcc -B/tools/bin/ check_fds.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes -mpreferred-stack-boundary=4 -I../include -I/mnt/lfs/build/glibc-build/csu -I/mnt/lfs/build/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.1/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DHAVE_INITFINI -o /mnt/lfs/build/glibc-build/csu/check_fds.o -MD -MP -MF /mnt/lfs/build/glibc-build/csu/check_fds.o.dt -MT /mnt/lfs/build/glibc-build/csu/check_fds.o Any help will be greatly appreciated. Thanks, weed |
I'm not sure how much help this will be, but, EBADF is one of those symbols defined (directly or indirectly) by /usr/include/errno.h
That's available, right? Does it directly define EBADF? If not, it probably includes some other .h file which does, either directly or indirectly. Check out the "directly or indirectly" question. If /usr/include/errno.h doesn't define EBADF, but includes some other file, does that other file define EBADF (either directly or indirectly)? It could, be, though, that LFS is using its own version of errno.h, one that's provided with LFS. If that's the case, my answer above won't do you much good. If you can't find some other more useful answer, go to: http://www.linuxfromscratch.org/support.html You'll find a whole array of support resources, including mailing lists where you can pose this question. Hope this helps. |
Thank you very much, wjevans!
For some reason, the patch to install the kernel headers mustn't of worked, because I don't have errno.h in the temporary tools directory under the folder include. Considering that failed miserably (and the old sources were only 2.6.18), I might as well install some later kernel sources (ie: 2.6.19). In order to install the kernel headers, is it a mere copy of the include directory in the top level directory of the kernel source or is it a bit more than that? Thanks again for your help, weed |
Quote:
Basically follow the instructions as in the svn lfs: Chapter 5 and Chapter 6 But ignore the patching instructions. |
Thanks Daws, I wasn't actually using the .19.x sources, I was using the .18.x sources as specified in the svn version of the LFS install guide.
Nevertheless, I was going to try the .19.x sources next, so you've given me instructions on how to get through the next step. Thank you again! I have my reasons for using the SVN install guide. The stable guide doesn't cover gcc 4.1.1 or glibc 2.5. So, thank you very much Daws and wjevans for your help. I think my problem is now solved. weed |
Fantastic, here we go again.
Glibc fails again with another error: Code:
gcc -B/tools/bin/ ../sysdeps/unix/sysv/linux/ifaddrs.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -Wstrict-prototypes -mpreferred-stack-boundary=2 -I../include -I/mnt/lfs/build/glibc-build/inet -I/mnt/lfs/build/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.1.1/include -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -o /mnt/lfs/build/glibc-build/inet/ifaddrs.o -MD -MP -MF /mnt/lfs/build/glibc-build/inet/ifaddrs.o.dt -MT /mnt/lfs/build/glibc-build/inet/ifaddrs.o Code:
make mrproper Any help would be appreciated, as this is starting to be a major pita. weed |
HLFS SVN instructions for building the headers. They should be similar to LFS.
mkdir /tools/tmp make mrproper make headers_check make INSTALL_HDR_PATH=/tools/tmp headers_install cp -R /tools/tmp/include/* /tools/include rm -r /tools/tmp Expect to do a lot of digging on glibc-2.5 and gcc-4.1.1 I haven't been able to get the toolchain working either. If this is your first attempt at LFS, you're really better off with the stable book as the SVN's are usually very difficult to get going on, at least in my experience. Also, builds according to SVN would work better with the LFS live-cd. It even states in HLFS SVN that you MUST use the live-cd or a previously compiled version of LFS. |
All times are GMT -5. The time now is 08:28 PM. |