diff mbox series

[scarthgap,v2] perf: add Kbuild file for unistd.h

Message ID 20251031173559.1916806-1-johannes.schneider@leica-geosystems.com
State New
Headers show
Series [scarthgap,v2] perf: add Kbuild file for unistd.h | expand

Commit Message

Johannes Schneider Oct. 31, 2025, 5:35 p.m. UTC
Building 'perf' with/against newer kernels (>=6.14) would fail because
of a missing 'Kbuild' in the folder created when manually installing
the 'unistd.h' header from libc.

Add a oneliner that creates the missing file, with the relevant
content taken from the kernels Kbuild file.

Tested with kernel version: 6.16.4

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
 meta/recipes-kernel/perf/perf.bb | 1 +
 1 file changed, 1 insertion(+)


base-commit: 649147913e89cd8f7390cb17cd0be94c9710ffa6

Comments

Bruce Ashfield Oct. 31, 2025, 5:45 p.m. UTC | #1
On Fri, Oct 31, 2025 at 1:36 PM Johannes Schneider <
johannes.schneider@leica-geosystems.com> wrote:

> Building 'perf' with/against newer kernels (>=6.14) would fail because
> of a missing 'Kbuild' in the folder created when manually installing
> the 'unistd.h' header from libc.
>
> Add a oneliner that creates the missing file, with the relevant
> content taken from the kernels Kbuild file.
>
> Tested with kernel version: 6.16.4
>

I wasn't clear.

You also need to test this with the older kernel versions and let us know
that it worked.

Not just "it should work", we can't let the infrastructure pick up any
failures, it needs to be tested before submission.

