2021-03-17 04:12:17

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the tip tree

Hi all,

After merging the tip tree, today's linux-next build (native perf)
failed like this:

In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
14 | #include <asm/inat.h> /*__ignore_sync_check__ */
| ^~~~~~~~~~~~

This is a powerpc build of perf. I can't see what caused this failure,
so I have used the version of the tip tree from next-20210316 for today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-03-17 10:58:20

by Borislav Petkov

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

+ Ian.

On Wed, Mar 17, 2021 at 03:08:58PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the tip tree, today's linux-next build (native perf)
> failed like this:
>
> In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
> util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
> 14 | #include <asm/inat.h> /*__ignore_sync_check__ */
> | ^~~~~~~~~~~~
>
> This is a powerpc build of perf. I can't see what caused this failure,
> so I have used the version of the tip tree from next-20210316 for today.

Yah, this has come up in the past during review but the wrong version
somehow snuck in, sorry. ;-\

Can you guys verify this fixes the build issue? I don't have a ppc build
setup.

Thx.

---
From 50d91054fc421e2a90923706d5ca79e941e28300 Mon Sep 17 00:00:00 2001
From: Borislav Petkov <[email protected]>
Date: Wed, 17 Mar 2021 11:33:04 +0100
Subject: [PATCH] tools/insn: Restore the relative include paths for cross
building

Building perf on ppc causes:

In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
14 | #include <asm/inat.h> /*__ignore_sync_check__ */
| ^~~~~~~~~~~~

Restore the relative include paths so that the compiler can find the
headers.

Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API")
Reported-by: Ian Rogers <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
NOT-Signed-off-by: Borislav Petkov <[email protected]>
---
tools/arch/x86/lib/insn.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
index cd4dedde3265..999fbd4c9bea 100644
--- a/tools/arch/x86/lib/insn.c
+++ b/tools/arch/x86/lib/insn.c
@@ -11,8 +11,8 @@
#else
#include <string.h>
#endif
-#include <asm/inat.h> /*__ignore_sync_check__ */
-#include <asm/insn.h> /* __ignore_sync_check__ */
+#include "../include/asm/inat.h" /* __ignore_sync_check__ */
+#include "../include/asm/insn.h" /* __ignore_sync_check__ */

#include <linux/errno.h>
#include <linux/kconfig.h>
--
2.29.2

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

2021-03-17 17:22:14

by Ian Rogers

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Wed, Mar 17, 2021 at 3:54 AM Borislav Petkov <[email protected]> wrote:
>
> + Ian.
>
> On Wed, Mar 17, 2021 at 03:08:58PM +1100, Stephen Rothwell wrote:
> > Hi all,
> >
> > After merging the tip tree, today's linux-next build (native perf)
> > failed like this:
> >
> > In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
> > util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
> > 14 | #include <asm/inat.h> /*__ignore_sync_check__ */
> > | ^~~~~~~~~~~~
> >
> > This is a powerpc build of perf. I can't see what caused this failure,
> > so I have used the version of the tip tree from next-20210316 for today.
>
> Yah, this has come up in the past during review but the wrong version
> somehow snuck in, sorry. ;-\
>
> Can you guys verify this fixes the build issue? I don't have a ppc build
> setup.
>
> Thx.

The <asm/emulate_prefix.h> path also needs fixing. With the following
I was able to build for arm64 and powerpc.

Thanks,
Ian

diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
index cd4dedde3265..968360bf2150 100644
--- a/tools/arch/x86/lib/insn.c
+++ b/tools/arch/x86/lib/insn.c
@@ -11,13 +11,13 @@
#else
#include <string.h>
#endif
-#include <asm/inat.h> /*__ignore_sync_check__ */
-#include <asm/insn.h> /* __ignore_sync_check__ */
+#include "../include/asm/inat.h" /*__ignore_sync_check__ */
+#include "../include/asm/insn.h" /* __ignore_sync_check__ */

#include <linux/errno.h>
#include <linux/kconfig.h>

-#include <asm/emulate_prefix.h> /* __ignore_sync_check__ */
+#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */

