All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/build: Fix MAP rule when called in isolation
@ 2022-04-21 16:00 Andrew Cooper
  2022-04-21 16:09 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2022-04-21 16:00 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Jan Beulich, Anthony PERARD

Now that `make MAP` might rebuild $(TARGET), it needs removing from
no-dot-config-targets.

Otherwise the build eventually fails with:

    CPP     arch/x86/asm-macros.i
  arch/x86/asm-macros.c:1:10: fatal error: asm/asm-defns.h: No such file or
  directory
      1 | #include <asm/asm-defns.h>
        |          ^~~~~~~~~~~~~~~~~

Fixes: e1e72198213b ("xen/build: Fix dependency for the MAP rule")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Anthony PERARD <anthony.perard@citrix.com>

Backporting notes.  The original, e1e72198213b, wants backporting as far as we
can go.  This patch is only relevant from 6c122d3984a5e onwards, so 4.14,
which is why my main developing/testing on 4.13 didn't spot it.

no-dot-config-targets seems like a very easy way to create breakage...
---
 xen/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Makefile b/xen/Makefile
index 3a4e3bdd0f95..ec34524ed21d 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -215,7 +215,7 @@ export XEN_ROOT := $(abs_srctree)/..
 clean-targets := %clean
 no-dot-config-targets := $(clean-targets) \
                          uninstall debug cloc \
-                         cscope TAGS tags MAP gtags \
+                         cscope TAGS tags gtags \
                          xenversion
 
 config-build    := n
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/build: Fix MAP rule when called in isolation
  2022-04-21 16:00 [PATCH] xen/build: Fix MAP rule when called in isolation Andrew Cooper
@ 2022-04-21 16:09 ` Jan Beulich
  2022-04-21 16:42   ` Andrew Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2022-04-21 16:09 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Anthony PERARD, Xen-devel

On 21.04.2022 18:00, Andrew Cooper wrote:
> Now that `make MAP` might rebuild $(TARGET), it needs removing from
> no-dot-config-targets.

Which raises the question whether the MAP target originally was
meant to be used only on an already built tree, which would
explain the missing dependency that you added in the earlier
commit.

> Otherwise the build eventually fails with:
> 
>     CPP     arch/x86/asm-macros.i
>   arch/x86/asm-macros.c:1:10: fatal error: asm/asm-defns.h: No such file or
>   directory
>       1 | #include <asm/asm-defns.h>
>         |          ^~~~~~~~~~~~~~~~~

Why would this be? asm/ isn't a symlink anymore, so should always
exist. I would have expected an error about .config or
autoconf.h not existing, ...

> Fixes: e1e72198213b ("xen/build: Fix dependency for the MAP rule")
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Anthony PERARD <anthony.perard@citrix.com>
> 
> Backporting notes.  The original, e1e72198213b, wants backporting as far as we
> can go.  This patch is only relevant from 6c122d3984a5e onwards, so 4.14,
> which is why my main developing/testing on 4.13 didn't spot it.

... and the commit you reference seems to support that expectation.

Jan



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/build: Fix MAP rule when called in isolation
  2022-04-21 16:09 ` Jan Beulich
@ 2022-04-21 16:42   ` Andrew Cooper
  2022-04-22  7:04     ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2022-04-21 16:42 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Anthony Perard, Xen-devel

On 21/04/2022 17:09, Jan Beulich wrote:
> On 21.04.2022 18:00, Andrew Cooper wrote:
>> Now that `make MAP` might rebuild $(TARGET), it needs removing from
>> no-dot-config-targets.
> Which raises the question whether the MAP target originally was
> meant to be used only on an already built tree, which would
> explain the missing dependency that you added in the earlier
> commit.

I can't comment on the previous expectation, but the fact you couldn't
previously do `make -j4 build MAP` was simply broken.

There are also several other breakages in Xen's build system which it
turns out is forcing all downstreams to bodge around in ways that range
from gross to dangerous, and which need fixing for everyone's benefit. 
(Emails will be appearing for those shortly)

