Subject: Re: buildlink.mk should maybe be installed with libraries?
To: NetBSD Packages Technical Discussion List <tech-pkg@NetBSD.ORG>
From: Greg A. Woods <email@example.com>
Date: 11/23/2001 14:03:33
[[ this is a tech-pkg topic I think, even though it deals primarily only
with pkgsrc-current, so I've redirected replies there ]]
[ On Friday, November 23, 2001 at 16:13:52 (+0100), Olaf Seibert wrote: ]
> Subject: buildlink.mk should maybe be installed with libraries?
> I see a potential for version skew with the current buildlink.mk system.
> If you build a program P which depends on installed library L, then
> L/buildlink.mk is used.
> But this version of L/buildlink.mk is the version for the most recent
> version in pkgsrc. Program P may not require the most recent version but
> may be happy with an older version that was installed earlier.
This isn't just a potential problem -- it's very real. I've tripped
over it several times already myself!
> In this case, the L/buildlink.mk does not belong to the installed
> version of L. To make sure that this can never be a problem, we must
> install L/buildlink.mk with L, so that when linking with L the
> buildlink.mk from that time is used.
Yes, I believe this is the correct solution, but with one possible
caveat: I think The overloading of (BUILD_)DEPENDS with a default
BUILDLINK_DEPENDS.foo in the buillink.mk files needs to be removed.
Each package module should always explicitly list the dependencies it
uses. With the default (BUILD_)DEPENDS lines in the buildlink.mk files
it's very difficult, and perhaps even impossible, to know when a custom
override is necessary. For example when 'P' does need a newer version
of 'L' it is necessary to add an override setting of BUILDLINK_DEPENDS.L
to the 'P' Makefile so that any out-of-date installed version of 'L' is
rejected as too old (and/or updated I guess if 'make update' was used).
However once that override has been added it can never be removed --
it's best to just always require it in the first place and to never
slide down the slippery slope of defaulting the dependencies.
There are other graver implications for the static-linking support I'm
working on for pkgsrc too....
> Alternatively, each buildlink.mk needs to be backward-compatible to
> *all* possibly previously installed versions.
I don't think that's pragmatic (or desirable)....
Greg A. Woods
+1 416 218-0098 VE3TCP <firstname.lastname@example.org> <email@example.com>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>