Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3087786rwb; Sat, 6 Aug 2022 12:22:09 -0700 (PDT) X-Google-Smtp-Source: AA6agR7MvS8GWwMKH1KR/RiVfRDKM2X/Y/GjCvYJd9Wl1Rxy3YagMmf2EC43qCXIwc+Dg58Rnk4b X-Received: by 2002:a17:903:110e:b0:16c:f81b:59d2 with SMTP id n14-20020a170903110e00b0016cf81b59d2mr11735632plh.142.1659813729524; Sat, 06 Aug 2022 12:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659813729; cv=none; d=google.com; s=arc-20160816; b=eZH2l1PjRJHR1Fbd5C92hGjjFpJVkS+CCHxchscObhormCXvxKeTb9kLwoOXnftNnD 7/7LuHU62MvWHPtWUepV9YSg8gBtMHCI2UMc9Xjn9vm1kYTcGfmKEqbogTYxq1NCYQF6 JqhRCaV/CE6+1skxafqAzj76LxBlKo/ybIPpUbBJEOyXocnUAGi/5aZsnKRTohz28CIr vdZam+rroffZ1TsgsPQVGba9m70pMZsVOjOdXETNqTWx1JdU7GDFyxOSIgbZoh/kum3R gr5GrU5+pgo+dRwMRWdh6yI3G+Zwnek28fLFdTMLbs8ATRYrGKx214wNO3TQ9Jg2U6OS H+kA== 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=ToDY9o9BwDOEqkshz5Pbdiv/Ik5IGcfmSp9O3v01vK8=; b=K2W0+MweqZeGXfi2AWkpMsOyHHQYiMi2AqWm0u1WvUNCnciMxgpGQBL2DRSjRcFFVo a8qBUFi7ymj1xMz9uyCfQ6NDJZYBwjflLpzyC08XmwbTu7sn1rZRDLfyek8X6gGog/nr ZfD8cOCf6cNxnLtfwUYg0gDBZARSAGanjPDO54+9aEYxoLK5OOLeA1f8QMwjHUyx0znJ XCflyAyMSMZokhEMGM9EyKhwNrDm56xyNlWvBKYv9L2f+nftUhysQXNMjGw8h4H8/WKH BUsKmIoPfKfY9kS4JBy96UP/k9SQozzSUSXk3Ea6PWH86Kz6lj27gOfvHxZj8g49rfr8 vZgg== 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 pi3-20020a17090b1e4300b001f73769ac63si1269008pjb.126.2022.08.06.12.21.53; Sat, 06 Aug 2022 12:22:09 -0700 (PDT) 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 S232827AbiHFSpY (ORCPT + 99 others); Sat, 6 Aug 2022 14:45:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231751AbiHFSpX (ORCPT ); Sat, 6 Aug 2022 14:45:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 097972AFB for ; Sat, 6 Aug 2022 11:45:22 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id BE52AB800C1 for ; Sat, 6 Aug 2022 18:45:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0F0FC433C1; Sat, 6 Aug 2022 18:45:18 +0000 (UTC) Date: Sat, 6 Aug 2022 14:45:17 -0400 From: Steven Rostedt To: Linus Torvalds Cc: Daniel Bristot de Oliveira , LKML , Andreas Schwab , jianchunfu Subject: Re: [GIT PULL] rtla: Updates for 5.20/6.0 Message-ID: <20220806144517.19140960@gandalf.local.home> In-Reply-To: <20220806142203.3c133322@gandalf.local.home> References: <20220803104936.7df810fd@gandalf.local.home> <20220805124701.4b44195d@gandalf.local.home> <12638499-5079-95b0-7861-fb06ef3d2522@kernel.org> <20220806142203.3c133322@gandalf.local.home> 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, T_SCC_BODY_TEXT_LINE 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 Sat, 6 Aug 2022 14:22:03 -0400 Steven Rostedt wrote: > With the below patch, it will show the warnings for both libtraceevent and > libtracefs if they are not installed: > > $ make > ******************************************** > ** NOTICE: libtraceevent version 1.5 or higher not found > ** > ** Consider installing the latest libtraceevent from your > ** distribution, e.g., 'dnf install libtraceevent-devel' on Fedora, > ** or from source: > ** > ** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ > ** > ******************************************** > ******************************************** > ** NOTICE: libtracefs version 1.3 or higher not found > ** > ** Consider installing the latest libtracefs from your > ** distribution, e.g., 'dnf install libtracefs-devel' on Fedora, > ** or from source: > ** > ** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ > ** > ******************************************** > Makefile:106: *** Please add the necessary dependencies. Stop. Or to even make it less noisy: $ make ******************************************** ** NOTICE: Failed build dependencies ** ** Required Libraries: ** libtraceevent version 1.5 or higher ** libtracefs version 1.3 or higher ** ** Consider installing the latest libtracefs from your ** distribution, e.g., 'dnf install libtraceevent-devel libtracefs-devel' on Fedora, ** or from source: ** ** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ ** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ ** ******************************************** Makefile:106: *** Please add the necessary dependencies. Stop. -- Steve diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile index 1bea2d16d4c1..cc9478dabd8b 100644 --- a/tools/tracing/rtla/Makefile +++ b/tools/tracing/rtla/Makefile @@ -61,40 +61,50 @@ endif LIBTRACEEVENT_MIN_VERSION = 1.5 LIBTRACEFS_MIN_VERSION = 1.3 +.PHONY: all warnings show_warnings +all: warnings rtla + TEST_LIBTRACEEVENT = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEEVENT_MIN_VERSION) libtraceevent > /dev/null 2>&1 || echo n") ifeq ("$(TEST_LIBTRACEEVENT)", "n") -.PHONY: warning_traceevent -warning_traceevent: - @echo "********************************************" - @echo "** NOTICE: libtraceevent version $(LIBTRACEEVENT_MIN_VERSION) or higher not found" - @echo "**" - @echo "** Consider installing the latest libtraceevent from your" - @echo "** distribution, e.g., 'dnf install libtraceevent' on Fedora," - @echo "** or from source:" - @echo "**" - @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ " - @echo "**" - @echo "********************************************" +WARNINGS = show_warnings +MISSING_LIBS += echo "** libtraceevent version $(LIBTRACEEVENT_MIN_VERSION) or higher"; +MISSING_PACKAGES += "libtraceevent-devel" +MISSING_SOURCE += echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/ "; endif TEST_LIBTRACEFS = $(shell sh -c "$(PKG_CONFIG) --atleast-version $(LIBTRACEFS_MIN_VERSION) libtracefs > /dev/null 2>&1 || echo n") ifeq ("$(TEST_LIBTRACEFS)", "n") -.PHONY: warning_tracefs -warning_tracefs: - @echo "********************************************" - @echo "** NOTICE: libtracefs version $(LIBTRACEFS_MIN_VERSION) or higher not found" - @echo "**" - @echo "** Consider installing the latest libtracefs from your" - @echo "** distribution, e.g., 'dnf install libtracefs' on Fedora," - @echo "** or from source:" - @echo "**" - @echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ " - @echo "**" - @echo "********************************************" +WARNINGS = show_warnings +MISSING_LIBS += echo "** libtracefs version $(LIBTRACEFS_MIN_VERSION) or higher"; +MISSING_PACKAGES += "libtracefs-devel" +MISSING_SOURCE += echo "** https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ "; endif -.PHONY: all -all: rtla +define show_dependencies + @echo "********************************************"; \ + echo "** NOTICE: Failed build dependencies"; \ + echo "**"; \ + echo "** Required Libraries:"; \ + $(MISSING_LIBS) \ + echo "**"; \ + echo "** Consider installing the latest libtracefs from your"; \ + echo "** distribution, e.g., 'dnf install $(MISSING_PACKAGES)' on Fedora,"; \ + echo "** or from source:"; \ + echo "**"; \ + $(MISSING_SOURCE) \ + echo "**"; \ + echo "********************************************" +endef + +show_warnings: + $(call show_dependencies); + +ifneq ("$(WARNINGS)", "") +ERROR_OUT = $(error Please add the necessary dependencies) + +warnings: $(WARNINGS) + $(ERROR_OUT) +endif rtla: $(OBJ) $(CC) -o rtla $(LDFLAGS) $(OBJ) $(LIBS)