Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm currently configuring Glibc for LFS under a Gentoo 2005.0 system. It is unable to find my kernel headers under /tools/include:
lfs:/mnt/lfs/glibc-build$ glibc-2.3.5/configure --prefix=/tools --disable-profile --enable-add-ons --enable-kernel=2.6.0 --with-binutils=/tools/bin --without-gd --with-headers=/tools/include --without-selinux
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
running configure fragment for add-on nptl
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread nptl/sysdeps/unix/sysv nptl/sysdeps/unix nptl/sysdeps/i386/i686 nptl/sysdeps/i386 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether /tools/bin/as is GNU as... yes
checking whether /tools/bin/ld is GNU ld... yes
checking for /tools/bin/as... /tools/bin/as
checking version of /tools/bin/as... 184.108.40.206.1, ok
checking for /tools/bin/ld... /tools/bin/ld
checking version of /tools/bin/ld... 220.127.116.11.1, ok
checking for pwd... /bin/pwd
checking for gcc... gcc -B/tools/bin/
checking version of gcc -B/tools/bin/... 3.4.4, ok
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.80, ok
checking for gnumsgfmt... no
checking for gmsgfmt... gmsgfmt
checking version of gmsgfmt... 0.14.1, ok
checking for makeinfo... makeinfo
checking version of makeinfo... 4.8, ok
checking for sed... sed
checking version of sed... 4.1.4, ok
checking for autoconf... autoconf
checking whether autoconf works... yes
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/sh
checking for gawk... gawk
checking for perl... /usr/bin/perl
checking for install-info... /usr/bin/install-info
checking for bison... /usr/bin/bison
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... yes
checking for assembler .type directive prefix... @
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking for libunwind-support in compiler... no
checking for -z nodelete option... yes
checking for -z nodlopen option... yes
checking for -z initfirst option... yes
checking for -z relro option... yes
checking for -Bgroup option... yes
checking for libgcc_s suffix...
checking for --as-needed option... yes
checking whether --noexecstack is desirable for .S files... yes
checking for -z combreloc... yes
checking for -z execstack... yes
checking for -fpie... yes
checking for -fno-unit-at-a-time... yes
checking whether cc puts quotes around section names... no
checking for assembler .weak directive... yes
checking whether CFI directives are supported... yes
checking if -g produces usable source locations for assembler-with-cpp... yes
checking for ld --no-whole-archive... yes
checking for gcc -fexceptions... yes
checking for DWARF2 unwind info support... no_registry_needed
checking for __builtin_expect... yes
checking for __builtin_memset... no
checking for redirection of built-in functions... yes
checking for local label subtraction... yes
checking for __thread... yes
checking for tls_model attribute... yes
checking for libgd... no
checking for egrep... grep -E
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... no
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for long double... yes
checking size of long double... 12
running configure fragment for sysdeps/i386/elf
checking for i386 TLS support... yes
running configure fragment for nptl/sysdeps/unix/sysv/linux
running configure fragment for nptl/sysdeps/pthread
checking for forced unwind support... yes
checking for C cleanup handling... yes
running configure fragment for sysdeps/pthread
running configure fragment for sysdeps/unix/sysv/linux
checking for egrep... (cached) grep -E
checking installed Linux kernel header files... TOO OLD!
configure: error: GNU libc requires kernel header files from
Linux 2.0.10 or later to be installed before configuring.
The kernel header files are found usually in /usr/include/asm and
/usr/include/linux; make sure these directories use files from
Linux 2.0.10 or later. This check uses <linux/version.h>, so
make sure that file was built correctly when installing the kernel header
files. To use kernel headers not from /usr/include/linux, use the
configure option --with-headers
The headers I have installed are the 18.104.22.168 ones, and I have patched Glibc with the recommended patch under the "Stable" version.
because the scrpts in the build process are looking for your headers in uname-r ok so that means it is pointing to /lib/modules/uname -r/build if not found.
/lib/modules/uname -r/source if not found
/usr/src/linux witch are all symlink to /usr/include/asm
if you are just using headers instead of a full source. and want to keep it that way make sure your symlinks in /lib/modules/uname -r/ build or source point to the /usr/src/headers.
when I just first started using linux in 1997 this was my wake up to what the system is about. you would be better off installing a full source that matches your vmlinuz (kernel)
the other issue you have is the kernel as of your out put is to old and was compiled with a gcc under 3.2. if this is false then you may need to install the a new version of glibc.
and glibc2. I realize this can be frustrating hang in there . so if all said and done you have a full source and everything is correct and it still fails to find the header files. this tell me you have gone from a older kernel to the newer than 2.6.23 and all the patches will not help this problem. the reason why was a big kernel change. from a arch i386 to the x86 and they now symlink them but the big issue never could be fixed if any one could get it to say to compile drivers let me know because after building kernel after kernel and when they made the big change of the x86 after all the asm symlinks to headers every thing I could think of could not satisfy the header problem it was a script problem. so. what the big drag was I wanted the 22.214.171.124 because of the cool built in modules but sorry major kernel restructure. So I messaged Pat Volkerding About this last year and as you can tell slackware 12.0 and 12.1 there is a big change in the init scripts and the x86 thing.
This may not help you but at least you know it is not you. making mistakes.
i also have the same problem,
i use the command --with-headers=/tools/include so this should be right
but the /tools/include directory is totaly empty.
then if the /tools/include/ is empty you need to get the header package for it/ because /tool/include/linux is what you should see and that a big problem. because /tools/include/linux/ holds all the header for bulding programs. these are you c libraries. h.version
Distribution: mepis, ubuntu server ed. Debian. Redhat. Fedora, centos, LFS
at stage 5.6 they are telling to
make INSTALL_HDR_PATH=dest headers_install cp -rv dest/include* /tools/include
i get the next output from make
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
This program built for i386-redhat-linux-gnu