Subject: Conflicting dependencies, was Re: Unnecessary rebuilding of dependencies
To: Joerg Sonnenberger <>
From: Gary Thorpe <>
List: pkgsrc-users
Date: 07/03/2007 14:02:44
--- Joerg Sonnenberger <> wrote:

> On Tue, Jul 03, 2007 at 01:11:02PM -0400, Gary Thorpe wrote:
> > Is there any way to get pkgsrc to _not_ rebuild all the
> dependencies
> > for a dynamic library (same version being rebuilt because of zlib
> > issues)? From reading the guide, it seems proper usage of ABI/API
> > DEPENDS would help solve this, but there doesn't seem to be any
> > distinction between static dependencies (any change requires a
> rebuild)
> > versus dynamic dependencies (only rebuild if API/ABI changes) in
> terms
> > of how executables are linked.
> We have plans to change this, but nothing ready for use (and it won't
> be
> for a while). make replace can be used in a number of situations, but
> it
> is far from perfect.
> Joerg

Ok, that`s something I will try (make replace) in future.

I am now having problems with libz again :-) This warning occured
before and after rebuilding libglade2 and using it to build external

gcc  -g -O2  -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -o protocoltool
main.o lib_crc.o gui.o callbacks.o protocol.o serial.o parallel.o
socket.o pipe.o pt_spi.o pt_i2c.o 1wire.o gba.o pt_gpib.o pt_can.o
pt_usb.o firewire.o canald.o pt_dcop.o -Wl,-R/usr/pkg/lib
-Wl,-rpath,/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -L/usr/pkg/lib
-L/usr/X11R6/lib -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lgdk-x11-2.0
-lXrandr -lXi -lXext -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0
-lXcursor -lXfixes -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz
-lpango-1.0 -lm -lXrender -lX11 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
-lintl    -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -pthread
-Wl,-rpath,/usr/X11R6/lib -L/usr/pkg/lib -L/usr/X11R6/lib -lgnomeui-2
-lSM -lICE -lbonoboui-2 -lgnome-keyring -lxml2 -lgnomecanvas-2
-lgnome-2 -lpopt -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrandr -lXi
-lXext -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXcursor -lXfixes
-lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0 -lm
-lXrender -lX11 -lbonobo-2 -lgnomevfs-2 -lbonobo-activation -lgconf-2
-lgmodule-2.0 -lORBit-2 -lgthread-2.0 -lgobject-2.0 -lglib-2.0 -lintl  
-Wl,-R/usr/pkg/lib -pthread -L/usr/pkg/lib -lgnet-2.0 -lgthread-2.0
-lglib-2.0 -lintl     -lusb
ld: warning:, needed by /usr/pkg/lib/, may
conflict with
ld: warning:, needed by /usr/pkg/lib/, may
conflict with

I thought the problem was that libglade was built before I changed
mk.conf but after rebuilding it I see this in the library`s

ldd /usr/pkg/lib/
        -lz.1 => /usr/pkg/lib/
        -lm.0 => /usr/lib/
        -lm.0 => /usr/lib/
        -lxml2.2 => /usr/pkg/lib/
        -lintl.0 => /usr/lib/
        -lglib-2.0.0 => /usr/pkg/lib/
        -lgmodule-2.0.0 => /usr/pkg/lib/
        -lgobject-2.0.0 => /usr/pkg/lib/
        -lpthread.0 => /usr/lib/
        -lgdk_pixbuf-2.0.0 => /usr/pkg/lib/
        -lX11.6 => /usr/X11R6/lib/
        -lXext.6 => /usr/X11R6/lib/
        -lXrender.1 => /usr/X11R6/lib/
        -lXrandr.2 => /usr/X11R6/lib/
        -lXrender.1 => /usr/pkg/lib/
        -lXi.6 => /usr/X11R6/lib/
        -lpango-1.0.0 => /usr/pkg/lib/
        -lfreetype.9 => /usr/X11R6/lib/
        -lz.0 => /usr/lib/
        -lexpat.1 => /usr/pkg/lib/
        -lfontconfig.1 => /usr/pkg/lib/
        -lglitz.1 => /usr/pkg/lib/
        -lpng12.0 => /usr/pkg/lib/
        -lICE.6 => /usr/X11R6/lib/
        -lSM.6 => /usr/X11R6/lib/
        -lcairo.2 => /usr/pkg/lib/
        -lpangoft2-1.0.0 => /usr/pkg/lib/
        -lpangocairo-1.0.0 => /usr/pkg/lib/
        -lXfixes.0 => /usr/pkg/lib/
        -lXcursor.1 => /usr/pkg/lib/
        -lgdk-x11-2.0.0 => /usr/pkg/lib/
        -latk-1.0.0 => /usr/pkg/lib/
        -lgtk-x11-2.0.0 => /usr/pkg/lib/

It seems libglade depends on both (which is what the software
I am building depends on) in pkgsrc _and_ in base despite me
rebuilding it with PREFER_PKGSRC = zlib in mk.conf.

The multiple entries (-lm seems strange because it is two different
base libraries) I assume are casued by a dependency of libglage2 also
depending zlib that need to be updated post mk.conf change.

Is there any way I can efficiently (not all installed packages depend
on zlib and pkg_info -R zlib will not show those built against the base
zlib) update all installed pkgsrc software to now use pkgsrc zlib to
avoid this in future?

      Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail at