From patchwork Wed Dec 15 02:21:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Dion X-Patchwork-Id: 35233 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 B51E427BBEA; Wed, 15 Dec 2021 02:23:12 +0000 (GMT) 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,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 7D2E627BBE9 for ; Wed, 15 Dec 2021 02:23:12 +0000 (GMT) Received: from localhost ([::1]:54364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxJwl-00022D-KK for patchwork@mira.cbaines.net; Tue, 14 Dec 2021 21:23:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxJwd-000223-23 for guix-patches@gnu.org; Tue, 14 Dec 2021 21:23:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48396) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxJwc-00007f-QM for guix-patches@gnu.org; Tue, 14 Dec 2021 21:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxJwc-0002rj-Gp for guix-patches@gnu.org; Tue, 14 Dec 2021 21:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52499] [PATCH] gnu: Fix build error of libpfm4. Resent-From: Olivier Dion Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Dec 2021 02:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52499 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52499@debbugs.gnu.org Cc: Olivier Dion X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163953492310923 (code B ref -1); Wed, 15 Dec 2021 02:23:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Dec 2021 02:22:03 +0000 Received: from localhost ([127.0.0.1]:59942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxJvf-0002q7-1k for submit@debbugs.gnu.org; Tue, 14 Dec 2021 21:22:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:56006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxJve-0002ps-9l for submit@debbugs.gnu.org; Tue, 14 Dec 2021 21:22:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxJvd-0001zK-LA for guix-patches@gnu.org; Tue, 14 Dec 2021 21:22:02 -0500 Received: from smtp.polymtl.ca ([132.207.4.11]:54211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxJva-0008LG-H9 for guix-patches@gnu.org; Tue, 14 Dec 2021 21:22:01 -0500 Received: from laura.hitronhub.home (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 1BF2Lg48020879 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 14 Dec 2021 21:21:50 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 1BF2Lg48020879 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1639534910; bh=vH70AjoGtSr0Hhp0OwK+p2+wXM95+GEjuATKhtJhl2w=; h=From:To:Cc:Subject:Date:From; b=BEjQVsx9npYd5JI2YDARcb7SPUmfw0DZ6mN68Rfd4tws8pHy/WihyQJKAu/GvUPXq ivN7sHt/seBhMksIduYp8NdM5GnwOHXfNmLXQdZqtQvnll0IAWxZfl+dyiIXgmXoo3 BP1Jf6elE9sOlRd5JN8Q/IITBBVPnePaW1lBOs9A= Date: Tue, 14 Dec 2021 21:21:41 -0500 Message-Id: X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-Poly-FromMTA: (modemcable094.169-200-24.mc.videotron.ca [24.200.169.94]) at Wed, 15 Dec 2021 02:21:42 +0000 Received-SPF: pass client-ip=132.207.4.11; envelope-from=olivier.dion@polymtl.ca; helo=smtp.polymtl.ca 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-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" Reply-to: Olivier Dion X-ACL-Warn: , Olivier Dion via Guix-patches X-Patchwork-Original-From: Olivier Dion via Guix-patches via From: Olivier Dion X-getmail-retrieved-from-mailbox: Patches For some reason, the build recently failed with: pfmlib_perf_event_pmu.c:349:36: error: ?%s? directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=] 349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name); | ^~ pfmlib_perf_event_pmu.c:349:3: note: ?snprintf? output between 2 and 4352 bytes into a destination of size 4096 349 | snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pfmlib_perf_event_pmu.c:399:58: error: ?%s? directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=] 399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name); | ^~ pfmlib_perf_event_pmu.c:399:25: note: ?snprintf? output between 5 and 4355 bytes into a destination of size 4096 399 | snprintf(idpath, MAXPATHLEN, "%s/%s/id", d2path, d2->d_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors * gnu/packages/linux.scm (libpfm4): Fix build. (%standard-phases) Add `-Wno-format-truncation` to CFLAGS in build phase. --- gnu/packages/linux.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c752df7996..a1c9408e89 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -7632,6 +7632,7 @@ (define-public libpfm4 (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) (setenv "CC" "gcc") + (setenv "CFLAGS" "-Wno-format-truncation") (invoke "make") #t))) (replace 'install