Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol "netsnmp_enable_subagent" #14875

Open
2 tasks done
zappiehost opened this issue Nov 26, 2023 · 6 comments
Open
2 tasks done

Undefined symbol "netsnmp_enable_subagent" #14875

zappiehost opened this issue Nov 26, 2023 · 6 comments
Labels
triage Needs further investigation

Comments

@zappiehost
Copy link

zappiehost commented Nov 26, 2023


Describe the bug

  • Did you check if this is a duplicate issue?
  • Did you test it on the latest FRRouting/frr master branch?

To Reproduce

  1. Compile the latest FRR from git (9.0.1) in FreeBSD
  2. Follow the instructions to compile latest FRR (9.0.1) from here: https://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-freebsd14.html
  3. make sure to add the --with-snmp=agentx into your ./configure
  4. gmake && gmake install
  5. Confirm FRR was build with snmp by running bgpd -v and looking for the --enable-snmp
  6. execute bgpd -M snmp to replicate the fatal error
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"

Expected behavior

I expect that FRR will start up without lib and .so files missing.

Screenshots

Screenshot 2023-11-26 at 7 55 14 PM

Versions

  • OS Version: FreeBSD14
  • FRR Version: 9.0.1 (master branch from git)

Additional context
This has been an issue in OpenSense and PfSense and also FreeBSD ports when trying to enable SNMP with frr

@zappiehost zappiehost added the triage Needs further investigation label Nov 26, 2023
@donaldsharp
Copy link
Member

the Equivalent package on debian is libsnmp-dev that you are missing. I would suggest you figure out what the equivalent package is on freebsd and install it as well. I do not have a equivalent freebsd-14 vm at this point in time to do any type of experimenting to help you out

@zappiehost
Copy link
Author

Thanks for the reply @donaldsharp

I have (and always did) have the net-snmp package installed on the FreeBSD system prior to compiling FRR with snmp support.

If I tried to compile FRRwithout net-snmp (which has libsnmp) the FRR compiler would complain on the ./configure dependancy check.

Is there anything I can help test to get this working as both our routers running PfSense and OpenSense have these issues with FRR (both being on FreeBSD)

Thanks!

@rwgbsd
Copy link
Contributor

rwgbsd commented Dec 5, 2023

I have replicated this locally. It looks as if we need an additional .so pulled in to resolve the symbol "netsnmp_enable_subagent". It is starting to look like they split out the agentx stuff into a seperate lib as this support is optional. This bug may affect other operating systems, which I shall also investigate.

@zappiehost
Copy link
Author

I have replicated this locally. It looks as if we need an additional .so pulled in to resolve the symbol "netsnmp_enable_subagent". It is starting to look like they split out the agentx stuff into a seperate lib as this support is optional. This bug may affect other operating systems, which I shall also investigate.

How did you searching go @rwgbsd Did you find what package might be missing in order to get FRR with SNMP to work?

@rwgbsd
Copy link
Contributor

rwgbsd commented Dec 14, 2023

How did you searching go @rwgbsd Did you find what package might be missing in order to get FRR with SNMP to work?

This is not a matter of a missing pacakge, net-snmp infact includes a library file with the netsnmp_enable_subagent" defined, but the frr compile code is not pulling in that library for some reason. Either the net-snmp package has changed or this has been broken for a very long time.

I did not have time this past week to get back to this, hopefully I can atleast find out how wide spread the breakage is soon. Is anyone out there successfully running frr with net-snmp on ANY platform? Debian? Ubuntu?

@zappiehost
Copy link
Author

That makes sense @rwgbsd

Did you by chance manage to find what (and where) is missing for the libs and might need to be pulled differently in to make SNMP with FRR?

I can replicate this issue on Debain 12 with latest src from git (followed this guide: https://docs.frrouting.org/projects/dev-guide/en/latest/building-frr-for-debian12.html#install-required-packages)

root@debain12:/tmp/frr# ./bgpd/bgpd -v
bgpd version 9.2-dev
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
	'--localstatedir=/var/opt/frr' '--sbindir=/usr/lib/frr' '--sysconfdir=/etc/frr' '--enable-multipath=64' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' '--enable-fpm' '--with-snmp=agentx'
root@debain12:/tmp/frr# ./bgpd/bgpd -M snmp
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/bgpd_snmp.so): /usr/local/lib/frr/modules/bgpd_snmp.so: cannot open shared object file: No such file or directory
frr_init: loader error: dlopen(/usr/local/lib/frr/modules/snmp.so): /usr/local/lib/frr/modules/snmp.so: cannot open shared object file: No such file or directory
frr_init: loader error: dlopen(snmp): snmp: cannot open shared object file: No such file or directory
root@debain12:/tmp/frr# ls -lsa  /usr/local/lib/frr/modules/
total 3376
   4 drwxr-xr-x 2 root root    4096 Jan 23 22:41 .
   4 drwxr-xr-x 3 root root    4096 Jan 23 22:41 ..
   4 -rwxr-xr-x 1 root root     992 Jan 23 22:41 dplane_fpm_nl.la
 192 -rwxr-xr-x 1 root root  195344 Jan 23 22:41 dplane_fpm_nl.so
   4 -rwxr-xr-x 1 root root     974 Jan 23 22:41 pathd_pcep.la
2568 -rwxr-xr-x 1 root root 2626064 Jan 23 22:41 pathd_pcep.so
   4 -rwxr-xr-x 1 root root    1022 Jan 23 22:41 zebra_cumulus_mlag.la
  60 -rwxr-xr-x 1 root root   58072 Jan 23 22:41 zebra_cumulus_mlag.so
   4 -rwxr-xr-x 1 root root    1040 Jan 23 22:41 zebra_fpm.la
 292 -rwxr-xr-x 1 root root  295424 Jan 23 22:41 zebra_fpm.so
   4 -rwxr-xr-x 1 root root     974 Jan 23 22:41 zebra_irdp.la
 236 -rwxr-xr-x 1 root root  237864 Jan 23 22:41 zebra_irdp.so

@zappiehost zappiehost changed the title Undefined symbol "netsnmp_enable_subagent" on FreeBSD14 Undefined symbol "netsnmp_enable_subagent" Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

3 participants