Subject: indirect dependencies through build tools [Re: pkg/33100 (devel/darcs
To: Thomas Klausner <>
From: Johnny Lam <>
List: tech-pkg
Date: 03/21/2006 12:25:28 wrote:
> Synopsis: devel/darcs missing DEPENDS=gmp
> Responsible-Changed-From-To: pkg-manager->jlam
> Responsible-Changed-By:
> Responsible-Changed-When: Sun, 19 Mar 2006 15:55:20 +0000
> Responsible-Changed-Why:
> Committed a workaround. jlam can hopefully explain what's happening here...

These packages want ghc as a build dependency, but want gmp (through 
ghc) as a run-time dependency.  In the case of darcs, because the ghc 
dependency is expressed by including ghc/, gmp is 
considered an indirect dependency for darcs, and so is not added as a 
dependency for darcs.

It's important to remember that dependencies are (mostly) only 
registered if a package directly includes a for that 
dependency in the package Makefile.  This is the distinction between 
"BUILDLINK_DEPENDS", which are actual dependencies, and 
"BUILDLINK_PACKAGES", which are merely the packages whose libraries and 
headers are symlinked into the buildlink work directory.  If you look at 
a typical file, you'll see that BUILDLINK_PACKAGES is 
always modified when the is included, but 
BUILDLINK_DEPENDS is only modified if the is not 
"recursively" included (BUILDLINK_DEPTH == 1).

You can force all packages that directly include ghc/ to 
build with ghc to have a dependency on gmp by modifying 
ghc/ so that gmp/ is included outside of the 
BUILDLINK_DEPTH guards, i.e. move that inclusion to the end of the file. 
  Should I go ahead and do this?


	-- Johnny Lam <>