* [PATCH 0/2] fix perf tool build error on MUSL libc
@ 2020-12-10 14:48 Chanho Park
2020-12-10 14:48 ` [PATCH 1/2] perf: fix " Chanho Park
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chanho Park @ 2020-12-10 14:48 UTC (permalink / raw)
To: linux-kernel
Cc: Chanho Park, Mathieu Poirier, Suzuki K Poulose, Mike Leach,
Leo Yan, John Garry, Will Deacon, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Jiri Olsa, Namhyung Kim,
Khem Raj
__always_inline can cause build error on musl libc because it's not
defined. We need to include <linux/stddef.h> before asm/byteorder.h.
tools/include/uapi/linux/perf_event.h is copied version from
include/uapi/linux/perf_event.h. To fix this, we need to apply this
change both header files.
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Khem Raj <raj.khem@gmail.com>
Chanho Park (2):
perf: fix build error on MUSL libc
perf: tool: fix build error on MUSL libc
include/uapi/linux/perf_event.h | 3 +++
tools/include/uapi/linux/perf_event.h | 3 +++
2 files changed, 6 insertions(+)
--
2.23.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] perf: fix build error on MUSL libc
2020-12-10 14:48 [PATCH 0/2] fix perf tool build error on MUSL libc Chanho Park
@ 2020-12-10 14:48 ` Chanho Park
2020-12-10 14:48 ` [PATCH 2/2] perf: tool: " Chanho Park
2020-12-11 3:45 ` [PATCH 0/2] fix perf tool " Namhyung Kim
2 siblings, 0 replies; 4+ messages in thread
From: Chanho Park @ 2020-12-10 14:48 UTC (permalink / raw)
To: linux-kernel
Cc: Chanho Park, Mathieu Poirier, Suzuki K Poulose, Mike Leach,
Leo Yan, John Garry, Will Deacon, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Jiri Olsa, Namhyung Kim,
Khem Raj
__always_inline can cause build error on musl libc. The fix patch has
submitted but not merged yet[1]. To build perf tool with musl libc,
<linux/stddef.h> inclusion is necessary and it should be included before
asm/byteorder.h.
from /usr/include/linux/byteorder/little_endian.h:13,
from /usr/include/asm/byteorder.h:23,
from tools/include/uapi/linux/perf_event.h:20,
from arch/arm64/util/../../arm/util/pmu.c:9:
/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
171 | static __always_inline __u16 __swab16p(const __u16 *p)
| ^~~~~~~~~~~~~~~
[1]: https://lkml.org/lkml/2018/9/13/78
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
include/uapi/linux/perf_event.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index bb7b271397a6..af5e80dc7d54 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -17,6 +17,9 @@
#include <linux/types.h>
#include <linux/ioctl.h>
+#if !defined(__GLIBC__)
+#include <linux/stddef.h>
+#endif
#include <asm/byteorder.h>
/*
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] perf: tool: fix build error on MUSL libc
2020-12-10 14:48 [PATCH 0/2] fix perf tool build error on MUSL libc Chanho Park
2020-12-10 14:48 ` [PATCH 1/2] perf: fix " Chanho Park
@ 2020-12-10 14:48 ` Chanho Park
2020-12-11 3:45 ` [PATCH 0/2] fix perf tool " Namhyung Kim
2 siblings, 0 replies; 4+ messages in thread
From: Chanho Park @ 2020-12-10 14:48 UTC (permalink / raw)
To: linux-kernel
Cc: Chanho Park, Mathieu Poirier, Suzuki K Poulose, Mike Leach,
Leo Yan, John Garry, Will Deacon, Peter Zijlstra, Ingo Molnar,
Arnaldo Carvalho de Melo, Mark Rutland, Jiri Olsa, Namhyung Kim,
Khem Raj
__always_inline can cause build error on musl libc. The fix patch has
submitted but not merged yet[1]. To build perf tool with musl libc,
<linux/stddef.h> inclusion is necessary and it should be included before
asm/byteorder.h.
from /usr/include/linux/byteorder/little_endian.h:13,
from /usr/include/asm/byteorder.h:23,
from tools/include/uapi/linux/perf_event.h:20,
from arch/arm64/util/../../arm/util/pmu.c:9:
/usr/include/linux/swab.h:171:8: error: unknown type name '__always_inline'
171 | static __always_inline __u16 __swab16p(const __u16 *p)
| ^~~~~~~~~~~~~~~
[1]: https://lkml.org/lkml/2018/9/13/78
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
---
tools/include/uapi/linux/perf_event.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
index bb7b271397a6..af5e80dc7d54 100644
--- a/tools/include/uapi/linux/perf_event.h
+++ b/tools/include/uapi/linux/perf_event.h
@@ -17,6 +17,9 @@
#include <linux/types.h>
#include <linux/ioctl.h>
+#if !defined(__GLIBC__)
+#include <linux/stddef.h>
+#endif
#include <asm/byteorder.h>
/*
--
2.23.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] fix perf tool build error on MUSL libc
2020-12-10 14:48 [PATCH 0/2] fix perf tool build error on MUSL libc Chanho Park
2020-12-10 14:48 ` [PATCH 1/2] perf: fix " Chanho Park
2020-12-10 14:48 ` [PATCH 2/2] perf: tool: " Chanho Park
@ 2020-12-11 3:45 ` Namhyung Kim
2 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2020-12-11 3:45 UTC (permalink / raw)
To: Chanho Park
Cc: linux-kernel, Chanho Park, Mathieu Poirier, Suzuki K Poulose,
Mike Leach, Leo Yan, John Garry, Will Deacon, Peter Zijlstra,
Ingo Molnar, Arnaldo Carvalho de Melo, Mark Rutland, Jiri Olsa,
Khem Raj, Philippe Ombredanne, Kate Stewart, Greg Kroah-Hartman,
Thomas Gleixner, Masahiro Yamada, Michal Marek, linux-kbuild
Adding people in the original patch + kbuild folks.
On Thu, Dec 10, 2020 at 11:48 PM Chanho Park <parkch98@gmail.com> wrote:
>
> __always_inline can cause build error on musl libc because it's not
> defined. We need to include <linux/stddef.h> before asm/byteorder.h.
> tools/include/uapi/linux/perf_event.h is copied version from
> include/uapi/linux/perf_event.h. To fix this, we need to apply this
> change both header files.
>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: Mike Leach <mike.leach@linaro.org>
> Cc: Leo Yan <leo.yan@linaro.org>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Will Deacon <will@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Khem Raj <raj.khem@gmail.com>
>
> Chanho Park (2):
> perf: fix build error on MUSL libc
> perf: tool: fix build error on MUSL libc
>
> include/uapi/linux/perf_event.h | 3 +++
> tools/include/uapi/linux/perf_event.h | 3 +++
> 2 files changed, 6 insertions(+)
>
> --
> 2.23.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-11 3:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 14:48 [PATCH 0/2] fix perf tool build error on MUSL libc Chanho Park
2020-12-10 14:48 ` [PATCH 1/2] perf: fix " Chanho Park
2020-12-10 14:48 ` [PATCH 2/2] perf: tool: " Chanho Park
2020-12-11 3:45 ` [PATCH 0/2] fix perf tool " Namhyung Kim
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).