[ET Trac] [Einstein Toolkit] #2183: PAPI fails to compile with gcc 8

Einstein Toolkit trac-noreply at einsteintoolkit.org
Sun Aug 5 19:28:10 CDT 2018

#2183: PAPI fails to compile with gcc 8
 Reporter:  Roland Haas          |       Type:  defect
   Status:  new                  |   Priority:  major
Milestone:                       |  Component:  EinsteinToolkit thorn
  Version:  development version  |   Keywords:  PAPI
 gcc8 includes a warning when a string format may not fit into its buffer
 in sprintf calls:
 gcc  -Wno-override-init  -g -Wall -Werror -Wextra -Wno-unused-parameter
 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
    snprintf(d2path, MAXPATHLEN, "%s/%s", debugfs_mnt, d1->d_name);
 and since PAPI hard-codes an option {{{-Werror}}} it fails to compile. The
 same issue persists with PAPI 5.6.0 which seems to be the newest version
 for which a tarball is available.

 A workaround would be to patch out the {{{-Werror}}} option, which is
 annoying on a production system anyway, or to try and only selectively
 disable the buffer warning.

Ticket URL: <https://trac.einsteintoolkit.org/ticket/2183>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit

More information about the Trac mailing list