Bug 243854 - net-mgmt/net-snmp: Failed: build
Summary: net-mgmt/net-snmp: Failed: build
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-03 21:17 UTC by Danny McGrath
Modified: 2020-09-12 13:02 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (zi)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny McGrath 2020-02-03 21:17:32 UTC
Seems I can't get net-snmp-5.7.3_20,1 to build for 11.3. I have pasted the most relevant/obvious logs. Any ideas?

keytools.c:155:24: error: invalid application of 'sizeof' to an incomplete type 'EVP_MD_CTX' (aka 'struct evp_md_ctx_st')
    ctx = malloc(sizeof(*ctx));
                       ^~~~~~
/usr/local/include/openssl/ossl_typ.h:92:16: note: forward declaration of 'struct evp_md_ctx_st'
typedef struct evp_md_ctx_st EVP_MD_CTX;
               ^
keytools.c:265:9: warning: implicit declaration of function 'EVP_MD_CTX_cleanup' is invalid in C99 [-Wimplicit-function-declaration]
        EVP_MD_CTX_cleanup(ctx);
        ^
1 warning and 1 error generated.
*** Error code 1

Stop.
make[2]: stopped in /wrkdirs/usr/ports/net-mgmt/net-snmp/work/net-snmp-5.7.3/snmplib
*** Error code 1
Comment 1 Ryan Steinmetz freebsd_committer freebsd_triage 2020-02-09 01:21:59 UTC
What's in your make.conf?

What OPTIONS do you have set for the port?
Comment 2 Danny McGrath 2020-02-09 02:10:01 UTC
About the only things that I would think are relevant would be:

OPTIONS_SET+= ZTS GSSAPI_NONE
OPTIONS_UNSET+= CUPS DBUS X11 DOCBOOK EXAMPLES KERBEROS PERFSCHEMA PERFSCHM GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT WAYLAND OPENGL XCB
DEFAULT_VERSIONS+= ssl=openssl
net-mgmt_zabbix4-proxy_UNSET+= PGSQL MYSQL
net-mgmt_zabbix4-proxy_SET+= SQLITE

I can only assume something with OpenSSL, and there were some peculiar OpenSSL 1.1.1d issues recently. Ideas?
Comment 3 Danny McGrath 2020-02-18 03:28:04 UTC
I had a chance do some some tests in a VM on fresh 11.3, and it appears that ssl=base and ssl=libressl build fine, as does an empty make.conf. It is specifically only ssl=openssl (and otherwise empty make.conf) that is failing.

Hopefully this helps.
Comment 4 Danny McGrath 2020-02-18 03:49:50 UTC
(In reply to Danny McGrath from comment #3)

This test was against 2020Q1, btw.

Also interesting was that I was able to just compile fine against the same version in head.

A quick look at the diff between 2020Q1 and head shows:

svn diff https://svn.freebsd.org/ports/branches/2020Q1/net-mgmt/net-snmp  https://svn.freebsd.org/ports/head/net-mgmt/net-snmp
Index: Makefile
===================================================================
--- Makefile    (.../branches/2020Q1/net-mgmt/net-snmp) (revision 526437)
+++ Makefile    (.../head/net-mgmt/net-snmp)    (revision 526437)
@@ -74,7 +74,7 @@
 
 .include <bsd.port.options.mk>
 
-.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
+.if (${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085) || ${SSL_DEFAULT:Mopenssl}
 EXTRA_PATCHES= ${PATCHDIR}/extra-patch-openssl11
 .endif
 
@@ -249,7 +249,7 @@
            ${WRKSRC}/agent/mibgroup/host/hr_system.c
        @${REINPLACE_CMD} -E -e 's|return pci_lookup_name|disabled broken|g' \
                ${WRKSRC}/configure
-.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
+.if (${OPSYS} == FreeBSD && ${OSVERSION} >= 1200085) || ${SSL_DEFAULT:Mopenssl}
        @${REINPLACE_CMD} -E -e 's|SSL_library_init|OPENSSL_init_ssl|g' \
                ${WRKSRC}/configure
 .endif


I do recall that there was a change over for the package that renamed the openssl111 package back to openssl, if that helps.
Comment 5 Danny McGrath 2020-02-18 04:13:12 UTC
A quick recompile with the head changes applied to 2020Q1 seems to work here. Any chance this can be merged to 2020Q1? It is currently holding up some zabbix-proxy ports for me, and I prefer not to edit upstream, if I can help it.