Bug 2004351

Summary: net-snmp: FTBFS due to use of ERR_GET_FUNC (which was removed from OpenSSL) - F35+
Product: [Fedora] Fedora Reporter: Josef Ridky <jridky>
Component: net-snmpAssignee: Josef Ridky <jridky>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: bstinson, efedin, fweimer, jridky, jsafrane, jwboyer, mhjacks, zdohnal
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2001430 Environment:
Last Closed: 2021-09-15 07:13:47 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: 2001430    
Bug Blocks:    

Description Josef Ridky 2021-09-15 05:51:07 UTC
+++ This bug was initially created as a clone of Bug #2001430 +++

During the a rebuild of net-snmp-5.9.1-6.el9, the sources try to use the non-existing ERR_GET_FUNC function:

snmp_openssl.c: In function 'netsnmp_openssl_err_log':
snmp_openssl.c:949:36: warning: implicit declaration of function 'ERR_GET_FUNC'; did you mean 'ERR_GET_LIB'? [-Wimplicit-function-declaration]
  949 |                  ERR_GET_LIB(err), ERR_GET_FUNC(err), ERR_GET_REASON(err));
      |                                    ^~~~~~~~~~~~
      |                                    ERR_GET_LIB

This leads to a link failure later:

/usr/bin/ld: /tmp/ccKI9GVH.ltrans6.ltrans.o: in function `netsnmp_openssl_err_log':
/builddir/build/BUILD/net-snmp-5.9.1/snmplib/snmp_openssl.c:948: undefined reference to `ERR_GET_FUNC'
/usr/bin/ld: /builddir/build/BUILD/net-snmp-5.9.1/snmplib/snmp_openssl.c:948: undefined reference to `ERR_GET_FUNC'

The function has been removed without a replacement because function numbers have been removed from OpenSSL. It should be sufficient to adjust the error reporting so that the function number is no longer included.

--- Additional comment from Josef Ridky on 2021-09-10 09:23:27 CEST ---

Fixed in upstream https://github.com/net-snmp/net-snmp/issues/343