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

Re: [Multiple reverts] [RFC PATCH] build: include/compat: figure out which other compat headers are needed


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Jan 2023 10:14:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NrXq9sANmJGnfgim5bzEJCucEceEnyBbmFCH112mVlw=; b=KAgJ7K5nkN+HnnNbITGHrr+uR+Y+mbyVrnNGi/C2/B1OD/gda7th4c5YMDLDB6WKVkaNoEJNHWPrbiADv3Ord034MS8+3IHvSUctfAkOLsmKi4pZt8m6fKZT5H6ReRme5TjdW3fnRXw8hB42xVeCk+7a2aTzotyqHooccGNZhKqY4isxAhaCrnwyC0KCeRUT6dYR0m2c47AtZ11RnbR1gaXQ/TXmgDdhDOd1wKY1lLzsLvo1uP2f5pjfeB1p1DCUPTcTquGfqXnWW8d7s1NtXkbrsmCnXpL8BPsS+NUYVKWQJz47ODrsbp7RloK1l7oE2GKqI3RE52amhdKVHpCUXQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XRsLghl/IFzYgH2nEzacVx6KLftGuSR1OxRR7td4dwmZf6aPqiMHn6iGcC9d/ls6yqjCzt8jy/K9RUqeClUS8CgtfLDVq6e1DHDbiJ8vmbbqbLxKD9ASDnMVNpe9EI8vrQFzZjMJ5qHj6iTFNrnW150/UzHT+tlJM6lsdE0XT1I1A9DRqn4PTBn13RP9OVQlpE4s0l5Aw9UXbTKw8o+4uZyVHCzx24MLmxK+L7xxA1PnJonsIt0hI4nq3ENSKNig4DyNJw7WmRbfKnlohDtaqQV5BTTVeU2XEl3dEyo3ntqls1CCgsG+f6lMuU9tpJJs0WzIqJ1NV6RDiotseuBDzg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 09:15:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.01.2023 08:46, Jan Beulich wrote:
> On 11.01.2023 23:29, Andrew Cooper wrote:
>> For posterity,
>> https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/3585379553 is
>> the issue in question.
>>
>> In file included from arch/x86/hvm/hvm.c:82:
>> ./include/compat/hvm/hvm_op.h:6:10: fatal error: ../trace.h: No such
>> file or directory
>>     6 | #include "../trace.h"
>>       |          ^~~~~~~~~~~~
>> compilation terminated.
>> make[4]: *** [Rules.mk:246: arch/x86/hvm/hvm.o] Error 1
>> make[3]: *** [Rules.mk:320: arch/x86/hvm] Error 2
>> make[3]: *** Waiting for unfinished jobs....
>>
>>
>> All public headers use "../" relative includes for traversing the
>> public/ hierarchy.  This cannot feasibly change given our "copy this
>> into your project" stance, but it means the compat headers have the same
>> structure under compat/.
>>
>> This include is supposed to be including compat/trace.h but it was
>> actually picking up x86's asm/trace.h, hence the build failure now that
>> I've deleted the file.
>>
>> This demonstrates that trying to be clever with -iquote is a mistake. 
>> Nothing good can possibly come of having the <> and "" include paths
>> being different.  Therefore we must revert all uses of -iquote.
> 
> I'm afraid I can't see the connection between use of -iquote and the bug
> here.

In fact I think the issue was caused by

CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-generic
CFLAGS += -I$(srctree)/arch/x86/include/asm/mach-default

which allowed the compiler when seeing "../trace.h" to pick up
arch/x86/include/asm/trace.h. No -iquote in sight here; all that
happens is that #include "..." fall back to using -I specified
paths when the file could not be found by using ""-only paths.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.