From: Jiri Slaby <jslaby@suse.cz>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
"Eric W. Biederman" <ebiederm@xmission.com>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Tom Gundersen <teg@jklm.no>, Jiri Kosina <jkosina@suse.cz>,
Andy Lutomirski <luto@amacapital.net>,
Linux API <linux-api@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Daniel Mack <daniel@zonque.org>,
Djalal Harouni <tixxdz@opendz.org>, Michal Marek <mmarek@suse.cz>,
linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 13/14] kdbus: add walk-through user space example
Date: Tue, 24 Mar 2015 18:37:26 +0100 [thread overview]
Message-ID: <5511A0D6.5030606@suse.cz> (raw)
In-Reply-To: <CANq1E4QmOg0Xjx9d=fDQmuaAO1aBwQAbdwz_7ucyo6LVvFLzUA@mail.gmail.com>
Ccing kbuild fellows (see the very bottom).
On 03/24/2015, 06:15 PM, David Herrmann wrote:
> Hi
>
> On Tue, Mar 24, 2015 at 5:46 PM, Jiri Slaby <jslaby@suse.cz> wrote:
>> On 03/09/2015, 02:09 PM, Greg Kroah-Hartman wrote:
>>> --- /dev/null
>>> +++ b/samples/kdbus/Makefile
>>> @@ -0,0 +1,10 @@
>>> +# kbuild trick to avoid linker error. Can be omitted if a module is built.
>>> +obj- := dummy.o
>>> +
>>> +hostprogs-y += kdbus-workers
>>> +
>>> +always := $(hostprogs-y)
>>
>> Errr, no. Not only it causes build failures (even with KDBUS=n), it
>> definitely should not be built for everyone.
>
> It's only built if CONFIG_SAMPLES is set, right?
Yes, but I build other samples selected with separate CONFIG_ options
like CONFIG_SAMPLE_LIVEPATCH. So this guy should have its own CONFIG_
option too, because I (and likely others) don't want to build it. All of
the samples should be protected at least by their respective kernel
CONFIG_ option IMO.
> What build-failures does it cause? linux/kdbus.h is not optional based
> on CONFIG_KDBUS, so the samples should build just fine. Can you tell
> me what kind of errors you get? The kbuild-robots didn't report
> anything so far.
The output is this:
In file included from samples/kdbus/kdbus-workers.c:79:0:
/home/latest/linux/samples/kdbus/kdbus-api.h:5:25: fatal error:
linux/kdbus.h: No such file or directory
#include <linux/kdbus.h>
^
compilation terminated.
I now know that I have to install_headers *if* I want to build the
sample. But I don't want to build it in the first place. (So the config
option above should be all we need.)
>> And why is it a host prog? It's a sample prog for the kernel I am
>> building, i.e. for the destination arch, like all the other samples.
>
> It's modeled after the other user-space examples in ./samples/, which
> all use hostprogs (see samples/{bpf,hidraw,seccomp,uhid}/Makefile). I
> have no idea how to build programs that run on the target
> architecture. Documentation/kbuild/makefiles.txt doesn't list it,
> which is, I guess, the reason why everyone used hostprogs so far. And
> given that autotools calls the target architecture "--host", I
> actually thought this is what hostprogs does.. apparently that's not
> the case, sorry.
Oh, it's cut&paste, I see. This does not look correct though. The hack
inclusive. Host progs are intended to be run on the host where the
kernel is built. During the compilation or such (like x/menuconfig).
Quite misleading naming if you are used to the autotools one.
thanks,
--
js
suse labs
next prev parent reply other threads:[~2015-03-24 17:37 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 13:09 [PATCH v4 00/14] Add kdbus implementation Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 02/14] kdbus: add uapi header file Greg Kroah-Hartman
[not found] ` <1425906560-13798-1-git-send-email-gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
2015-03-09 13:09 ` [PATCH 01/14] kdbus: add documentation Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 03/14] kdbus: add driver skeleton, ioctl entry points and utility functions Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 04/14] kdbus: add connection pool implementation Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 10/14] kdbus: add name registry implementation Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 12/14] kdbus: add Makefile, Kconfig and MAINTAINERS entry Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-24 15:15 ` Jiri Slaby
2015-03-24 18:51 ` [PATCH] kdbus: Fix CONFIG_KDBUS help text Daniel Mack
2015-03-25 1:05 ` David Herrmann
2015-03-25 9:51 ` Greg KH
2015-03-09 13:09 ` [PATCH 13/14] kdbus: add walk-through user space example Greg Kroah-Hartman
2015-03-09 13:09 ` Greg Kroah-Hartman
2015-03-12 14:52 ` Sasha Levin
2015-03-12 16:27 ` [PATCH] samples/kdbus: add -lrt David Herrmann
2015-03-12 21:40 ` [PATCH] kdbus: " Greg Kroah-Hartman
[not found] ` <5501A848.5080402-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2015-03-12 16:34 ` [PATCH 13/14] kdbus: add walk-through user space example David Herrmann
2015-03-12 16:34 ` David Herrmann
[not found] ` <1425906560-13798-14-git-send-email-gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
2015-03-24 16:46 ` Jiri Slaby
2015-03-24 16:46 ` Jiri Slaby
[not found] ` <551194C8.4070707-AlSwsSmVLrQ@public.gmane.org>
2015-03-24 17:15 ` David Herrmann
2015-03-24 17:15 ` David Herrmann
2015-03-24 17:37 ` Jiri Slaby [this message]
2015-03-24 18:22 ` Michal Marek
2015-03-24 18:51 ` Daniel Mack
2015-03-31 13:11 ` [PATCH] samples: kdbus: build kdbus-workers conditionally Daniel Mack
2015-04-01 12:47 ` Greg KH
2015-04-01 21:41 ` Andrew Morton
2015-04-03 11:02 ` Daniel Mack
2015-03-09 13:09 ` [PATCH 05/14] kdbus: add connection, queue handling and message validation code Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 06/14] kdbus: add node and filesystem implementation Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 07/14] kdbus: add code to gather metadata Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 08/14] kdbus: add code for notifications and matches Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 09/14] kdbus: add code for buses, domains and endpoints Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 11/14] kdbus: add policy database implementation Greg Kroah-Hartman
2015-03-09 13:09 ` [PATCH 14/14] kdbus: add selftests Greg Kroah-Hartman
2015-03-15 5:13 ` [PATCH] kdbus: fix minor typo in the walk-through example Nicolas Iooss
2015-03-15 9:32 ` Greg KH
2015-03-17 19:24 ` [PATCH v4 00/14] Add kdbus implementation Andy Lutomirski
[not found] ` <CALCETrUjqTH14fZCeqU_OBoKX_6x4B=712WTeSqSAztpgXGiDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-18 13:54 ` David Herrmann
2015-03-18 13:54 ` David Herrmann
[not found] ` <CANq1E4Tf_6Cn+sxY=BPEbRpEr5WY+-rRX5gipz-_=4PNLa9bnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-18 18:24 ` Andy Lutomirski
2015-03-18 18:24 ` Andy Lutomirski
[not found] ` <CALCETrVWbz7YudNQXQD_2PjC1HR0P0cB_1ea8NiYoQPDfQxERg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-19 11:26 ` David Herrmann
2015-03-19 11:26 ` David Herrmann
[not found] ` <CANq1E4RA1ok=3Z5W2LkzqaUOKtbMVX_Joxe7_LRbLnQgfRUEYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-19 15:48 ` Andy Lutomirski
2015-03-19 15:48 ` Andy Lutomirski
2015-03-23 15:28 ` David Herrmann
[not found] ` <CANq1E4TtXq02Ug22fsTr8j0X6+vJKvyryALiTEMbT4SMQB1j3g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-23 23:24 ` Andy Lutomirski
2015-03-23 23:24 ` Andy Lutomirski
[not found] ` <CALCETrXqYBeZuOWhm9mz_nt+aWPXHFwkQPEAfwBXzDxnAP7f+g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-24 0:20 ` Eric W. Biederman
2015-03-24 0:20 ` Eric W. Biederman
2015-03-25 17:29 ` David Herrmann
2015-03-25 17:29 ` David Herrmann
[not found] ` <CANq1E4QiErHp8Q6bzFLkK9=7eBZC8dvh+Xnrh9_D5DAAogyaZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-25 18:12 ` Andy Lutomirski
2015-03-25 18:12 ` Andy Lutomirski
[not found] ` <CALCETrUuWhtJ9w9vyCGgaJDMGithJad4A4wf-BuxWLb_af5eDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-30 16:56 ` David Herrmann
2015-03-30 16:56 ` David Herrmann
[not found] ` <CANq1E4TTt3qanQse30KOZsuo2tfNoj7YSueh3AZ7bY1nQQeZNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 13:58 ` Andy Lutomirski
2015-03-31 13:58 ` Andy Lutomirski
[not found] ` <CALCETrV-cHYzcWu3t6tJ1eP0UZHTqoGH0KTYHTpJNit9-59TAA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 15:10 ` Tom Gundersen
2015-03-31 15:10 ` Tom Gundersen
[not found] ` <CAG-2HqVwfH5fK0YV1+k3T4bFqd5v3Yd-hpL-bTSBK23FFY-zMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-31 18:29 ` Andy Lutomirski
2015-03-31 18:29 ` Andy Lutomirski
[not found] ` <CALCETrX3vDZsymwC=LK=oK0=QLZqyB2Nv4N8jcjsx2yp1rjBvg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-03 11:51 ` David Herrmann
2015-04-03 11:51 ` David Herrmann
[not found] ` <CANq1E4QSja-KhVL2p-d406uLJT600zMpK2UAcwsb0LkMwa8F7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-05 12:09 ` Eric W. Biederman
2015-04-05 12:09 ` Eric W. Biederman
[not found] ` <FFF43E89-B796-4BDE-893A-5CC2AE77AED7-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2015-04-05 13:46 ` Greg Kroah-Hartman
2015-04-05 13:46 ` Greg Kroah-Hartman
2015-04-08 22:38 ` Andy Lutomirski
2015-04-08 22:38 ` Andy Lutomirski
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=5511A0D6.5030606@suse.cz \
--to=jslaby@suse.cz \
--cc=arnd@arndb.de \
--cc=daniel@zonque.org \
--cc=dh.herrmann@gmail.com \
--cc=ebiederm@xmission.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jkosina@suse.cz \
--cc=linux-api@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mmarek@suse.cz \
--cc=teg@jklm.no \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.