* [bug#52499] [PATCH] gnu: Fix build error of libpfm4.
@ 2021-12-15 2:21 Olivier Dion via Guix-patches via
2021-12-15 5:41 ` Leo Famulari
0 siblings, 1 reply; 2+ messages in thread
From: Olivier Dion via Guix-patches via @ 2021-12-15 2:21 UTC (permalink / raw)
To: 52499; +Cc: Olivier Dion
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
--
2.34.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [bug#52499] [PATCH] gnu: Fix build error of libpfm4.
2021-12-15 2:21 [bug#52499] [PATCH] gnu: Fix build error of libpfm4 Olivier Dion via Guix-patches via
@ 2021-12-15 5:41 ` Leo Famulari
0 siblings, 0 replies; 2+ messages in thread
From: Leo Famulari @ 2021-12-15 5:41 UTC (permalink / raw)
To: 52499; +Cc: Olivier Dion, 52499-done
On Tue, Dec 14, 2021 at 09:21:41PM -0500, Olivier Dion via Guix-patches via wrote:
> 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.
Thanks! Pushed as c7795eccaf432beec7366fa901b4bb6fc24cfead
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-15 5:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 2:21 [bug#52499] [PATCH] gnu: Fix build error of libpfm4 Olivier Dion via Guix-patches via
2021-12-15 5:41 ` Leo Famulari
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.