On Tue, Oct 10, 2023 at 7:44 AM Rasmus Villemoes <[email protected]> wrote:
> On 10/07/2023 05.20, Bruce Ashfield via lists.openembedded.org wrote: > > From: Bruce Ashfield <[email protected]> > > > > kernel version 6.4 introduces a new file that need to have > > absolute paths removed, so we can avoid the buildpaths QA > > warning and have relocatable packages. > > > > We add pmu-flex.h to the processing, and the issue is resolved. > > Hi Bruce > > We've seen those buildpaths qa warning when building perf for a long > time, and they happen whether we build against a 5.15, 6.2 or 6.5 > kernel. More specifically, what we see is > > WARNING: perf-1.0-r9 do_package_qa: QA Issue: File /usr/bin/.debug/perf > in package perf-dbg contains reference to TMPDIR [buildpaths] > WARNING: perf-1.0-r9 do_package_qa: QA Issue: File /usr/bin/trace in > package perf contains reference to TMPDIR > File /usr/bin/perf in package perf contains reference to TMPDIR > [buildpaths] > > Looking at the .o.cmd files, there is indeed nowhere a > -fmacro-prefix-map or -fdebug-prefix-map, and apart from the bison/yacc > stuff, I also don't see where the perf recipe attempts to pass such flags. > > It seems we can fix it with > > $ git diff > diff --git a/meta/recipes-kernel/perf/perf.bb > b/meta/recipes-kernel/perf/perf.bb > index 420286e..59c0c10 100644 > --- a/meta/recipes-kernel/perf/perf.bb > +++ b/meta/recipes-kernel/perf/perf.bb > @@ -81,7 +81,7 @@ EXTRA_OEMAKE = '\ > LDSHARED="${CC} -shared" \ > AR="${AR}" \ > LD="${LD}" \ > - EXTRA_CFLAGS="-ldw -I${S}" \ > + EXTRA_CFLAGS="-ldw -I${S} ${DEBUG_PREFIX_MAP}" \ > YFLAGS='-y > --file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}' \ > EXTRA_LDFLAGS="${PERF_EXTRA_LDFLAGS}" \ > perfexecdir=${libexecdir} \ > > but I'm quite curious what the difference between our setups is, since > apparently the only problem oe-core has/had was that new file introduced > in v6.4. > You can see any patches that we have against perf in the kernel-cache repository (https://git.yoctoproject.org/yocto-kernel-cache/). That being said, we unfortunately cannot really patch perf, since the recipe is supported against more than our reference kernels. The debug prefix didn't initially work on some kernels (and hence perf), so we went with the more manual approach. It is very possible that with a newer window of supported kernels that we could change how we deal with TMPDIR. Other than that, there's no special setup (in particular no setup that I have) as it is the autobuilder infrastructure that typically finds and reports these issues. > > FWIW, what we build are vanilla -stable kernels, i.e. "6.2" means > v6.2.16 as tagged by Greg. The only modification of the perf recipe we > do is removing "scripting" from PACKAGECONFIG. > > FWIW, you could save some effort and simply build v6.<x>/base on linux-yocto and you'd have exactly the same source. Bruce > Rasmus > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#188882): https://lists.openembedded.org/g/openembedded-core/message/188882 Mute This Topic: https://lists.openembedded.org/mt/100051819/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
