Questions on dependencies

Joshua Root jmr at macports.org
Fri Nov 1 15:25:09 PDT 2013


On 2013-11-2 02:27 , Clemens Lang wrote:
> Hi,
> 
> On Fri, Nov 01, 2013 at 10:27:04AM +1100, Joshua Root wrote:
>> If they are needed at build time and runtime, use depends_lib. If they
>> are only needed at runtime, use depends_run.
> 
> is there any difference between listing a package in both depends_build
> and depends_run compared to just listing it in depends_lib, e.g. in how
> licensing stuff propagates?

The only difference is that the dependency is processed twice.

> Since MacPorts ensures depends_run dependencies are installed before
> attempting to build a package, we usually do not notice a depends_run
> dependency that should rather be depends_build.

Yep. This isn't an entirely academic problem either, since it can cause
failures when running e.g. 'port configure'.

> I'm currently trying to improve trace mode to a point where every
> package I have installed builds fine using trace mode and I've come
> across the gcc ports, which set
>   depends_run port:ld64 port:cctools
> but fail to configure when trace mode (correctly) hides files installed
> by these ports. I wonder whether the correct fix would be to convert
> those into depends_lib, or just add them as depends_build, too.

The former.

- Josh


More information about the macports-dev mailing list