Bug 1309080 - net-snmp-config specifies redhat-hardened-cc1 in cflags and causes gcc failure without redhat-rpm-config
Summary: net-snmp-config specifies redhat-hardened-cc1 in cflags and causes gcc failur...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: net-snmp
Version: 23
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jan Safranek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-16 19:20 UTC by George Joseph
Modified: 2016-02-24 11:31 UTC (History)
2 users (show)

Fixed In Version: net-snmp-5.7.3-9.fc24
Clone Of:
Environment:
Last Closed: 2016-02-24 11:31:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.