From patchwork Mon May 15 12:10:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Cirrottola X-Patchwork-Id: 13022 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A51EE27BBE9; Mon, 15 May 2023 15:57:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 973CC27BBE2 for ; Mon, 15 May 2023 15:57:32 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyZdT-00009Y-Fd; Mon, 15 May 2023 10:57:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyX2w-0007xd-LS for guix-patches@gnu.org; Mon, 15 May 2023 08:11:22 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pyX2c-0006Ax-Jk for guix-patches@gnu.org; Mon, 15 May 2023 08:11:17 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyX2c-0005SJ-1J for guix-patches@gnu.org; Mon, 15 May 2023 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63517] Fixing lcov usage? Resent-From: Luca Cirrottola Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 May 2023 12:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63517 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 63517@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168415265320956 (code B ref -1); Mon, 15 May 2023 12:11:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2023 12:10:53 +0000 Received: from localhost ([127.0.0.1]:42933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyX2S-0005Rv-UN for submit@debbugs.gnu.org; Mon, 15 May 2023 08:10:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:36622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyX2P-0005Rl-RH for submit@debbugs.gnu.org; Mon, 15 May 2023 08:10:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyX2P-0007sl-4C for guix-patches@gnu.org; Mon, 15 May 2023 08:10:49 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pyX2M-00067z-Jw for guix-patches@gnu.org; Mon, 15 May 2023 08:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:message-id:subject:mime-version; bh=rKOTvSctJmFstKnkxLjLKGHX7Uo0g2izh8KBFyjHWu4=; b=VwVNjErctP1nxCndnu63HskSEe545kea6fVRayhEvRK/2DiN3vetOHfj tVOhEi7iJVSVsgugjzJswniZX7rX5kM4vTWQtmK2o4DN60wBLlgh73veZ oUPoVuj2a/4kRpTwYEM6j1zqnxflnynnGuPsutwJx97/B0D6jHvA1D+MY o=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=luca.cirrottola@inria.fr; spf=None smtp.helo=postmaster@zcs-store1.inria.fr Received-SPF: Pass (mail2-relais-roc.national.inria.fr: domain of luca.cirrottola@inria.fr designates 128.93.142.28 as permitted sender) identity=mailfrom; client-ip=128.93.142.28; receiver=mail2-relais-roc.national.inria.fr; envelope-from="luca.cirrottola@inria.fr"; x-sender="luca.cirrottola@inria.fr"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:128.93.142.0/24 ip4:192.134.164.0/24 ip4:128.93.162.160 ip4:89.107.174.7 mx ~all" Received-SPF: None (mail2-relais-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@zcs-store1.inria.fr) identity=helo; client-ip=128.93.142.28; receiver=mail2-relais-roc.national.inria.fr; envelope-from="luca.cirrottola@inria.fr"; x-sender="postmaster@zcs-store1.inria.fr"; x-conformance=spf_only X-IronPort-AV: E=Sophos;i="5.99,276,1677538800"; d="c'?scan'208,217";a="108042949" X-MGA-submission: MDEn5hZXIv9e7F+4/loNNpiAPNPTiKExfVygBK0QIiJK6Jh0nil6epw9gEh+ZORchcpS83FaaEwJDRDSn6PorRwPETRO7ECcf+h/cSGm2z59vK55rBniUB9CZT4Dp8Wzk6w2eR+B0IMdAR3EuuEPiXBVwWoGQI0+G1Fqir1uj3Xscw== Received: from zcs-store1.inria.fr ([128.93.142.28]) by mail2-relais-roc.national.inria.fr with ESMTP; 15 May 2023 14:10:42 +0200 Date: Mon, 15 May 2023 14:10:41 +0200 (CEST) From: Luca Cirrottola Message-ID: <840693491.43189747.1684152641380.JavaMail.zimbra@inria.fr> MIME-Version: 1.0 X-Originating-IP: [81.65.155.8] X-Mailer: Zimbra 8.8.15_GA_4522 (ZimbraWebClient - FF102 (Linux)/8.8.15_GA_4527) Thread-Index: KRi4jOCwXnjgfOpEYcVh2LB3H5SHyw== Thread-Topic: Fixing lcov usage? Received-SPF: pass client-ip=192.134.164.83; envelope-from=luca.cirrottola@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 15 May 2023 10:57:12 -0400 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Hello, I want use lcov to generate a coverage report for a C program, but I find out I always need to add "findutils" package to my shell in order for "lcov" to work. Shouldn't "findutils" be added to the propagated-inputs of "lcov", to have it available at runtime? Here is a short description of the problem which can be tested on the attached (empty) C program "main.c". 1. The shell I want to use: guix shell -C gcc-toolchain lcov 2. The commands I run in the shell: gcc -fprofile-arcs -ftest-coverage -g -O0 -c main.c gcc -fprofile-arcs -ftest-coverage -g -O0 -lgcov main.o -o my_program ./my_program lcov --directory . --capture --output-file coverage.info 3. The problem I get: lcov is unable to find the .gcda files for its coverage report (message ".geninfo-real: WARNING: no .gcda files found in . - skipping!"). Everything works fine with "guix shell -C gcc-toolchain lcov findutils", or if I add "findutils" to the propagated-inputs of "lcov" as in the proposed patch (for the commit 13e252af79ffb85bc68d8104fdf700269b903875 on master), which I have tested by defining and building the modified package in a local copy of the gnu/packages/code.scm module. Of coarse I am open to recognize my errors if I have missed something in the package usage :-) or if I have misunderstood the usage of propagated-inputs (but it didn't work with findutils as "normal" input)... or if there are better solutions. Thank you in advance, Luca diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm index d57954c47c..2b1d221122 100644 --- a/gnu/packages/code.scm +++ b/gnu/packages/code.scm @@ -580,6 +580,7 @@ stack traces.") `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))) #t))))) (inputs (list perl perl-io-compress perl-json)) + (propagated-inputs (list findutils)) (home-page "https://ltp.sourceforge.net/coverage/lcov.php") (synopsis "Code coverage tool that enhances GNU gcov") (description "LCOV is an extension of @command{gcov}, a tool part of the