Bug 2008781

Summary: net-snmp-5.9.1-11.fc36 FTBFS with OpenSSL 3: transports/snmpTLSBaseDomain.c:59:22: error: static declaration of 'ERR_get_error_all' follows non-static declaration
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: net-snmpAssignee: Josef Ridky <jridky>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jridky, jsafrane, mhjacks, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/net-snmp
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-04 14:23:45 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:
Bug Depends On:    
Bug Blocks: 1992484    

Description Petr Pisar 2021-09-29 07:35:57 UTC
net-snmp-5.9.1-12.fc36 fails to build in Fedora 36:

libtool: compile:  gcc -I../include -I. -I../snmplib -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -We
rror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-str
ong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
 -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pi
pe -Wall -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/
usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Ulinux -Dl
inux=linux -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-sec
urity -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr
/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-s
trict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -c transports/snmpTLSBaseDomain.c  -
fPIC -DPIC -o transports/.libs/snmpTLSBaseDomain.o
transports/snmpTLSBaseDomain.c:59:22: error: static declaration of 'ERR_get_error_all' follows non-static declaration
   59 | static unsigned long ERR_get_error_all(const char **file, int *line,
      |                      ^~~~~~~~~~~~~~~~~
In file included from transports/snmpTLSBaseDomain.c:31:
/usr/include/openssl/err.h:406:15: note: previous declaration of 'ERR_get_error_all' with type 'long unsigned int(const char **, int *, const char **, const char **, int *)'
  406 | unsigned long ERR_get_error_all(const char **file, int *line,
      |               ^~~~~~~~~~~~~~~~~

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/11217786>. This is very probably caused by upgrading OpenSSL from 1:1.1.1k-2.fc35 to 1:3.0.0-1.fc36.

Comment 1 Josef Ridky 2021-10-04 14:23:45 UTC
Fixed in net-snmp-5.9.1-12.fc36 build.