Subject: Re: Pkgsrc zlib vs. base zlib, NetBSD
To: None <pkgsrc-users@netbsd.org>
From: Gary Thorpe <gathorpe79@yahoo.com>
List: pkgsrc-users
Date: 06/08/2007 13:56:46
--- "Johnny C. Lam" <jlam@pkgsrc.org> wrote:

> On Wed, Jun 06, 2007 at 11:48:13PM -0400, Gary Thorpe wrote:
> [snip]
> > ld: warning: libz.so.0, needed by /usr/pkg/lib/libpng.so, may
> conflict
> > with libz.so.1
> > rm -f version.o
> > 
> > The zlib version in pkgsrc conflicts with the version used to build
> the
> > PNG library (the base version). I just did 'make update' for libpng
> and
> > it still uses the version in the base although it has this in the
> > Makefile (with full output for clarity):
> [snip]
> > 
> > .include "../../devel/zlib/buildlink3.mk"
> > .include "../../mk/bsd.pkg.mk"
> > 
> > I.e. it should use and depend on the pkgsrc zlib, but it doesn't:
> 
> No, the above line just means that the png package uses zlib, but it
> doesn't specify from where.  By default, pkgsrc will satisfy
> dependencies
> using the base system provided that it understands how to do it.  In
> general, if a builtin.mk file exists in a particular package's
> directory,
> e.g. pkgsrc/devel/zlib/builtin.mk, then pkgsrc knows how to do it.

From the pkgsrc guide, 13.1:

`If a dependency on a particular package is required for its libraries
and headers, then we replace:

DEPENDS+=       foo>=1.1.0:../../category/foo

with

.include "../../category/foo/buildlink3.mk"`

This does not seem to agree with what you are saying, because this
implies that `.include "../../devel/zlib/buildlink3.mk` will add the
package as a dependency, which is what is in png`s Makefile.

The buildlink3.mk files usually define the required dependencies
> 
> If you want to build a system where pkgsrc always uses pkgsrc to
> resolve
> dependencies, then you should take a look at PREFER_PKGSRC in
> pkgsrc/mk/defaults/mk.conf.  For example, the following lines could
> be added to your /etc/mk.conf file:
> 
> # The following forces using pkgsrc for everything except a few
> # key packages:
> #
> PREFER_PKGSRC=	yes
> PREFER_NATIVE=	skey pam tcp_wrappers
> 
> 	Cheers,
> 
> 	-- Johnny Lam <jlam@pkgsrc.org>


      Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca