From: Daniel Wagner <dwagner@suse.de>
To: Daniel Bristot de Oliveira <bristot@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Wagner <dwagner@suse.de>
Subject: [PATCH] tools/rtla: Explicitly list libtraceevent dependency
Date: Tue, 10 Jan 2023 14:18:05 +0100 [thread overview]
Message-ID: <20230110131805.16242-1-dwagner@suse.de> (raw)
The current libtracefs.pkg file lists the dependency on
libtraceevent ("pkg-config --libs libtracefs" -> "-ltracefs
-ltraceevent").
Dan Nicholson's Guide to pkg-config[1] stats that "Libs: The link
flags specific to this package and any required libraries that don't
support pkg-config". Thus the current libtracefs.pkg is not correct.
rtla is depending on libtraceevent but it doesn't express this in
'pkg-config' part to retrieve the correct build flags.
In order to be able to update the "Libs:" section in the libtracefs
project we need to list the dependency explicitly to avoid future linker
failures.
[1] https://people.freedesktop.org/~dbn/pkg-config-guide.html
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
I've got this fallout with because I am using libtraceevent and libtracefs build
with Meson. Meson generates different pkg files which seems to align with Dan's
Guide.
tools/tracing/rtla/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 22e28b76f800..0664e2db22c1 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -32,7 +32,7 @@ TRACEFS_HEADERS := $$($(PKG_CONFIG) --cflags libtracefs)
CFLAGS := -O -g -DVERSION=\"$(VERSION)\" $(FOPTS) $(MOPTS) $(WOPTS) $(TRACEFS_HEADERS) $(EXTRA_CFLAGS)
LDFLAGS := -ggdb $(EXTRA_LDFLAGS)
-LIBS := $$($(PKG_CONFIG) --libs libtracefs)
+LIBS := $$($(PKG_CONFIG) --libs libtracefs libtraceevent)
SRC := $(wildcard src/*.c)
HDR := $(wildcard src/*.h)
--
2.39.0
next reply other threads:[~2023-01-10 13:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 13:18 Daniel Wagner [this message]
2023-01-10 13:55 ` [PATCH] tools/rtla: Explicitly list libtraceevent dependency Daniel Bristot de Oliveira
2023-01-10 14:08 ` Daniel Wagner
2023-01-10 14:19 ` Daniel Bristot de Oliveira
2023-01-10 14:45 ` Daniel Wagner
2023-01-10 14:51 ` Steven Rostedt
2023-01-10 14:53 ` Steven Rostedt
2023-01-10 15:08 ` Daniel Wagner
2023-01-10 14:48 ` Steven Rostedt
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=20230110131805.16242-1-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=bristot@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.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