From: 程任全 <chengrq@uit.com.cn>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] for a header-file-cannot-found building error
Date: Thu, 16 Aug 2007 09:45:40 +0800 [thread overview]
Message-ID: <91b13c310708151845y6e4d9849l1ce4127ed5bd4446@mail.gmail.com> (raw)
In-Reply-To: <20070815181040.GA4031@redhat.com>
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-2.6.21.7/include/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:
http://linuxfromscratch.org/pipermail/faq/2004-July/000159.html
However: the current style doesn't work:
-idirafter /usr/src/linux-2.6.21.7/include/linux
and it does work if changed to this:
-idirafter /usr/src/linux-2.6.21.7/include
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
wrong.
>
> Dave
>
>
--
Denis Cheng
Linux Application Developer
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
next prev parent reply other threads:[~2007-08-16 1:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-15 3:27 [Cluster-devel] [PATCH] for a header-file-cannot-found building error Denis Cheng
2007-08-15 18:10 ` David Teigland
2007-08-16 1:45 ` 程任全 [this message]
2007-08-19 5:32 ` Fabio Massimo Di Nitto
2007-08-20 14:01 ` David Teigland
2007-08-21 4:48 ` Fabio Massimo Di Nitto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91b13c310708151845y6e4d9849l1ce4127ed5bd4446@mail.gmail.com \
--to=chengrq@uit.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).