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

Re: [Cluster-devel] [PATCH] for a header-file-cannot-found building error

On 8/16/07, David Teigland <teigland redhat com> wrote:
> On Wed, Aug 15, 2007 at 11:27:01AM +0800, Denis Cheng wrote:
> > the -idirafter used as a backend including path for header files, but
> > the original style didn't work, pick a specific gcc command from the
> > making process:
> >
> > gcc -Wall  -g -I. -O2 -idirafter /usr/src/linux-
> > -I//usr/include \ -I../config -I../../cman/lib -I../include/ -I../lib/
> > -c -o plock.o plock.c plock.c:37:34: linux/lock_dlm_plock.h: No such
> > file or directory
> >
> > just because plock.c needs a header file <linux/lock_dlm_plock.h>, this
> > could work:
> I believe that the correct solution is to install the necessary kernel
> headers into /usr/include/linux/ prior to building cluster.  This
> usually means doing something like this:
>   cd /usr/src/linux
>   make headers_install
>   cp usr/include/linux/dlm* /usr/include/linux/
>   cp usr/include/linux/gfs* /usr/include/linux/
>   cp usr/include/linux/lock_dlm_plock.h /usr/include/linux/
>   cp usr/include/linux/lm_interface.h /usr/include/linux/
>   (that's all I can think of at the moment)
the raw kernel headers by make headers_install wourld generate siding
effect to other compiling processes, we should use linux headers under
/usr/include from Linux-Libc-Headers Project instead:

However: the current style doesn't work:
	-idirafter /usr/src/linux-
and it does work if changed to this:
	-idirafter /usr/src/linux-

So, if you use the raw kernel headers from the running kernel, you
don't need -idirafter parameter; or if you need it, the current is

> Dave

Denis Cheng
Linux Application Developer

"One of my most productive days was throwing away 1000 lines of code."
 - Ken Thompson.

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