[Pkg-openssl-devel] Bug#1138373: net-snmp: FTBFS with openssl 4.0

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Sat May 30 17:02:49 BST 2026


Package: net-snmp
Version: 5.9.5.2+dfsg-2.1
Severity: normal
Tags: sid
control: affects -1 src:openssl
User: pkg-openssl-devel at lists.alioth.debian.org
Usertags: openssl-4.0

OpenSSL 4.0 is in experimental. This package fails to build against it:

| libtool: compile:  gcc -I../include -I. -I../snmplib -I/usr/include/libnl3 -I/usr/include/libnl3 -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/net-snmp-5.9.5.2+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -DNETSNMP_USE_INLINE -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -DNETSNMP_REMOVE_U64 -g -O2 -ffile-prefix-map=/build/reproducible-path/net-snmp-5.9.5.2+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -fcf-protection -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.40/CORE -c snmp_openssl.c  -fPIC -DPIC -o .libs/snmp_openssl.o
| snmp_openssl.c: In function '_cert_get_name':
| snmp_openssl.c:157:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   157 |     osubj_name = X509_get_subject_name(ocert);
|       |                ^
| snmp_openssl.c: In function 'netsnmp_openssl_cert_get_subjectName':
| snmp_openssl.c:197:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   197 |     osubj_name = X509_get_subject_name(ocert);
|       |                ^
| snmp_openssl.c: In function 'netsnmp_openssl_cert_dump_names':
| snmp_openssl.c:245:16: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   245 |     osubj_name = X509_get_subject_name(ocert);
|       |                ^
| snmp_openssl.c:252:21: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   252 |         oname_entry = X509_NAME_get_entry(osubj_name, i);
|       |                     ^
| snmp_openssl.c:254:21: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   254 |         oname_value = X509_NAME_ENTRY_get_data(oname_entry);
|       |                     ^
| snmp_openssl.c:256:24: error: invalid use of incomplete typedef 'ASN1_STRING' {aka 'struct asn1_string_st'}
|   256 |         if (oname_value->type != V_ASN1_PRINTABLESTRING)
|       |                        ^~
| In file included from ../include/net-snmp/output_api.h:58,
|                  from ../include/net-snmp/library/snmp_client.h:32,
|                  from ../include/net-snmp/varbind_api.h:102,
|                  from ../include/net-snmp/library/snmp_api.h:33,
|                  from ../include/net-snmp/types.h:433,
|                  from ../include/net-snmp/definitions.h:22,
|                  from ../include/net-snmp/net-snmp-includes.h:24,
|                  from snmp_openssl.c:17:
| snmp_openssl.c:271:31: error: invalid use of incomplete typedef 'ASN1_STRING' {aka 'struct asn1_string_st'}
|   271 |                    oname_value->type));
|       |                               ^~
| ../include/net-snmp/library/snmp_debug.h:147:40: note: in definition of macro '__DBGMSGT'
|   147 | #define __DBGMSGT(x)     debugmsgtoken x,  debugmsg x
|       |                                        ^
| snmp_openssl.c:269:9: note: in expansion of macro 'DEBUGMSGT'
|   269 |         DEBUGMSGT(("9:cert:dump:names",
|       |         ^~~~~~~~~
| snmp_openssl.c:271:31: error: invalid use of incomplete typedef 'ASN1_STRING' {aka 'struct asn1_string_st'}
|   271 |                    oname_value->type));
|       |                               ^~
| ../include/net-snmp/library/snmp_debug.h:147:53: note: in definition of macro '__DBGMSGT'
|   147 | #define __DBGMSGT(x)     debugmsgtoken x,  debugmsg x
|       |                                                     ^
| snmp_openssl.c:269:9: note: in expansion of macro 'DEBUGMSGT'
|   269 |         DEBUGMSGT(("9:cert:dump:names",
|       |         ^~~~~~~~~
| snmp_openssl.c: In function '_cert_get_extension_at':
| snmp_openssl.c:338:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   338 |     oext = X509_get_ext(ocert,pos);
|       |          ^
| snmp_openssl.c: In function '_cert_get_extension_str_at':
| snmp_openssl.c:362:10: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   362 |     oext = X509_get_ext(ocert,pos);
|       |          ^
| snmp_openssl.c: In function '_extract_oname':
| snmp_openssl.c:437:35: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   437 |             if (oname->d.iPAddress->length == 4) {
|       |                                   ^~
| snmp_openssl.c:438:65: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   438 |                 sprintf(ipbuf, "%d.%d.%d.%d", oname->d.iPAddress->data[0],
|       |                                                                 ^~
| snmp_openssl.c:439:43: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   439 |                         oname->d.iPAddress->data[1],
|       |                                           ^~
| snmp_openssl.c:440:43: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   440 |                         oname->d.iPAddress->data[2],
|       |                                           ^~
| snmp_openssl.c:441:43: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   441 |                         oname->d.iPAddress->data[3]);
|       |                                           ^~
| snmp_openssl.c:444:41: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   444 |             else if ((oname->d.iPAddress->length == 16) ||
|       |                                         ^~
| snmp_openssl.c:445:41: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   445 |                      (oname->d.iPAddress->length == 20)) {
|       |                                         ^~
| snmp_openssl.c:448:50: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   448 |                 for(j = 0; j < oname->d.iPAddress->length; ++j) {
|       |                                                  ^~
| In file included from ../include/net-snmp/utilities.h:37,
|                  from ../include/net-snmp/net-snmp-includes.h:28:
| snmp_openssl.c:449:56: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   449 |                     *pos++ = VAL2HEX(oname->d.iPAddress->data[j]);
|       |                                                        ^~
| ../include/net-snmp/library/tools.h:98:28: note: in definition of macro 'VAL2HEX'
|    98 | #define VAL2HEX(s)      ( (s) + (((s) >= 10) ? ('a'-10) : '0') )
|       |                            ^
| snmp_openssl.c:449:56: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   449 |                     *pos++ = VAL2HEX(oname->d.iPAddress->data[j]);
|       |                                                        ^~
| ../include/net-snmp/library/tools.h:98:36: note: in definition of macro 'VAL2HEX'
|    98 | #define VAL2HEX(s)      ( (s) + (((s) >= 10) ? ('a'-10) : '0') )
|       |                                    ^
| In file included from ../include/net-snmp/output_api.h:179:
| snmp_openssl.c:457:42: error: invalid use of incomplete typedef 'ASN1_OCTET_STRING' {aka 'struct asn1_string_st'}
|   457 |                        oname->d.iPAddress->length));
|       |                                          ^~
| ../include/net-snmp/library/snmp_logging.h:41:22: note: in definition of macro 'NETSNMP_LOGONCE'
|    41 |             snmp_log x ;        \
|       |                      ^
| snmp_openssl.c: In function 'netsnmp_openssl_cert_dump_extensions':
| snmp_openssl.c:505:19: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   505 |         extension = X509_get_ext(ocert, i);
|       |                   ^
| make[3]: *** [Makefile:101: snmp_openssl.lo] Error 1


Full buildlog
 	https://breakpoint.cc/openssl-rebuild/logs-4/attempted/net-snmp_5.9.5.2+dfsg-2.1_amd64-2026-04-19T13:35:36Z

Sebastian



More information about the Pkg-openssl-devel mailing list