#define leXX_to_cpu(t, r) \
({ \

> ---
> From 50d91054fc421e2a90923706d5ca79e941e28300 Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <[email protected]>
> Date: Wed, 17 Mar 2021 11:33:04 +0100
> Subject: [PATCH] tools/insn: Restore the relative include paths for cross
> building
>
> Building perf on ppc causes:
>
> In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
> util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
> 14 | #include <asm/inat.h> /*__ignore_sync_check__ */
> | ^~~~~~~~~~~~
>
> Restore the relative include paths so that the compiler can find the
> headers.
>
> Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API")
> Reported-by: Ian Rogers <[email protected]>
> Reported-by: Stephen Rothwell <[email protected]>
> NOT-Signed-off-by: Borislav Petkov <[email protected]>
> ---
> tools/arch/x86/lib/insn.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
> index cd4dedde3265..999fbd4c9bea 100644
> --- a/tools/arch/x86/lib/insn.c
> +++ b/tools/arch/x86/lib/insn.c
> @@ -11,8 +11,8 @@
> #else
> #include <string.h>
> #endif
> -#include <asm/inat.h> /*__ignore_sync_check__ */
> -#include <asm/insn.h> /* __ignore_sync_check__ */
> +#include "../include/asm/inat.h" /* __ignore_sync_check__ */
> +#include "../include/asm/insn.h" /* __ignore_sync_check__ */
>
> #include <linux/errno.h>
> #include <linux/kconfig.h>
> --
> 2.29.2
>
> --
> Regards/Gruss,
> Boris.
>
> SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

2021-03-17 19:20:49

by Borislav Petkov

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Thu, Mar 18, 2021 at 05:49:21AM +1100, Stephen Rothwell wrote:
> That fixes the powerpc build for me, thanks.

Thx, adding your Tested-by and pushing out.

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

2021-03-17 19:35:00

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: x86/core] tools/insn: Restore the relative include paths for cross building

The following commit has been merged into the x86/core branch of tip:

Commit-ID: 0705ef64d1ff52b817e278ca6e28095585ff31e1
Gitweb: https://git.kernel.org/tip/0705ef64d1ff52b817e278ca6e28095585ff31e1
Author: Borislav Petkov <[email protected]>
AuthorDate: Wed, 17 Mar 2021 11:33:04 +01:00
Committer: Borislav Petkov <[email protected]>
CommitterDate: Wed, 17 Mar 2021 20:17:05 +01:00

tools/insn: Restore the relative include paths for cross building

Building perf on ppc causes:

In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
14 | #include <asm/inat.h> /*__ignore_sync_check__ */
| ^~~~~~~~~~~~

Restore the relative include paths so that the compiler can find the
headers.

Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API")
Reported-by: Ian Rogers <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Tested-by: Ian Rogers <[email protected]>
Tested-by: Stephen Rothwell <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
---
tools/arch/x86/lib/insn.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
index cd4dedd..c41f958 100644
--- a/tools/arch/x86/lib/insn.c
+++ b/tools/arch/x86/lib/insn.c
@@ -11,13 +11,13 @@
#else
#include <string.h>
#endif
-#include <asm/inat.h> /*__ignore_sync_check__ */
-#include <asm/insn.h> /* __ignore_sync_check__ */
+#include "../include/asm/inat.h" /* __ignore_sync_check__ */
+#include "../include/asm/insn.h" /* __ignore_sync_check__ */

#include <linux/errno.h>
#include <linux/kconfig.h>

-#include <asm/emulate_prefix.h> /* __ignore_sync_check__ */
+#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */

#define leXX_to_cpu(t, r) \
({ \

2021-03-17 20:07:29

by Ingo Molnar

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree


* Borislav Petkov <[email protected]> wrote:

> On Thu, Mar 18, 2021 at 05:49:21AM +1100, Stephen Rothwell wrote:
> > That fixes the powerpc build for me, thanks.
>
> Thx, adding your Tested-by and pushing out.

I've pushed this out into tip:auto-latest as well, so that tomorrow's
-next should pick this up automatically. (Assuming everything else is
fine.)

Thanks,

Ingo

2021-03-17 21:41:01

by Borislav Petkov

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

On Wed, Mar 17, 2021 at 09:22:15AM -0700, Ian Rogers wrote:
> The <asm/emulate_prefix.h> path also needs fixing. With the following
> I was able to build for arm64 and powerpc.

Thanks, I've updated and added your Tested-by. I'll give sfr a chance to
test and queue it tomorrow.

---
From d242b2639a23ed03d9aed94cf05b99af5343d4e9 Mon Sep 17 00:00:00 2001
From: Borislav Petkov <[email protected]>
Date: Wed, 17 Mar 2021 11:33:04 +0100
Subject: [PATCH] tools/insn: Restore the relative include paths for cross building

Building perf on ppc causes:

In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
14 | #include <asm/inat.h> /*__ignore_sync_check__ */
| ^~~~~~~~~~~~

Restore the relative include paths so that the compiler can find the
headers.

Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API")
Reported-by: Ian Rogers <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Tested-by: Ian Rogers <[email protected]>
---
tools/arch/x86/lib/insn.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
index cd4dedde3265..c41f95815480 100644
--- a/tools/arch/x86/lib/insn.c
+++ b/tools/arch/x86/lib/insn.c
@@ -11,13 +11,13 @@
#else
#include <string.h>
#endif
-#include <asm/inat.h> /*__ignore_sync_check__ */
-#include <asm/insn.h> /* __ignore_sync_check__ */
+#include "../include/asm/inat.h" /* __ignore_sync_check__ */
+#include "../include/asm/insn.h" /* __ignore_sync_check__ */

#include <linux/errno.h>
#include <linux/kconfig.h>

-#include <asm/emulate_prefix.h> /* __ignore_sync_check__ */
+#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */

#define leXX_to_cpu(t, r) \
({ \
--
2.29.2

--
Regards/Gruss,
Boris.

SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

2021-03-17 21:43:09

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Borislav,

On Wed, 17 Mar 2021 19:02:36 +0100 Borislav Petkov <[email protected]> wrote:
>
> On Wed, Mar 17, 2021 at 09:22:15AM -0700, Ian Rogers wrote:
> > The <asm/emulate_prefix.h> path also needs fixing. With the following
> > I was able to build for arm64 and powerpc.
>
> Thanks, I've updated and added your Tested-by. I'll give sfr a chance to
> test and queue it tomorrow.
>
> ---
> From d242b2639a23ed03d9aed94cf05b99af5343d4e9 Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <[email protected]>
> Date: Wed, 17 Mar 2021 11:33:04 +0100
> Subject: [PATCH] tools/insn: Restore the relative include paths for cross building
>
> Building perf on ppc causes:
>
> In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15:
> util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory
> 14 | #include <asm/inat.h> /*__ignore_sync_check__ */
> | ^~~~~~~~~~~~
>
> Restore the relative include paths so that the compiler can find the
> headers.
>
> Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API")
> Reported-by: Ian Rogers <[email protected]>
> Reported-by: Stephen Rothwell <[email protected]>
> Signed-off-by: Borislav Petkov <[email protected]>
> Tested-by: Ian Rogers <[email protected]>
> ---
> tools/arch/x86/lib/insn.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/arch/x86/lib/insn.c b/tools/arch/x86/lib/insn.c
> index cd4dedde3265..c41f95815480 100644
> --- a/tools/arch/x86/lib/insn.c
> +++ b/tools/arch/x86/lib/insn.c
> @@ -11,13 +11,13 @@
> #else
> #include <string.h>
> #endif
> -#include <asm/inat.h> /*__ignore_sync_check__ */
> -#include <asm/insn.h> /* __ignore_sync_check__ */
> +#include "../include/asm/inat.h" /* __ignore_sync_check__ */
> +#include "../include/asm/insn.h" /* __ignore_sync_check__ */
>
> #include <linux/errno.h>
> #include <linux/kconfig.h>
>
> -#include <asm/emulate_prefix.h> /* __ignore_sync_check__ */
> +#include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */
>
> #define leXX_to_cpu(t, r) \
> ({ \
> --
> 2.29.2

That fixes the powerpc build for me, thanks.
--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2021-03-17 22:05:12

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the tip tree

Hi Ingo,

On Wed, 17 Mar 2021 21:04:08 +0100 Ingo Molnar <[email protected]> wrote:
>
> * Borislav Petkov <[email protected]> wrote:
>
> > On Thu, Mar 18, 2021 at 05:49:21AM +1100, Stephen Rothwell wrote:
> > > That fixes the powerpc build for me, thanks.
> >
> > Thx, adding your Tested-by and pushing out.
>
> I've pushed this out into tip:auto-latest as well, so that tomorrow's
> -next should pick this up automatically. (Assuming everything else is
> fine.)

Excellent, thanks.

--
Cheers,
Stephen Rothwell