Cause:
Fedora uses more strict default compilation options to make itself more secure, namely Net-SNMP is compiled with '-Werror=format-security'. Net-SNMP, as in Red Hat Enterprise Linux 6 does not compile with the option.
Consequence:
The package cannot be recompiled on Fedora 21.
Fix:
Patch the package and fix one suspicious 'printf' call.
Result:
The package can be built on Fedora 21.
Note that the suspicious printf call does not affect Net-SNMP security in any way, the compiler just blindly reported an error, while the code was perfectly safe.
Fedora 21 adds "-Werror=format-security" in /usr/lib/rpm/redhat/macros and net-snmp-5.5-50.el6 does not compile there:
SNMP.xs: In function 'XS_SNMP__bulkwalk':
SNMP.xs:4064:11: error: format not a string literal and no format arguments [-Werror=format-security]
warn(str_buf);
^
It would simplify my maintenance work if RHEL6 package compiles on Fedora.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2015-1385.html
Fedora 21 adds "-Werror=format-security" in /usr/lib/rpm/redhat/macros and net-snmp-5.5-50.el6 does not compile there: SNMP.xs: In function 'XS_SNMP__bulkwalk': SNMP.xs:4064:11: error: format not a string literal and no format arguments [-Werror=format-security] warn(str_buf); ^ It would simplify my maintenance work if RHEL6 package compiles on Fedora.