Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7913381rwl; Tue, 10 Jan 2023 06:58:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8fpd32R833wjy3wb8SVjwAEXvRtXAvg1ulSm5lWcO/3VYSvCMdYKBFWhN51lDp8u8/HJz X-Received: by 2002:a17:906:5dd2:b0:7c1:7010:f413 with SMTP id p18-20020a1709065dd200b007c17010f413mr63200425ejv.19.1673362731831; Tue, 10 Jan 2023 06:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673362731; cv=none; d=google.com; s=arc-20160816; b=KOj2HxrAh55eHJV7LAalRcnhigt5K4uQrsnd3vKTaMgYaMy30CU/c8Pyu8gpMrxtPY 4j25fyf4H5PPH5CmMTniaOmrBiNeMZNu+mgjBRM+XqGL+iwWlGBa2O/KCQnRr8REMizy bA1nn1DmovpOnh0BszKC59m7XgJL66zOkH9u9oQUFcrxrlu0mbB/NuB584QYaTT6KBZi +f8Ke6Bdoyo/lxxNv12+kaSISzrz9j9FV3YwuJcXDXVPkPMzLDoLtp1n9zS9XdOQZ/gX wtyOgWKJubGKpE4dLoI82DQkQezPV7gBUvEdtTj23QSA3WwntL5sP9sVwDSQ5qFui7wZ LBjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Z/s7f0Y92CFsXmZW69ghGptzOhV6BGeiRl7BR4QnQsw=; b=iy2YKrGNyaNR4Xmn9IGDiKU3s2VOvTaG4Fu/WXGXeYUqIUb5YvQ8sTeF7A5KQJmOkG kRZJUCrv/5awCIT2YtK5+5VAO3UQVDendteZf30AyJLllcW2rgTqEjln0M7mtLAWbuEc 4KFPNFXLNKAigFlh59xjPJ4BpFABODKhm9wkXJ4g9aTJcKUtyVr6q3Q6kswHAwnUh0E0 q4xGPUC/j4YLiBHwQRUkjLnJEHVm9bcoJKYoeMeTNA7Df5YdRfQWIiduS/1P0SBkkDDO vHPx4ZTlvwoc32kjH5ppZt+TekJukDpKx042JZBuPsJ7ZJyxW3EGIxnr6mRYL4kko02z GFng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xd12-20020a170907078c00b0083bb359db7dsi12053742ejb.115.2023.01.10.06.58.39; Tue, 10 Jan 2023 06:58:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238652AbjAJOsf (ORCPT + 53 others); Tue, 10 Jan 2023 09:48:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238697AbjAJOsS (ORCPT ); Tue, 10 Jan 2023 09:48:18 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C3A4FD7F; Tue, 10 Jan 2023 06:48:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 54A266175A; Tue, 10 Jan 2023 14:48:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5491AC433D2; Tue, 10 Jan 2023 14:48:16 +0000 (UTC) Date: Tue, 10 Jan 2023 09:48:14 -0500 From: Steven Rostedt To: Daniel Wagner Cc: Daniel Bristot de Oliveira , linux-trace-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] tools/rtla: Explicitly list libtraceevent dependency Message-ID: <20230110094814.4af966a4@gandalf.local.home> In-Reply-To: <20230110131805.16242-1-dwagner@suse.de> References: <20230110131805.16242-1-dwagner@suse.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 Jan 2023 14:18:05 +0100 Daniel Wagner 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 > --- > > 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)