Bug 1309080

Summary: net-snmp-config specifies redhat-hardened-cc1 in cflags and causes gcc failure without redhat-rpm-config
Product: [Fedora] Fedora Reporter: George Joseph <g.devel>
Component: net-snmpAssignee: Jan Safranek <jsafrane>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 23CC: jsafrane, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: net-snmp-5.7.3-9.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-24 11:31:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description George Joseph 2016-02-16 19:20:23 UTC
Description of problem:

net-snmp-config --cflags returns 
"-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1" but if redhat-rpm-config isn't installed, compilation will fail because redhat-hardened-cc1 won't be found.

It should be up to the developer whether a hardened build is required for their app even if the net-snmp packages were built hardened.

Version-Release number of selected component (if applicable):

net-snmp-devel-1:5.7.3-7.fc23.x86_64

How reproducible:

Constant

Steps to Reproduce:
1. run net-snmp-config --cflags without redhat-rpm-config installed
2. try to compile a stub program
3.

Actual results:

-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_RPM_4_4_COMPAT -Wformat -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I. -I/usr/include
gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

Expected results:

-DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_RPM_4_4_COMPAT -Wformat -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I. -I/usr/include

No -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1

Additional info:

Comment 1 Jan Safranek 2016-02-24 11:31:35 UTC
net-snmp-config --cflags now does not report any flags used to compile net-snmp. I'll update F24 and rawhide.