From: "Mateusz Kowalczyk" <fuuzetsu@fuuzetsu.co.uk>
To: "Leo Yan" <niayan01@foss.arm.com>,
linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] Why does libtracevent pkg-config detection wipe PKG_CONFIG_PATH?
Date: Wed, 05 Jun 2024 08:53:30 +0900 [thread overview]
Message-ID: <1d63aa77-4809-45f1-8827-cb1ed6613f23@app.fastmail.com> (raw)
In-Reply-To: <f34d5d79-5d44-4a54-8e36-2720f4b25d4e@foss.arm.com>
On Tue, 4 Jun 2024, at 10:26 PM, Leo Yan wrote:
> Hi Mateusz,
>
> On 5/27/24 01:56, Mateusz Kowalczyk wrote:
>> Hi,
>>
>> To build recent perf, I'm having to apply the below patch.
>>
>> ```diff
>> ---
>> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
>> index 7f1e016a9253..b70fef12a977 100644
>> --- a/tools/perf/Makefile.config
>> +++ b/tools/perf/Makefile.config
>> @@ -1181,7 +1181,7 @@ ifneq ($(NO_LIBTRACEEVENT),1)
>> CFLAGS += -DHAVE_LIBTRACEEVENT $(LIBTRACEEVENT_CFLAGS)
>> LDFLAGS += $(LIBTRACEEVENT_LDFLAGS)
>> EXTLIBS += ${TRACEEVENTLIBS}
>> - LIBTRACEEVENT_VERSION := $(shell PKG_CONFIG_PATH=$(LIBTRACEEVENT_DIR) $(PKG_CONFIG) --modversion libtraceevent)
>> + LIBTRACEEVENT_VERSION := $(shell $(PKG_CONFIG) --modversion libtraceevent)
>> LIBTRACEEVENT_VERSION_1 := $(word 1, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
>> LIBTRACEEVENT_VERSION_2 := $(word 2, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
>> LIBTRACEEVENT_VERSION_3 := $(word 3, $(subst ., ,$(LIBTRACEEVENT_VERSION)))
>> ```
>>
>> I don't understand why `PKG_CONFIG_PATH` is overwritten this way. `grep`ing for PKG_CONFIG_PATH reveals that this isn't done anywhere else in the kernel tree. All other uses of `$(PKG_CONFIG)` in the file simply invoke the tool.
>>
>> Of course, I do actually have `libtraceevent.pc` available, it's just that `LIBTRACEVENT_DIR` is empty which stops it from finding it.
>
> When I was fixing the cross compilation issue for perf, I also
> encountered the similar issue with you. I have sent a patch series to
> resolve the compilation issue.
>
> It will be appreciated if you could check if the patch [1] can fix your
> reported issue or not.
Hi Leo,
I applied the linked patch on top of latest kernel tree checkout and I can confirm that it fixes the issue for me, thank you!
> Also thanks for James' reminding.
>
> Thanks,
> Leo
>
> [1]
> https://lore.kernel.org/linux-perf-users/20240604093223.1934236-3-leo.yan@arm.com/T/#u
--
Mateusz K.
next prev parent reply other threads:[~2024-06-04 23:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 0:56 Why does libtracevent pkg-config detection wipe PKG_CONFIG_PATH? Mateusz Kowalczyk
2024-05-28 16:09 ` James Clark
2024-05-29 0:05 ` Mateusz Kowalczyk
2024-05-29 8:34 ` James Clark
2024-06-04 13:26 ` [PATCH] " Leo Yan
2024-06-04 23:53 ` Mateusz Kowalczyk [this message]
2024-06-05 13:00 ` Leo Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d63aa77-4809-45f1-8827-cb1ed6613f23@app.fastmail.com \
--to=fuuzetsu@fuuzetsu.co.uk \
--cc=linux-perf-users@vger.kernel.org \
--cc=niayan01@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).