[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADHxFxQg2ZKwLEOa6wic_KP49PRBp=hF=cY16aVmR0O0pa8ZkA@mail.gmail.com>
Date: Tue, 14 Oct 2025 10:31:55 +0800
From: hupu <hupu.gm@...il.com>
To: Leo Yan <leo.yan@....com>
Cc: Ian Rogers <irogers@...gle.com>, namhyung@...nel.org, peterz@...radead.org,
mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org, adrian.hunter@...el.com,
nathan@...nel.org, nick.desaulniers+lkml@...il.com, morbo@...gle.com,
justinstitt@...gle.com, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org
Subject: Re: [RFC] perf build: Allow passing extra Clang flags via EXTRA_CLANG_FLAGS
Hi Leo,
Thank you for your reply.
On Tue, Oct 14, 2025 at 12:14 AM Leo Yan <leo.yan@....com> wrote:
>
> On Mon, Oct 13, 2025 at 08:46:01AM -0700, Ian Rogers wrote:
> > On Mon, Oct 13, 2025 at 1:08 AM hupu <hupu.gm@...il.com> wrote:
> > >
> > > Hi Maintainer,
> > >
> > > I encountered some issues while cross-compiling perf (ARCH=arm64),
> > > particularly when enabling the BPF option. During the build, Clang
> > > fails to compile BPF programs due to missing header files. The
> > > relevant error messages are as follows:
> >
> > Thanks for reporting this issue! There has been some recent work in
> > this area by Leo:
> > https://lore.kernel.org/lkml/20251006-perf_build_android_ndk-v3-0-4305590795b2@arm.com/
> > The patches are in Linux v6.18-rc1. Perhaps you could try repeating
> > your build with this tree and reporting issues?
>
> I am not 100% sure, could you execute install kernel headers and then
> build perf ?
>
> make headers_install
>
I am currently building perf for arm64 in an Ubuntu environment using
a cross toolchain, rather than compiling the entire perf directly with
Clang. Clang is only invoked during the build process when the BPF
option is enabled — as shown below where bpf is detected as on:
Auto-detecting system features:
... libdw: [ on ]
... glibc: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... numa_num_possible_cpus: [ on ]
... libpython: [ OFF ]
... libcapstone: [ on ]
... llvm-perf: [ OFF ]
... zlib: [ on ]
... lzma: [ on ]
... get_cpuid: [ OFF ]
... bpf: [ on ]
... libaio: [ on ]
... libzstd: [ on ]
I have already run the following command and successfully installed
the related headers, but the same error still occurs when building
perf. I am not sure if I also need to specify additional parameters
during the build process to ensure these headers can be found
correctly?
make ARCH=arm64 headers_install
Please let me know if you need any more details or testing.
Thanks,
hupu
Powered by blists - more mailing lists