Skip to contentSkip to conversation

xen/build: Fix MAP rule when called in isolation

PATCH In review Andrew Cooper 2 participants 4 messages Apr 21, 2022 – Apr 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/build: Fix MAP rule when called in isolation

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")

---
CC: Jan Beulich <[email protected]>
CC: Anthony PERARD <[email protected]>

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(-)
xen/Makefile +1 -1
index 3a4e3bdd0f95..ec34524ed21d 100644
@@ -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
Signature · 1 line
2.11.0
#1 lore raw
Quoted 2 lines · Andrew Cooper

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.

Quoted 7 lines

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, ...

Quoted 9 lines
Fixes e1e72198213b ("xen/build: Fix dependency for the MAP rule")

---
CC: Jan Beulich <[email protected]>
CC: Anthony PERARD <[email protected]>

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

#2 lore raw
Quoted 7 lines · Jan Beulich
Quoted 2 lines · Andrew Cooper

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.

Quoted 17 lines
Quoted 7 lines

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, ...

Quoted 6 lines
Fixes e1e72198213b ("xen/build: Fix dependency for the MAP rule")

---
CC: Jan Beulich <[email protected]>
CC: Anthony PERARD <[email protected]>

Quoted 4 lines
Quoted 3 lines

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

Acked-by
#3 lore raw
Quoted 9 lines · Andrew Cooper
Quoted 7 lines · Jan Beulich
Quoted 2 lines · Andrew Cooper

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.

Quoted 7 lines

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.

Quoted 3 lines

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.

Quoted 17 lines
Quoted 17 lines
Quoted 7 lines

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, ...

Quoted 6 lines
Fixes e1e72198213b ("xen/build: Fix dependency for the MAP rule")

---
CC: Jan Beulich <[email protected]>
CC: Anthony PERARD <[email protected]>

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

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

Jan