[Bug 275252] net/frr9: snmp issue Undefined symbol "netsnmp_enable_subagent"

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 22 Nov 2023 03:01:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275252

            Bug ID: 275252
           Summary: net/frr9: snmp issue Undefined symbol
                    "netsnmp_enable_subagent"
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: olivier@freebsd.org
          Reporter: yiftachswr@gmail.com
             Flags: maintainer-feedback?(olivier@freebsd.org)
          Assignee: olivier@freebsd.org

When installing on a fresh FreeBSD 14 machine FRR9 (or FRR8) it seems that the
snmp is broken:

```
root@freebsd-14:/usr/ports/net/frr9 # /usr/local/sbin/bgpd -v
bgpd version 9.0.1
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
        '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty'
'--enable-vtysh' '--disable-doc-html' '--sysconfdir=/usr/local/etc/frr'
'--localstatedir=/var/run/frr' '--disable-nhrpd' '--disable-pathd'
'--disable-ospfclient' '--disable-pimd' '--disable-pbrd'
'--with-vtysh-pager=cat' '--enable-backtrace' '--disable-config-rollbacks'
'--disable-datacenter' '--enable-fpm' '--disable-ldpd' '--without-libpam'
'--enable-rpki' '--disable-sharpd' '--disable-shell-access' '--enable-snmp'
'--disable-tcmalloc' '--prefix=/usr/local' '--mandir=/usr/local/man'
'--disable-silent-rules' '--infodir=/usr/local/share/info/'
'--build=amd64-portbld-freebsd14.0' 'build_alias=amd64-portbld-freebsd14.0'
'PKG_CONFIG=pkgconf'
'PKG_CONFIG_LIBDIR=/usr/ports/net/frr9/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig'
'CC=cc' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing '
'LDFLAGS= -L/usr/local/lib -L/usr/local/lib -fstack-protector-strong ' 'LIBS='
'CPPFLAGS=-I/usr/local/include -I/usr/local/include' 'CPP=cpp' 'CXX=c++'
'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing '
'PYTHON=/usr/local/bin/python3.9'
```

but when trying to run FRR with snmp module on we see the following errors:

```
root@freebsd-14:/usr/ports/net/frr9 # bgpd -M snmp
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/bgpd_snmp.so):
/usr/local/lib/libfrrsnmp.so.0: Undefined symbol "netsnmp_enable_subagent"
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/snmp.so): Cannot open
"/usr/local/lib/frr/modules/snmp.so"
frr_init: loader error: dlopen(snmp): Shared object "snmp" not found, required
by "bgpd"
```

This issue is also mentioned here: 
- OpenSense: https://github.com/opnsense/ports/issues/179
- PfSense: https://redmine.pfsense.org/issues/14491#change-68711

-- 
You are receiving this mail because:
You are the assignee for the bug.