Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 664294 - dev-libs/libpfm-4.8.0 : 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=]
Summary: dev-libs/libpfm-4.8.0 : pfmlib_perf_event_pmu.c:349:36: error: %s directive o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sławek Lis (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2018-08-22 19:07 UTC by Toralf Förster
Modified: 2018-12-04 21:44 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,16.68 KB, text/plain)
2018-08-22 19:08 UTC, Toralf Förster
Details
dev-libs:libpfm-4.8.0:20180822-181844.log (dev-libs:libpfm-4.8.0:20180822-181844.log,4.44 KB, text/plain)
2018-08-22 19:08 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,154.20 KB, text/plain)
2018-08-22 19:08 UTC, Toralf Förster
Details
environment (environment,40.11 KB, text/plain)
2018-08-22 19:08 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.78 KB, application/x-bzip)
2018-08-22 19:08 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,11.48 KB, application/x-bzip)
2018-08-22 19:08 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-08-22 19:07:59 UTC
x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native  -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/var/tmp/portage/dev-libs/libpfm-4.8.0/work/libpfm-4.8.0/include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX  -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/var/tmp/portage/dev-libs/libpfm-4.8.0/work/libpfm-4.8.0/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_X86 -DCONFIG_PFMLIB_ARCH_X86_64 -I. -c pfmlib_perf_event_pmu.c
pfmlib_perf_event_pmu.c: In function ‘gen_tracepoint_table’:
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=]
   snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
                                    ^~
In file included from /usr/include/stdio.h:862,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-desktop-plasma_libressl_20180818-160152

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.1
 [2] x86_64-pc-linux-gnu-8.2.0 *

Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python2.7 (fallback)
  [3]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby23 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.8.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv dev-libs/libpfm
[ebuild  N    ] dev-libs/libpfm-4.8.0  USE="-static-libs"
Comment 1 Toralf Förster gentoo-dev 2018-08-22 19:08:02 UTC
Created attachment 544556 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-08-22 19:08:05 UTC
Created attachment 544558 [details]
dev-libs:libpfm-4.8.0:20180822-181844.log
Comment 3 Toralf Förster gentoo-dev 2018-08-22 19:08:08 UTC
Created attachment 544560 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2018-08-22 19:08:11 UTC
Created attachment 544562 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2018-08-22 19:08:14 UTC
Created attachment 544564 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2018-08-22 19:08:17 UTC
Created attachment 544566 [details]
temp.tbz2
Comment 7 Arfrever Frehtes Taifersar Arahesis 2018-09-22 05:04:21 UTC
This particular warning-transformed-into-error no longer occurs in dev-libs/libpfm-4.10.1 (bug #666615), but that version still uses generic -Werror flag.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2018-10-03 23:47:06 UTC
Conveniently warning-affecting options are collected in DBG= variable:
    DBG?=-g -Wall -Werror -Wextra -Wno-unused-parameter

This can be overridden as:

--- a/dev-libs/libpfm/libpfm-4.8.0.ebuild
+++ b/dev-libs/libpfm/libpfm-4.8.0.ebuild
@@ -27,3 +27,3 @@ src_prepare() {
 src_compile() {
-       emake CC=$(tc-getCC)
+       emake CC=$(tc-getCC) DBG=
 }
Comment 9 Larry the Git Cow gentoo-dev 2018-12-04 21:44:18 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26a67103e93b055fe9b9eb4eb5db3f95018a1f0a

commit 26a67103e93b055fe9b9eb4eb5db3f95018a1f0a
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2018-12-04 21:43:42 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2018-12-04 21:44:10 +0000

    dev-libs/libpfm: drop -Werror, bug #664294
    
    Reported-by: Toralf Förster
    Closes: https://bugs.gentoo.org/664294
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 dev-libs/libpfm/libpfm-4.4.0.ebuild | 5 +++--
 dev-libs/libpfm/libpfm-4.6.0.ebuild | 5 +++--
 dev-libs/libpfm/libpfm-4.8.0.ebuild | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)