[lfs-support] Headers in the system's include directory. Still Confused.

alupu at verizon.net alupu at verizon.net
Fri Feb 24 12:47:07 PST 2012


A recent "incident" in compiling 'udev-181' TRIGGERed me to again
wonder what's going on and where and how I've been doing things wrong.

I figure maybe this time, with a real world example, a good soul
will understand what's been bothering me and take the time to
calmly explain in _plain_ English the "Header" situation.
Note:  can actually be in any language as long as it is PLAIN.

REFERENCES
1.  Excerpt from the latest LFS kernel 3.2.6 installation text:

   << Warning
   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. >>

2.  My Glibc is v2.14.1 (recently installed, on Dec. 30, 2011)
    Note:  at the time I was on kernel 3.0.20 (or thereabouts).

3.1.  In trying to compile 'udev-181' I got this 'make' error,
       udev-builtin-input_id.c:  In function 'test_key':
        error: 'BTN_TRIGGER_HAPPY' undeclared (first use in this function)

3.2.  The 'BTN_TRIGGER_HAPPY' is not defined in '/usr/include/linux/input.h'
      as obviously expected by 'udev-builtin-input_id.c', but is clearly
      defined in '/linux-3.0.20/inclide/linux/input.h', probably a later
      addition to the Dec. 30, 2011 "environment".

      Note:  To spare the reader from a possible heart attack or some other
      indignity, I'm hastening to add that I managed to successfully worked
      this around by stuffing a definition of BTN_TRIGGER_HAPPY (0x2c0) in
      the offending source file which mercifully lead to a beautiful
      compile/check/install experience and my machine has been humming HAPPYly
      ever since.

So, some of the questions kicking around in my head, for anybody who'd care to
take the time to enlighten me on:

Q1.  Was I supposed to move the 'linux-x.y.z/include/' files to
 '/usr/include/' immediately after I installed Glibc?

Q2.  Am I supposed to move the 'linux-x.y.z/include/' files to
 '/usr/include/' each time after I install a new kernel?

Q3.  Which is the "system's include directory" - the '/usr/include/'?

Q4.  "sanitised headers" are those in this (?) Linux kernel tarball
     against which Glibc was compiled?
     Glibc is compiled at a certain point in time.  "this" kernel
     varies almost daily, according to the LFS book and reality.

Q5.  What's the "raw kernel headers"?

Q6.  What's the "other kernel sanitized headers"?

Q7.  Is there a difference between "sanitised" and "sanitized" headers?
     (this is _just a joke_ - so bear with me, I've been in a silly mood
     once I saw 'udev-181' run so smoothly)

With apologies for my limitations and many thanks in advance,
-- Alex



More information about the lfs-support mailing list