Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1006511: net-snmp: FTBFS with OpenSSL 3.0

90 views
Skip to first unread message

Sebastian Andrzej Siewior

unread,
Feb 26, 2022, 10:50:04 AM2/26/22
to
Source: net-snmp
Version: 5.9.1+dfsg-1
Severity: important
Tags: bookworm sid
User: pkg-open...@lists.alioth.debian.org
Usertags: ftbfs-3.0

Your package is failing to build using OpenSSL 3.0 with the
following error:

| 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,
| | ^~~~~~~~~~~~~~~~~
| transports/snmpTLSBaseDomain.c: In function ‘ERR_get_error_all’:
| transports/snmpTLSBaseDomain.c:64:5: warning: ‘ERR_get_error_line_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
| 64 | return ERR_get_error_line_data(file, line, data, flags);
| | ^~~~~~
| In file included from transports/snmpTLSBaseDomain.c:31:
| /usr/include/openssl/err.h:413:15: note: declared here
| 413 | unsigned long ERR_get_error_line_data(const char **file, int *line,
| | ^~~~~~~~~~~~~~~~~~~~~~~
| make[3]: *** [Makefile:101: transports/snmpTLSBaseDomain.lo] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>/snmplib'

For more information see:
https://www.openssl.org/docs/man3.0/man7/migration_guide.html

Sebastian

Craig Small

unread,
Feb 28, 2022, 5:50:03 AM2/28/22
to
On Sun, 27 Feb 2022 at 02:42, Sebastian Andrzej Siewior <seba...@breakpoint.cc> wrote:
| 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,
|       |               ^~~~~~~~~~~~~~~~~
This should not be compiled because HAVE_ERR_GET_ERROR_ALL should be defined (so it's skipped over) Looks like the configure script is not picking it up.
It looks like the test program does not include openssl/err.h which means it fails. AC_CHECK_FUNC doesn't include additional headers, which is why this isn't working.

| transports/snmpTLSBaseDomain.c: In function ‘ERR_get_error_all’:
| transports/snmpTLSBaseDomain.c:64:5: warning: ‘ERR_get_error_line_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
|    64 |     return ERR_get_error_line_data(file, line, data, flags);
|       |     ^~~~~~
| In file included from transports/snmpTLSBaseDomain.c:31:
| /usr/include/openssl/err.h:413:15: note: declared here
|   413 | unsigned long ERR_get_error_line_data(const char **file, int *line,
|       |               ^~~~~~~~~~~~~~~~~~~~~~~
| make[3]: *** [Makefile:101: transports/snmpTLSBaseDomain.lo] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>/snmplib

At the very least I'll just remove the code within the ifndef as its a *backport* of the OpenSSL 1.1.1e function.
I'll look at https://stackoverflow.com/questions/63942436/determining-openssl-version-with-ifdef or something like that to properly check the result.

 - Craig
 

Sergio Durigan Junior

unread,
Jun 7, 2022, 10:50:03 PM6/7/22
to
Control: tags -1 + patch

On Monday, June 06 2022, I wrote:

> On Sunday, May 15 2022, Craig Small wrote:
>
>> Upstream should have a new version of net-snmp that compiles with
>> OpenSSL v3.0 in May. I've tested the RC1 release and it compiles
>> fine.
>>
>> https://sourceforge.net/p/net-snmp/mailman/message/37642006/
>
> FWIW, Ubuntu's net-snmp has been using the following two patches
> (backported from upstream) in order to fix the FTBFS with openssl 3.0:
>
> https://git.launchpad.net/ubuntu/+source/net-snmp/tree/debian/patches/lp1945960-Fix-the-build-against-OpenSSL-3.0.patch
>
> https://git.launchpad.net/ubuntu/+source/net-snmp/tree/debian/patches/lp1945960-configure-static-linking-Fix-SSL-checks.patch
>
> If you'd like I can submit an MR/debdiff with these backports for Debian
> as well.

Craig asked me to file the MR, so here it is:

https://salsa.debian.org/debian/net-snmp/-/merge_requests/12

Cheers,

--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/
signature.asc
0 new messages