Created attachment 149628 [details] patch I suggest for addition the new stage-qa test 'proxydeps'. What it does: It finds all all dynamic executable dependencies that aren't within the set of immediate package dependencies. Often package maintainers forget to declare dependency packages which are actually directly used by the package. As a result, change in port options, or in dependencies themselves may easily break the package, stripping it of essential dependencies. So it is better to declare all dependencies in the package and not rely on others to declare them. 'proxydeps' check issues warnings and USES suggestions when it finds such situation. It will make package infrastructure more consistent.
over to maintainers.
Created attachment 149732 [details] patch
Created attachment 151513 [details] Updated patch
This patch needs to be modified - need to pass arguments through env. variables. There is also https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199978 that bdrewery@ promised to commit soon, by the end of the week. They have overlapping parts, so should be committed in sequentially. I will update this patch once patch from bug 199978 is committed.
You shouldn't use ldd for this because it is recursive. readelf -d is what you want I think.
Antoine, This is true that ldd is resursive, but resursiveness is solved by -a and the awk script. readelf however doesn't gnerally print the full paths of the dependent libraries. So I would still go with ldd. Updating the patch to the latest one thyat I have. I tested it extensively and find it very useful. I think it should be committed.
Created attachment 170556 [details] patch
Created attachment 170557 [details] patch
A commit references this bug: Author: mat Date: Wed May 25 11:59:40 UTC 2016 New revision: 415827 URL: https://svnweb.freebsd.org/changeset/ports/415827 Log: A new stage-qa test has been added, it reports all shared libraries dependencies that are not part of the port list of dependencies. It help finds what is called proxy dependencies. A is needed by B, and B is needed by C. If C also needs A, then it needs to be registered, and this check will tell you to do so. Right now, it is only reporting the problems, but if you add PROXYDEPS_FATAL=yes to your environment, it will give an error and will force you to fix the dependencies. PR: 195203 Submitted by: yuri rawbw com (earlier version) Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D6531 Changes: head/CHANGES head/Mk/Scripts/qa.sh head/Mk/bsd.port.mk
Something's come up, in bug #213547, wondering why LD_LIBRARY_PATH=${LOCALBASE}/lib is added to ldd's environment. I went to have a look, and I am wondering about it myself :-)
If it helps jog memories, it looks like it was first added in the sequence of patches in attachment 170556 [details] (comment 7). See also comment 6, but there are no specifics regarding the LD_LIBRARY_PATH addition.