Bug 275252 - net/frr9: snmp issue Undefined symbol "netsnmp_enable_subagent"
Summary: net/frr9: snmp issue Undefined symbol "netsnmp_enable_subagent"
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Olivier Cochard
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-22 03:01 UTC by Yif Swery
Modified: 2023-12-06 00:00 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yif Swery 2023-11-22 03:01:35 UTC
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
Comment 1 Olivier Cochard freebsd_committer freebsd_triage 2023-11-29 19:16:16 UTC
I'm not a makefile/linker expert, and no idea where this bug came from.
I've asked help to the FRR community.
Comment 2 Olivier Cochard freebsd_committer freebsd_triage 2023-12-06 00:00:50 UTC
FRR dev is working on:
https://github.com/FRRouting/frr/issues/14875