Bug 262976 - libpcap.so:net/libpcap will use libpcap from base
Summary: libpcap.so:net/libpcap will use libpcap from base
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-01 10:33 UTC by Mikael Urankar
Modified: 2022-08-15 12:10 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2022-04-01 10:33:29 UTC
Several ports have LIB_DEPENDS= libpcap.so:net/libpcap in their Makefile, probably with the intent to use libpcap from ports but it'll use libpcap from the base system, example:

https://cgit.freebsd.org/ports/tree/graphics/pcl-pointclouds/Makefile#n33
pcl-pointclouds-1.12.1_1 depends on shared library: libpcap.so - found (/usr/lib/libpcap.so)

Can you check your port and fix or remove the dependency if libpcap from base is good enough?
If you really need libpcap from ports you can use the following:
XXX_DEPENDS= ${LOCALBASE}/lib/libpcap.a:net/libpcap
or
XXX_DEPENDS= libpcap.so.1:net/libpcap

The affected ports are:
graphics/pcl-pointclouds
security/snort
security/arpCounterattack
security/snort3
net/addrwatch
net/ipdecap
net/ipgrab
net/ngrep
net/libdaq
dns/dnsjit
net-mgmt/tcpreplay
net-mgmt/yaf
net-mgmt/nfdump
dns/dsc

Thanks
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-04-01 18:01:39 UTC
(In reply to Mikael Urankar from comment #0)

> XXX_DEPENDS= libpcap.so.1:net/libpcap

When there's no such line but the port net/libpcap is installed applications would likely still use port-installed libpcap.so which would potentially cause undesirable difference in behavior or instability.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-04-02 10:15:55 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=09c1b249afd16f2d95f3dadce0a23d665050cc35

commit 09c1b249afd16f2d95f3dadce0a23d665050cc35
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2022-04-02 10:15:04 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2022-04-02 10:15:04 +0000

    net-mgmt/tcpreplay: properly depend on ports libpcap

    This port offers a non-default option to use net/libpcap instead of the
    one from base.

    If that option is chosen specifically specify the shared object version
    in order to link against libpcap from ports.

    PR:             262976
    Reported by:    mikael

 net-mgmt/tcpreplay/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2022-05-09 14:03:37 UTC
Transferring assignment to bug author since no changes on libpcap port itself is expected