Bug 228159 - net/frr: does not compile with SNMP support
Summary: net/frr: does not compile with SNMP support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Olivier Cochard
URL: https://github.com/FRRouting/frr/issu...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-11 14:07 UTC by Alexey
Modified: 2018-07-06 07:39 UTC (History)
2 users (show)

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 Alexey 2018-05-11 14:07:48 UTC
Hello.
As you know, FRRouting does not compile with SNMP support and the description of this problem is on https://github.com/FRRouting/frr/issues/1617

I found a solution to this problem, but it affects another port: net-mgmt/net-snmp .

We need install this port with some option USE_CSTD.

make USE_CSTD=gnu99 install clean
Comment 1 Olivier Cochard freebsd_committer freebsd_triage 2018-05-11 15:10:48 UTC
Wow, thanks for your debug session !

net-mgmt/net-snmp/Makefile specifically include this line:
USE_CSTD=       c99

Original commit:
https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/Makefile?r1=377525&r2=377741

I need to ask to their authors why this specific CSTD usage before asking a net-snmp port modification
Comment 2 Alexey 2018-06-04 16:47:48 UTC
Hello. 
Frr created patch that fix compilation with snmp support.

https://github.com/FRRouting/frr/pull/2355

https://patch-diff.githubusercontent.com/raw/FRRouting/frr/pull/2355.diff
Comment 3 Olivier Cochard freebsd_committer freebsd_triage 2018-06-04 18:56:20 UTC
Wow, thanks!

I just need to check why libtool is adding -lpkg, generating this alarm:

====> Running Q/A tests (stage-qa)
Warning: you need USES=ssl
Error: /usr/local/lib/frr/modules/bgpd_snmp.so is linked to /usr/local/lib/libpkg.so.4 from ports-mgmt/pkg but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libpkg.so:ports-mgmt/pkg
Comment 4 Alexey 2018-06-04 20:02:16 UTC
Can you also disable RPKI option by default and enable FPM by default.
RPKI need only when we compile with BGP option.
Comment 5 Alexey 2018-06-11 21:42:19 UTC
There was a release with fixes this error and other corrections.
https://github.com/FRRouting/frr/releases
Comment 6 Olivier Cochard freebsd_committer freebsd_triage 2018-06-28 23:53:29 UTC
I'm working on net/frr5 that allows to build SNMP modules.
I need to check that regressions introduced into FRR 4.0 are fixed on 5.0 before to commit this port.
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-07-06 07:36:53 UTC
A commit references this bug:

Author: olivier
Date: Fri Jul  6 07:36:10 UTC 2018
New revision: 473998
URL: https://svnweb.freebsd.org/changeset/ports/473998

Log:
  New port: net/frr5 (5.0.1).

  PR:		229397
  Reported by: 	pi
  Sponsored by:	Orange

  Fix build with SNMP option.

  PR:		228159
  Reported by:	pautina@kharkiv.net

  Fix crash with gif/tun/gre interface.

  PR:		228643
  Reported by:	mike@sentex.net

Changes:
  head/net/Makefile
  head/net/frr3/Makefile
  head/net/frr4/Makefile
  head/net/frr5/
  head/net/frr5/Makefile
  head/net/frr5/distinfo
  head/net/frr5/files/patch-Makefile.am
  head/net/frr5/files/patch-configure.ac
  head/net/frr5/files/patch-lib_vty.h
  head/net/frr5/files/patch-zebra_ioctl.c
  head/net/frr5/pkg-message
  head/net/frr5/pkg-plist
  head/net/quagga/Makefile
Comment 8 Olivier Cochard freebsd_committer freebsd_triage 2018-07-06 07:39:35 UTC
New net/frr5 (5.0.1) should resolve your problem.