ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] How to check linux header files availability before compiling


From: Stuart Hughes
Subject: Re: [Ltib] How to check linux header files availability before compiling ?
Date: Fri, 11 Jun 2010 13:38:31 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080707)

Hi Franz,

This file will always be in rpm/BUILD/linux-xxxxxx/include/linux if left
unpacked.  However the interface should be through rootfs/usr/src/linux
(DEV_IMAGE...).  This is the public interface for kernel headers.
Confirm that you have these installed on your rootfs (there is an option
in LTIB to install kernel headers).

If you do have kernel headers installed, It's possible that later
kernels do not install this file any more?  maybe a kernel expert on the
list knows (I vaguely remember something like this).

Unfortunately today's best practice is tomorrows
_rug_pulled_from_under_your_feet.

Regards, Stuart


Franz TRIERWEILER wrote:
> Hi Stuart,
> 
> I included and tested this. What's weird with my LTIB is that the
> autoconf.h file is never copied to KHDR_DIR/linux/autoconf.h even when I
> select 'Include kernel headers' in LTIB.
> 
> Instead, this file is with the kernel sources in
> rpm/BUILD/linux-xxxxxx/include/linux
> 
> Thus: why ?
> 
> Of course, I could check the availability of another file but I want to
> comply with the best practice.
> 
> Franz
> 
> 2010/6/9 Stuart Hughes <address@hidden <mailto:address@hidden>>
> 
>     Hi Franz,
> 
>     I normally use this in the .spec file %build section:
> 
> 
>     %Build
>     KHDR_DIR=$DEV_IMAGE/usr/src/linux/include
>     if [ ! -f $KHDR_DIR/linux/autoconf.h ]
>     then
>        cat <<TXT
> 
>     No file: $KHDR_DIR/linux/autoconf.h
> 
>     You need to build the kernel and have 'Include kernel headers' set
>     to build this package
> 
>     TXT
>        exit 1
>     fi
> 
>     Regards, Stuart
> 
> 
>     Franz TRIERWEILER wrote:
>     > Hi,
>     >
>     > My package Makefile needs to set gcc include path to the kernel
>     headers
>     > (rootfs/usr/src/linux/include). I would like the availability of these
>     > files to be checked before gcc prints a cryptic error.
>     >
>     > Is there a way of checking linux header availability before compiling?
>     > (my makefile is not generated by ./configure).
>     >
>     > Must I specify this in the package dependencies?
>     >
>     > Is there a LTIB parameter I can catch from the Makefile to set the
>     path
>     > automatically ?
>     >
>     > Thanks,
>     > Franz
>     >
>     >
> 
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]