diff mbox series

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

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

Commit Message

Johannes Schneider Oct. 31, 2025, 4:15 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.

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:07 p.m. UTC | #1
On Fri, Oct 31, 2025 at 12:15 PM Johannes Schneider via
lists.openembedded.org <johannes.schneider=
leica-geosystems.com@lists.openembedded.org> 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.
>
> 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
>

What happens with older kernels that haven't previously needed this ?

Bruce



>
>      # 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#225547):
> https://lists.openembedded.org/g/openembedded-core/message/225547
> Mute This Topic: https://lists.openembedded.org/mt/116050956/1050810
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Johannes Schneider Oct. 31, 2025, 5:26 p.m. UTC | #2
Hoi Bruce,

>
> On Fri, Oct 31, 2025 at 12:15 PM Johannes Schneider via lists.openembedded.org<http://lists.openembedded.org/> <johannes.schneider=leica-geosystems.com@lists.openembedded.org<mailto:leica-geosystems.com@lists.openembedded.org>> 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.
>
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com<mailto:johannes.schneider@leica-geosystems.com>>
> ---
>  meta/recipes-kernel/perf/perf.bb<http://perf.bb/> | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb<http://perf.bb/> b/meta/recipes-kernel/perf/perf.bb<http://perf.bb/>
> index 11fa917649..7db5fe6d1c 100644
> --- a/meta/recipes-kernel/perf/perf.bb<http://perf.bb/>
> +++ b/meta/recipes-kernel/perf/perf.bb<http://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
>
> What happens with older kernels that haven't previously needed this ?
>
> Bruce
>

Since there perf seemingly builds fine, i'd expect the Kbuild is neither needed nor used.


gruß
Johannes

>
>
>      # 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>
Bruce Ashfield Oct. 31, 2025, 5:28 p.m. UTC | #3
On Fri, Oct 31, 2025 at 1:26 PM SCHNEIDER Johannes <
johannes.schneider@leica-geosystems.com> wrote:

> Hoi Bruce,
>
> >
> > On Fri, Oct 31, 2025 at 12:15 PM Johannes Schneider via
> lists.openembedded.org<http://lists.openembedded.org/>
> <johannes.schneider=leica-geosystems.com@lists.openembedded.org<mailto:
> leica-geosystems.com@lists.openembedded.org>> 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.
> >
> > Signed-off-by: Johannes Schneider <
> johannes.schneider@leica-geosystems.com<mailto:
> johannes.schneider@leica-geosystems.com>>
> > ---
> >  meta/recipes-kernel/perf/perf.bb<http://perf.bb/> | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/recipes-kernel/perf/perf.bb<http://perf.bb/>
> b/meta/recipes-kernel/perf/perf.bb<http://perf.bb/>
> > index 11fa917649..7db5fe6d1c 100644
> > --- a/meta/recipes-kernel/perf/perf.bb<http://perf.bb/>
> > +++ b/meta/recipes-kernel/perf/perf.bb<http://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
> >
> > What happens with older kernels that haven't previously needed this ?
> >
> > Bruce
> >
>
> Since there perf seemingly builds fine, i'd expect the Kbuild is neither
> needed nor used.
>
> I ask, because you need to put that in the commit log.

Test with kernel versions <x>, <y>.

Otherwise, how are we supposed to know if it will cause breakage or not ?

Bruce



>
> gruß
> Johannes
>
> >
> >
> >      # 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
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
> >
>
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