lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230110094814.4af966a4@gandalf.local.home>
Date:   Tue, 10 Jan 2023 09:48:14 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Daniel Wagner <dwagner@...e.de>
Cc:     Daniel Bristot de Oliveira <bristot@...nel.org>,
        linux-trace-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tools/rtla: Explicitly list libtraceevent dependency

On Tue, 10 Jan 2023 14:18:05 +0100
Daniel Wagner <dwagner@...e.de> wrote:

> 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

The Libs: field in tracefs only shows the -ltracefs and not -ltraceevent.
It follows this rule. It's the "Requires:" tag that pulls in -ltraceevent,
correctly.

> 
> Signed-off-by: Daniel Wagner <dwagner@...e.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)

I'm still confused as to why this is needed.

According to Dan's document:

Requires: A list of packages required by this package. The versions of these packages may be specified using the comparison operators =, <, >, <= or >=.
Requires.private: A list of private packages required by this package but not exposed to applications. The version specific rules from the Requires field also apply here.

The "Requires" is exported to other applications. It's the private that is
not.

What is this trying to fix?

-- Steve


>  
>  SRC	:=	$(wildcard src/*.c)
>  HDR	:=	$(wildcard src/*.h)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