lib dependency confusion

Ryan Schmidt ryandesign at macports.org
Wed Jan 10 20:20:21 UTC 2018


On Jan 10, 2018, at 14:03, Jan Stary wrote:
> 
>  $ port installed depends:libressl
>  None of the specified ports are installed.

This result means: of the ports that specify a dependency containing the substring "libressl", you don't have any installed. 


> Obviously,
> 
>  $ otool -L /opt/local/bin/lynx  | grep ssl
>  /opt/local/lib/libssl.43.dylib (compatibility version 44.0.0, current version 44.2.0)
> 
>  $ port provides /opt/local/lib/libssl.43.dylib
>  /opt/local/lib/libssl.43.dylib is provided by: libressl
> 
> So lynx is among those nstalled depending on openssl,
> which is not even installed (conflicts with libressl of course),
> but not among those dependent on libressl (which is the case).
> Tha can't be right.
> 
> In what way does MP record/recognize tha actual dependency
> of lynx (et al) on libressl? It does somehow, because
> 
>  $ sudo port uninstall libressl
>  Password:
>  Note: It is not recommended to uninstall/deactivate a port that has
>  dependents as it breaks the dependents.
>  The following ports will break:
>  lynx @2.8.8rel.2_3
>  cvs @1.11.23_2
>  kerberos5 @1.16_0
>  curl @7.57.0_2
>  cpuminer @2.5.0_0
>  Continue? [y/N]: 

I have not looked at the code but it seems to me that at port install time, MacPorts records in the registry for that port its list of dependencies. If a dependency is specified in path: style, and maybe also if it is specified in bin: or lib: style, then the dependency that is recorded is the port that is currently providing the specified file. 

So since libressl was the port providing $prefix/lib/libssl.dylib at the time that you installed e.g. lynx, libressl is recorded as a dependency of lynx in your registry. 


More information about the macports-users mailing list