Linux API headers

Dejan Čabrilo dcabrilo at
Mon Jul 9 11:17:04 PDT 2007

Hello all,

I have tried my best to research this, but came up with no answer
myself, so let me turn to the mailing group instead. The question is
lengthy, but I'm puzzled and there seems to be a lack of documentation,
so I can't put it concisely. Please bear with me:

I installed LFS (Version SVN-20070706) and everything is good. However,
I would now like to use a package manager to pack all the packages to
make my life easier. So, I essentially need to recompile every package
from Chapter 6 of the book, as I already have the system on my machine.

If I try to do:

make mrproper
make headers_check
make INSTALL_HDR_PATH=/usr headers_install

the system goes to hell, glibc becomes unusable, compilers fail sanity 
checks, etc, and I can't compile anything (thanks god for jhalfs).

The warning in the book reads in Chapter 8 section 3 (installing the
"The headers in the system's include directory should always be the 
ones against which Glibc was compiled, that is, the sanitised headers 
from this Linux kernel tarball. Therefore, they should never be 
replaced by either the raw kernel headers or any other kernel 
sanitized headers."

So, my questions are:

1a) What does the warning in the SVN book mean by "the ones against
which Glibc was compiled ... the sanitized headers from this Linux
kernel tarball"?

1b) Why can't I reuse what is installed by make headers_install target?
I.e. why did "make headers_install" work in chapter 6, and it doesn't
work after everything was installed (I can't compile anything anymore)?

2) Do those headers have to match the version of the kernel in use? What
happens if they don't? I suppose I would have to rebuild glibc, but
would other software be affected by headers change if glibc remained the

Whoever got this far gets a beer next time they are in Belgrade :) I
hope this all makes some sense...

Looking forward to responses!

More information about the lfs-support mailing list