linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <niayan01@foss.arm.com>
To: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>,
	linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] Why does libtracevent pkg-config detection wipe PKG_CONFIG_PATH?
Date: Tue, 4 Jun 2024 14:26:58 +0100	[thread overview]
Message-ID: <f34d5d79-5d44-4a54-8e36-2720f4b25d4e@foss.arm.com> (raw)
In-Reply-To: <cfcaf804-d7b1-4d55-8465-12e1d238aca1@app.fastmail.com>

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.

Also thanks for James' reminding.

Thanks,
Leo

[1] 
https://lore.kernel.org/linux-perf-users/20240604093223.1934236-3-leo.yan@arm.com/T/#u

  parent reply	other threads:[~2024-06-04 13:27 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 ` Leo Yan [this message]
2024-06-04 23:53   ` [PATCH] " Mateusz Kowalczyk
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=f34d5d79-5d44-4a54-8e36-2720f4b25d4e@foss.arm.com \
    --to=niayan01@foss.arm.com \
    --cc=fuuzetsu@fuuzetsu.co.uk \
    --cc=linux-perf-users@vger.kernel.org \
    /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).