linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Herrmann <dh.herrmann@gmail.com>
To: Jim Davis <jim.epost@gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next <linux-next@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Daniel Mack <daniel@zonque.org>,
	David Herrmann <dh.herrmann@googlemail.com>,
	Djalal Harouni <tixxdz@opendz.org>
Subject: Re: randconfig build error with next-20150316, in samples/kdbus/kdbus-workers
Date: Mon, 16 Mar 2015 17:31:40 +0100	[thread overview]
Message-ID: <CANq1E4Rc+Bp0mb=VxiV7Qgb1Wbz=TUExU4NwUcCsu9_DnC9pRw@mail.gmail.com> (raw)
In-Reply-To: <CA+r1ZhgsXRTBzHicQ3H_DUGt7dioZa+GjpWepHvemGR=UzJymg@mail.gmail.com>

Hi

On Mon, Mar 16, 2015 at 5:22 PM, Jim Davis <jim.epost@gmail.com> wrote:
> Building with the attached random configuration file,
>
> In file included from ./include/uapi/linux/kdbus.h:12:0,
>                  from samples/kdbus/kdbus-api.h:5,
>                  from samples/kdbus/kdbus-workers.c:79:
> ./include/uapi/linux/types.h:9:2: warning: #warning "Attempt to use
> kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders" [-Wcpp]
>  #warning "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
>   ^
> In file included from ./include/uapi/linux/posix_types.h:4:0,
>                  from ./include/uapi/linux/types.h:13,
>                  from ./include/uapi/linux/kdbus.h:12,
>                  from samples/kdbus/kdbus-api.h:5,
>                  from samples/kdbus/kdbus-workers.c:79:
> ./include/uapi/linux/stddef.h:1:28: fatal error: linux/compiler.h: No
> such file or directory
>  #include <linux/compiler.h>
>                             ^
> compilation terminated.
> scripts/Makefile.host:91: recipe for target 'samples/kdbus/kdbus-workers' failed
> make[2]: *** [samples/kdbus/kdbus-workers] Error 1

If you build the samples in ./samples/, you need up-to-date kernel
headers. The kdbus samples rely on linux/kdbus.h to be available.

A simple "make headers_install" will copy the headers to the local
directory ./usr/ in your kernel tree. This is the preferred location
over /usr/include by all tools in the kernel tree. That is, run "make
headers_install" once and your local tree will build fine. Once your
kernel-headers in /usr/include are up-to-date, it will work just
out-of-the-box again.

In other words, if CONFIG_SAMPLES is enabled, you need the sanitized
kernel headers in your include path.

Thanks
David

  reply	other threads:[~2015-03-16 16:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 16:22 randconfig build error with next-20150316, in samples/kdbus/kdbus-workers Jim Davis
2015-03-16 16:31 ` David Herrmann [this message]
2015-03-16 21:12   ` Michael Ellerman
2015-03-16 22:27     ` David Herrmann
2015-03-16 22:51       ` Michael Ellerman
2015-03-16 23:00         ` David Herrmann
2015-03-17  2:09           ` Michael Ellerman
2015-03-16 22:28     ` Stephen Rothwell

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='CANq1E4Rc+Bp0mb=VxiV7Qgb1Wbz=TUExU4NwUcCsu9_DnC9pRw@mail.gmail.com' \
    --to=dh.herrmann@gmail.com \
    --cc=daniel@zonque.org \
    --cc=dh.herrmann@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jim.epost@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tixxdz@opendz.org \
    /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).