The current debug target (just runs objdump -d) is similar to MAP,
except I don't find it a credible target to use and was planning to
delete it.

>> Otherwise the build eventually fails with:
>>
>>     CPP     arch/x86/asm-macros.i
>>   arch/x86/asm-macros.c:1:10: fatal error: asm/asm-defns.h: No such file or
>>   directory
>>       1 | #include <asm/asm-defns.h>
>>         |          ^~~~~~~~~~~~~~~~~
> Why would this be? asm/ isn't a symlink anymore, so should always
> exist. I would have expected an error about .config or
> autoconf.h not existing, ...
>
>> Fixes: e1e72198213b ("xen/build: Fix dependency for the MAP rule")
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Anthony PERARD <anthony.perard@citrix.com>
>>
>> Backporting notes.  The original, e1e72198213b, wants backporting as far as we
>> can go.  This patch is only relevant from 6c122d3984a5e onwards, so 4.14,
>> which is why my main developing/testing on 4.13 didn't spot it.
> ... and the commit you reference seems to support that expectation.

I haven't spent very long investigating exactly how it breaks.  I don't
think it's important, because the purpose of no-dot-config-targets is to
skip large swathes of the logic.

~Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/build: Fix MAP rule when called in isolation
  2022-04-21 16:42   ` Andrew Cooper
@ 2022-04-22  7:04     ` Jan Beulich
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2022-04-22  7:04 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Anthony Perard, Xen-devel

On 21.04.2022 18:42, Andrew Cooper wrote:
> On 21/04/2022 17:09, Jan Beulich wrote:
>> On 21.04.2022 18:00, Andrew Cooper wrote:
>>> Now that `make MAP` might rebuild $(TARGET), it needs removing from
>>> no-dot-config-targets.
>> Which raises the question whether the MAP target originally was
>> meant to be used only on an already built tree, which would
>> explain the missing dependency that you added in the earlier
>> commit.
> 
> I can't comment on the previous expectation, but the fact you couldn't
> previously do `make -j4 build MAP` was simply broken.
> 
> There are also several other breakages in Xen's build system which it
> turns out is forcing all downstreams to bodge around in ways that range
> from gross to dangerous, and which need fixing for everyone's benefit. 
> (Emails will be appearing for those shortly)

Right - at least tests and cloc look to have a similar issue.

> The current debug target (just runs objdump -d) is similar to MAP,
> except I don't find it a credible target to use and was planning to
> delete it.

Well, yes. I wasn't even aware of this mis-named goal.

>>> Otherwise the build eventually fails with:
>>>
>>>     CPP     arch/x86/asm-macros.i
>>>   arch/x86/asm-macros.c:1:10: fatal error: asm/asm-defns.h: No such file or
>>>   directory
>>>       1 | #include <asm/asm-defns.h>
>>>         |          ^~~~~~~~~~~~~~~~~
>> Why would this be? asm/ isn't a symlink anymore, so should always
>> exist. I would have expected an error about .config or
>> autoconf.h not existing, ...
>>
>>> Fixes: e1e72198213b ("xen/build: Fix dependency for the MAP rule")
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>> ---
>>> CC: Jan Beulich <JBeulich@suse.com>
>>> CC: Anthony PERARD <anthony.perard@citrix.com>
>>>
>>> Backporting notes.  The original, e1e72198213b, wants backporting as far as we
>>> can go.  This patch is only relevant from 6c122d3984a5e onwards, so 4.14,
>>> which is why my main developing/testing on 4.13 didn't spot it.
>> ... and the commit you reference seems to support that expectation.
> 
> I haven't spent very long investigating exactly how it breaks.  I don't
> think it's important, because the purpose of no-dot-config-targets is to
> skip large swathes of the logic.

I find it generally helpful to understand breakage when it looks odd how
exactly things break, but anyway
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-22  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 16:00 [PATCH] xen/build: Fix MAP rule when called in isolation Andrew Cooper
2022-04-21 16:09 ` Jan Beulich
2022-04-21 16:42   ` Andrew Cooper
2022-04-22  7:04     ` Jan Beulich

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.