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

Re: Nullifying Recently Introduced Xen Headers Check



On Thursday, February 1st, 2024 at 9:18 AM, David Woodhouse 
<dwmw2@xxxxxxxxxxxxx> wrote:

> (Thanks Andy for the explicit cc)
> 
> On Thu, 2024-02-01 at 00:05 +0000, John L. Poole wrote:
> 
> > cause Gentoo's build to error out. See line 24790:
> > 
> > 5 | #error In Xen native files, include xen_native.h before other Xen 
> > headers
> > 
> > at
> > https://salemdata.us/xen/xen_tools_20240128_Sun_174740.script.html.
> > 
> > What I have done is create a patch for a draft Gentoo ebuild which
> > nullifies lines 4-6 by wrapping them in a comment:
> 
> 
> That isn't what the #error told you to do, though.
> 
> 24788 In file included from ../qemu-xen/hw/xen/xen-operations.c:16:
> 24789 
> /var/tmp/portage/app-emulation/xen-tools-4.18.0/work/xen-4.18.0/tools/qemu-xen/include/hw/xen/xen_native.h:5:2:
>  error: #error In Xen native files, include xen_native.h before other Xen 
> headers
> 24790 5 | #error In Xen native files, include xen_native.h before other Xen 
> headers
> 24791 | ^~~~~
> 
> So it's hw/xen/xen-operations.h which is failing. As far as I can tell
> (visually and empirically because it does actually build elsewhere), it
> is doing what the #error said — it is including xen_native.h before
> any other Xen headers.
> 
> The first four non-comment lines of xen-operations.c should look
> something like this...
> 
> #include "qemu/osdep.h"
> #include "qemu/uuid.h"
> #include "qapi/error.h"
> 
> #include "hw/xen/xen_native.h"
> 
> So... did you patch it so it doesn't start like that any more? Or does
> one of those first three files (perhaps qemu/osdep.h?) end up bringing
> in the Xen interface headers in a way that I didn't anticipate and
> which doesn't seem to happen elsewhere?
> 
> I didn't cite the full gcc command line from line 24787 of your log
> because it's huge. Can you run a variant of that command to just give
> me the preprocessed output (-E -dD -o xen-operations.i).

Hi David,

To answer your questions: the patch consists only of this
modification of 3 lines in xen_native.h:

   https://921932.bugs.gentoo.org/attachment.cgi?id=883883

Otherwise, the 4.18 code tree is as released.

I'm without the know-how to run a variant of the emerge command
as you have requested, alas.  I just simply removed 3 lines that
were introduced into the 4.18 tree to achieve a successful build.
I posted to this list to learn what the negative impacts might be. 

While the Xen Project "make" works, the Gentoo emerge
of app-emulation/xen-tools does not unless the three lines are
removed to simulate prior 4.17.3 and earlier code.  

I suspect the Gentoo approach 
of building tools first contributes to the problem.

Thank you,

John



 


Rackspace

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