Bug 242332 - net/vde2: missing shared library if net/libpcap is installed during build but removed afterwards
Summary: net/vde2: missing shared library if net/libpcap is installed during build but...
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: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-01 04:01 UTC by Ting-Wei Lan
Modified: 2021-02-19 23:00 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2019-12-01 04:01:29 UTC
The Makefile of net/vde2 includes this line:

LIB_DEPENDS=	libpcap.so:net/libpcap

Since libpcap.so exists in base, it does not pull in any dependency:

===>   vde2-2.3.2_4 depends on shared library: libpcap.so - found (/usr/lib/libpcap.so)

However, vde2 seems to prefer libpcap from ports to the one in base. If libpcap from ports is present in the build environment, vde2 links to it but the dependency isn't registered into pkg. Therefore, it is possible for users to type 'pkg autoremove' to remove libpcap and cause 'pkg check' to show:

vde2 is missing a required shared library: libpcap.so.1
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2020-06-17 10:07:19 UTC
Any proposed patch? Perhaps specify rpath?
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2021-02-19 22:53:25 UTC
Should be fixed by explicitly specifying required shlib version, e.g. LIB_DEPENDS=    libpcap.so.1:net/libpcap

grep libpcap.so in build.log before the change:

===>   vde2-2.3.2_5 depends on shared library: libpcap.so - found (/usr/lib/libpcap.so)
===>   vde2-2.3.2_5 depends on shared library: libpcap.so - found (/usr/lib/libpcap.so)
actual-package-depends: dependency on /usr/lib/libpcap.so not registered (normal if it belongs to base)
actual-package-depends: dependency on /usr/lib/libpcap.so not registered (normal if it belongs to base)
 0x0000000000000001 NEEDED               Shared library: [libpcap.so.8]

After the change:

===>   vde2-2.3.2_5 depends on shared library: libpcap.so.1 - not found
===>   vde2-2.3.2_5 depends on shared library: libpcap.so.1 - found (/usr/local/lib/libpcap.so.1)
===>   vde2-2.3.2_5 depends on shared library: libpcap.so.1 - found (/usr/local/lib/libpcap.so.1)
 0x0000000000000001 NEEDED               Shared library: [libpcap.so.1]
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-02-19 22:53:28 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Feb 19 22:53:07 UTC 2021
New revision: 566105
URL: https://svnweb.freebsd.org/changeset/ports/566105

Log:
  - Fix dependency on ports libpcap by explicitly specifying shlib version

  PR:		242332
  Reported by:	lantw44@gmail.com

Changes:
  head/net/vde2/Makefile
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-02-19 23:00:30 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Feb 19 23:00:19 UTC 2021
New revision: 566106
URL: https://svnweb.freebsd.org/changeset/ports/566106

Log:
  MFH: r566105

  - Fix dependency on ports libpcap by explicitly specifying shlib version

  PR:		242332
  Reported by:	lantw44@gmail.com

Changes:
_U  branches/2021Q1/
  branches/2021Q1/net/vde2/Makefile