linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fix arm64 libjvmti build by generating unistd_64.h
@ 2025-09-22  5:37 Vincent Minet
  2025-10-06 20:17 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Minet @ 2025-09-22  5:37 UTC (permalink / raw)
  To: linux-perf-users; +Cc: Vincent Minet

Since commit 22f72088ffe6 ("tools headers: Update the syscall table with
the kernel sources") the arm64 syscall header is generated at build
time. Later, commit bfb713ea53c7 ("perf tools: Fix arm64 build by
generating unistd_64.h") added a dependency to libperf to guarantee that
this header was created before building libperf or perf itself.

However, libjvmti also requires this header but does not depend on
libperf, leading to build failures such as:

  In file included from /usr/include/sys/syscall.h:24,
                   from /usr/include/syscall.h:1,
                   from jvmti/jvmti_agent.c:36:
  tools/arch/arm64/include/uapi/asm/unistd.h:2:10: fatal error: asm/unistd_64.h: No such file or directory
      2 | #include <asm/unistd_64.h>

Fix this by ensuring that libperf is built before libjvmti, so that
unistd_64.h is always available.

Fixes: 22f72088ffe6 ("tools headers: Update the syscall table with the kernel sources")
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index e2150acc2c13..f561025d4085 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -941,7 +941,7 @@ $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
 ifndef NO_JVMTI
 LIBJVMTI_IN := $(OUTPUT)jvmti/jvmti-in.o
 
-$(LIBJVMTI_IN): FORCE
+$(LIBJVMTI_IN): prepare FORCE
 	$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=jvmti obj=jvmti
 
 $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
-- 
2.51.0


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

* Re: [PATCH] perf tools: Fix arm64 libjvmti build by generating unistd_64.h
  2025-09-22  5:37 [PATCH] perf tools: Fix arm64 libjvmti build by generating unistd_64.h Vincent Minet
@ 2025-10-06 20:17 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-10-06 20:17 UTC (permalink / raw)
  To: Vincent Minet; +Cc: linux-perf-users

On Mon, Sep 22, 2025 at 07:37:02AM +0200, Vincent Minet wrote:
> Since commit 22f72088ffe6 ("tools headers: Update the syscall table with
> the kernel sources") the arm64 syscall header is generated at build
> time. Later, commit bfb713ea53c7 ("perf tools: Fix arm64 build by
> generating unistd_64.h") added a dependency to libperf to guarantee that
> this header was created before building libperf or perf itself.
> 
> However, libjvmti also requires this header but does not depend on
> libperf, leading to build failures such as:
> 
>   In file included from /usr/include/sys/syscall.h:24,
>                    from /usr/include/syscall.h:1,
>                    from jvmti/jvmti_agent.c:36:
>   tools/arch/arm64/include/uapi/asm/unistd.h:2:10: fatal error: asm/unistd_64.h: No such file or directory
>       2 | #include <asm/unistd_64.h>
> 
> Fix this by ensuring that libperf is built before libjvmti, so that
> unistd_64.h is always available.
> 
> Fixes: 22f72088ffe6 ("tools headers: Update the syscall table with the kernel sources")


Thanks, applied to perf-tools-next,

- Arnaldo

> ---
>  tools/perf/Makefile.perf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index e2150acc2c13..f561025d4085 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -941,7 +941,7 @@ $(OUTPUT)dlfilters/%.so: $(OUTPUT)dlfilters/%.o
>  ifndef NO_JVMTI
>  LIBJVMTI_IN := $(OUTPUT)jvmti/jvmti-in.o
>  
> -$(LIBJVMTI_IN): FORCE
> +$(LIBJVMTI_IN): prepare FORCE
>  	$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=jvmti obj=jvmti
>  
>  $(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
> -- 
> 2.51.0
> 

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

end of thread, other threads:[~2025-10-06 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22  5:37 [PATCH] perf tools: Fix arm64 libjvmti build by generating unistd_64.h Vincent Minet
2025-10-06 20:17 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).