Bug 247993 - [patch] net/frr7: Add missing dependencies
Summary: [patch] net/frr7: Add missing dependencies
Status: Closed FIXED
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
Depends on:
Reported: 2020-07-15 11:19 UTC by Renato Botelho
Modified: 2020-07-24 19:05 UTC (History)
2 users (show)

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

patch (590 bytes, patch)
2020-07-15 11:19 UTC, Renato Botelho
no flags Details | Diff
frr7 patch (896 bytes, patch)
2020-07-22 19:37 UTC, Olivier Cochard
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Renato Botelho freebsd_committer 2020-07-15 11:19:24 UTC
Created attachment 216462 [details]

When libunwind is installed, it links vtysh with it but doesn't register the dependency.  Also, if SNMP option is enabled, it complains about missing USES ssl

This patch add these 2 dependencies to make sure package will have it all registered.

Warning: you need USES=ssl
Error: /usr/local/bin/vtysh is linked to /usr/local/lib/libunwind.so.8 from devel/libunw
ind but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libunwind.so:devel/libunwind
Comment 1 Olivier Cochard freebsd_committer 2020-07-22 14:51:56 UTC
(In reply to Renato Botelho from comment #0)

What do you mean by 'when libunwind is installed?'
Because on a clean build system (like with poudriere), this library is not installed, so how vtysh can be linked on it?
I mean: libunwind is not a mandatory library, so why adding this library ?
Comment 2 Renato Botelho freebsd_committer 2020-07-22 16:30:52 UTC
(In reply to Olivier Cochard from comment #1)

If libunwind is installed on a system and user build frr7 port it will link binaries with it without registering dependency.

The other way to get it fixed is to work on frr configure/Makefiles to force them to ignore libunwind even if it's present on builder system.
Comment 3 Olivier Cochard freebsd_committer 2020-07-22 16:57:32 UTC
(In reply to Renato Botelho from comment #2)

Ok, I will do that: I don't like installing useless stuff :-)
Comment 4 Olivier Cochard freebsd_committer 2020-07-22 19:37:51 UTC
Created attachment 216682 [details]
frr7 patch

Here is my proposed patch: could you check if it suit you?
Comment 5 Renato Botelho freebsd_committer 2020-07-23 11:20:03 UTC
(In reply to Olivier Cochard from comment #4)
It did the trick and libunwind was not used.  Thank you!
Comment 6 commit-hook freebsd_committer 2020-07-23 20:16:35 UTC
A commit references this bug:

Author: olivier
Date: Thu Jul 23 20:16:31 UTC 2020
New revision: 542959
URL: https://svnweb.freebsd.org/changeset/ports/542959

  - Update to 7.4
  - Prepare to add frr-pythontools
  - Fix some dependencies

  PR:		247993
  Reported by:	garga

Comment 7 Olivier Cochard freebsd_committer 2020-07-23 20:17:16 UTC
Thanks for your patch!
Comment 8 Juraj Lutter freebsd_committer 2020-07-24 13:21:06 UTC
Only a side note: FRR 7.4 segfaults upon startup. I'm in process of debugging the crash as it made a very non-pleasant surprise to me.
Comment 9 Olivier Cochard freebsd_committer 2020-07-24 14:26:01 UTC
(In reply to Juraj Lutter from comment #8)

You are the second person that is reporting this problem.
I didn't notice this behaviour during my own regression tests.
I'm using the "intergrated config" (frr_vtysh_boot=yes) mode, are you using the old way ? (one configuration file per daemons)
Comment 10 Juraj Lutter freebsd_committer 2020-07-24 14:31:00 UTC
Yes, I use the old way without watchfrr and without integrated config.

I will do the tests in a separate environment (to not shutdown the BGP session I rely on).
Comment 11 Olivier Cochard freebsd_committer 2020-07-24 16:31:31 UTC
I've created this issue on the FRR github, if you have more data to add, feel free to comment it:
Comment 12 Kurt Jaeger freebsd_committer 2020-07-24 17:29:03 UTC
Please note I see the same problem with frr7.4 crashing, on 12.1p7, amd64.
Comment 13 Kurt Jaeger freebsd_committer 2020-07-24 19:05:03 UTC
Thanks to the slack channel see
for a fix.