But thanks for not just saying you tested it (if you haven't). if you have
done those tests and I'm just misunderstanding, a quick v3 with
confirmation would be great.

Cheers,

Bruce



>
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com
> >
> ---
>  meta/recipes-kernel/perf/perf.bb | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
> perf.bb
> index 11fa917649..7db5fe6d1c 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -368,6 +368,7 @@ do_configure:prepend () {
>      # so we copy it from the sysroot unistd.h to the perf unistd.h
>      install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h
> ${S}/tools/include/uapi/asm-generic/unistd.h
>      install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h
> ${S}/include/uapi/asm-generic/unistd.h
> +    echo "mandatory-y += unistd.h" > ${S}/include/uapi/asm-generic/Kbuild
>
>      # the fetcher is inhibited by the 'inherit kernelsrc', so we do a
> quick check and
>      # copy for a helper script we need
>
> base-commit: 649147913e89cd8f7390cb17cd0be94c9710ffa6
> --
> 2.43.0
>
>
Bruce Ashfield Oct. 31, 2025, 5:47 p.m. UTC | #2
On Fri, Oct 31, 2025 at 1:45 PM Bruce Ashfield <bruce.ashfield@gmail.com>
wrote:

>
>
> On Fri, Oct 31, 2025 at 1:36 PM Johannes Schneider <
> johannes.schneider@leica-geosystems.com> wrote:
>
>> Building 'perf' with/against newer kernels (>=6.14) would fail because
>> of a missing 'Kbuild' in the folder created when manually installing
>> the 'unistd.h' header from libc.
>>
>> Add a oneliner that creates the missing file, with the relevant
>> content taken from the kernels Kbuild file.
>>
>> Tested with kernel version: 6.16.4
>>
>
> I wasn't clear.
>
> You also need to test this with the older kernel versions and let us know
> that it worked.
>
> Not just "it should work", we can't let the infrastructure pick up any
> failures, it needs to be tested before submission.
>
> But thanks for not just saying you tested it (if you haven't). if you have
> done those tests and I'm just misunderstanding, a quick v3 with
> confirmation would be great.
>

I hit send too soon.

The reason that we really need those tests is:  if you've noticed on master
we had significant reproducibility issues with perf, which you'd also have
when building a 6.16 perf on that old release.

So once we add the support for building it all, there will be expectations
that it passes testing on all versions.

Cheers,

Bruce



>
> Cheers,
>
> Bruce
>
>
>
>>
>> Signed-off-by: Johannes Schneider <
>> johannes.schneider@leica-geosystems.com>
>> ---
>>  meta/recipes-kernel/perf/perf.bb | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/
>> perf.bb
>> index 11fa917649..7db5fe6d1c 100644
>> --- a/meta/recipes-kernel/perf/perf.bb
>> +++ b/meta/recipes-kernel/perf/perf.bb
>> @@ -368,6 +368,7 @@ do_configure:prepend () {
>>      # so we copy it from the sysroot unistd.h to the perf unistd.h
>>      install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h
>> ${S}/tools/include/uapi/asm-generic/unistd.h
>>      install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h
>> ${S}/include/uapi/asm-generic/unistd.h
>> +    echo "mandatory-y += unistd.h" > ${S}/include/uapi/asm-generic/Kbuild
>>
>>      # the fetcher is inhibited by the 'inherit kernelsrc', so we do a
>> quick check and
>>      # copy for a helper script we need
>>
>> base-commit: 649147913e89cd8f7390cb17cd0be94c9710ffa6
>> --
>> 2.43.0
>>
>>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee
> at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
>
Johannes Schneider Nov. 1, 2025, 1:07 a.m. UTC | #3
Hoi Bruce,


> > On Fri, Oct 31, 2025 at 1:45 PM Bruce Ashfield <bruce.ashfield@gmail.com<mailto:bruce.ashfield@gmail.com>> wrote:
> > 
> > > On Fri, Oct 31, 2025 at 1:36 PM Johannes Schneider <johannes.schneider@leica-geosystems.com<mailto:johannes.schneider@leica-geosystems.com>> wrote:
> > > Building 'perf' with/against newer kernels (>=6.14) would fail because
> > > of a missing 'Kbuild' in the folder created when manually installing
> > > the 'unistd.h' header from libc.
> > > 
> > > Add a oneliner that creates the missing file, with the relevant
> > > content taken from the kernels Kbuild file.
> > > 
> > > Tested with kernel version: 6.16.4
> > > 
> > I wasn't clear.
> > 
> > You also need to test this with the older kernel versions and let us know that it worked.
> > 
> > Not just "it should work", we can't let the infrastructure pick up any failures, it needs to be tested before submission.
> > 
> > But thanks for not just saying you tested it (if you haven't). if you have done those tests and I'm just misunderstanding, a quick v3 with confirmation would be great.
> > 
> I hit send too soon.
> 
> The reason that we really need those tests is:  if you've noticed on master we had significant reproducibility issues with perf, which you'd also have when building a 6.16 perf on that old release.
> 
> So once we add the support for building it all, there will be expectations that it passes testing on all versions.
> 
> 

thanks for pushing in the right direction ;-)

as i was putting up a plain oe-core build, to test more kernel versions than just our project constellation (scarthgap + 6.16 kernel)

i've noticed that on master it is already fixed - slightly differently though:

https://lists.openembedded.org/g/openembedded-core/message/217991

what is the process to get this fix backported/applied to scarthgap? :-)


gruß
Johannes
Bruce Ashfield Nov. 1, 2025, 1:18 a.m. UTC | #4
On Fri, Oct 31, 2025 at 9:07 PM SCHNEIDER Johannes <
johannes.schneider@leica-geosystems.com> wrote:

> Hoi Bruce,
>
>
> > > On Fri, Oct 31, 2025 at 1:45 PM Bruce Ashfield <
> bruce.ashfield@gmail.com<mailto:bruce.ashfield@gmail.com>> wrote:
> > >
> > > > On Fri, Oct 31, 2025 at 1:36 PM Johannes Schneider <
> johannes.schneider@leica-geosystems.com<mailto:
> johannes.schneider@leica-geosystems.com>> wrote:
> > > > Building 'perf' with/against newer kernels (>=6.14) would fail
> because
> > > > of a missing 'Kbuild' in the folder created when manually installing
> > > > the 'unistd.h' header from libc.
> > > >
> > > > Add a oneliner that creates the missing file, with the relevant
> > > > content taken from the kernels Kbuild file.
> > > >
> > > > Tested with kernel version: 6.16.4
> > > >
> > > I wasn't clear.
> > >
> > > You also need to test this with the older kernel versions and let us
> know that it worked.
> > >
> > > Not just "it should work", we can't let the infrastructure pick up any
> failures, it needs to be tested before submission.
> > >
> > > But thanks for not just saying you tested it (if you haven't). if you
> have done those tests and I'm just misunderstanding, a quick v3 with
> confirmation would be great.
> > >
> > I hit send too soon.
> >
> > The reason that we really need those tests is:  if you've noticed on
> master we had significant reproducibility issues with perf, which you'd
> also have when building a 6.16 perf on that old release.
> >
> > So once we add the support for building it all, there will be
> expectations that it passes testing on all versions.
> >
> >
>
> thanks for pushing in the right direction ;-)
>
> as i was putting up a plain oe-core build, to test more kernel versions
> than just our project constellation (scarthgap + 6.16 kernel)
>
> i've noticed that on master it is already fixed - slightly differently
> though:
>
> https://lists.openembedded.org/g/openembedded-core/message/217991
>
> what is the process to get this fix backported/applied to scarthgap? :-)
>

The easiest way is to cherry-pick the branch into your local scarthgap
branch,
git format the patch out, add [scarthgap] to the prefix and add a comment
in the
patch below the --- (so it will be thrown out on application) that this is
a cherry-pick
request from master.

Then send it to oe-core and the stable maintainer will see it and pick it
up.

Bruce



>
>
> gruß
> Johannes
diff mbox series

Patch

diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index 11fa917649..7db5fe6d1c 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -368,6 +368,7 @@  do_configure:prepend () {
     # so we copy it from the sysroot unistd.h to the perf unistd.h
     install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/tools/include/uapi/asm-generic/unistd.h
     install -D -m0644 ${STAGING_INCDIR}/asm-generic/unistd.h ${S}/include/uapi/asm-generic/unistd.h
+    echo "mandatory-y += unistd.h" > ${S}/include/uapi/asm-generic/Kbuild
 
     # the fetcher is inhibited by the 'inherit kernelsrc', so we do a quick check and
     # copy for a helper script we need