From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Subject: Re: randconfig build error with next-20150316, in samples/kdbus/kdbus-workers Date: Tue, 17 Mar 2015 13:09:01 +1100 Message-ID: <1426558141.31646.5.camel@ellerman.id.au> References: <1426540369.20069.1.camel@ellerman.id.au> <1426546287.31646.1.camel@ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from ozlabs.org ([103.22.144.67]:42665 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbbCQCJD (ORCPT ); Mon, 16 Mar 2015 22:09:03 -0400 In-Reply-To: Sender: linux-next-owner@vger.kernel.org List-ID: To: David Herrmann Cc: Jim Davis , Stephen Rothwell , linux-next , linux-kernel , Greg Kroah-Hartman , Daniel Mack , David Herrmann , Djalal Harouni On Tue, 2015-03-17 at 00:00 +0100, David Herrmann wrote: > Hi > > On Mon, Mar 16, 2015 at 11:51 PM, Michael Ellerman wrote: > > On Mon, 2015-03-16 at 23:27 +0100, David Herrmann wrote: > >> The uapi-include only causes the warning, not the build failure. > > > > I don't know how you came to that conclusion? > > > > It fails looking for linux/compiler.h, which is only included from the kernel > > headers, never from the exported headers. > > We only include linux/kdbus.h. On sanitized headers, this will include > linux/types.h -> linux/posix_types.h -> linux/stddef.h. > If you use the uapi headers, then stddef.h is not sanitized and will > still include linux/compiler.h (which is removed on sanitized > headers). Hence, this error only occurs if you include > uapi/linux/kdbus.h. With sanitized headers in ./usr/, the compiler > will prefer ./usr/linux/kdbus.h and ./usr/linux/stddef.h, thus never > including any linux/compiler.h. Right. But if the uapi include isn't there, you don't get this build failure. This build failure is caused by the uapi include. > If you drop -I./include/uapi/, you will get "linux/kdbus.h not found". Yep, which is exactly correct (unless it's provided by your distro headers). > The error will be different, but it will not fix anything. However, if > you run "make headers_install", everything will compile just fine even > with -I./include/uapi/. Well probably. But I could probably construct a scenario where something gets pulled in from uapi, and then you've got a mixture of user & kernel headers again. At the end of the day there is no good reason to use include/uapi, I think we agree on that :) cheers