Detect opportunistic linking and unnecessary dependencies
ryandesign at macports.org
Fri Feb 15 20:51:01 PST 2013
It would be great if MacPorts would automatically detect dependency problems when installing ports.
For example, if a port links with a library but does not declare a dependency on it, I'd love to see a warning:
Warning: /opt/local/bin/foo links with /opt/local/lib/libbar.dylib but port foo does not declare a library dependency on port bar
Conversely, how about a warning when a library dependency is declared but that port is not actually linked with:
Warning: none of the files installed by port foo link with any of the libraries installed by library dependency bar
This is more problematic to implement because some ports open libraries via dlopen (i.e. wine), and things like python modules don't link with the other modules they depend on either. But on the other hand it's also important to have this check, because I really want to be able to easily find all the ports to which we've added unnecessary library dependencies over the years due to the glibtool overlinking problem that we've now corrected in base.
More information about the macports-dev