Subject: pkg/18817: possible dependency loop between devel/gmake and converters/libiconv
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 10/26/2002 14:17:53
>Number:         18817
>Category:       pkg
>Synopsis:       possible dependency loop between devel/gmake and converters/libiconv
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 26 11:18:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        pkgsrc-current 2002/10/25
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 1.5W

>Description:

	After doing a "cvs update" in my local /usr/pkgsrc this morning
	I soon encountered an endless loop trying to "make
	clean-depends" in devel/glib2.

	As far as I can tell this loop isn't caused by any other local
	changes I've made, though it may have something to do with my
	base-OS version or what packages I have installed (gmake,
	gtexinfo, and libiconv are all up-to-date).

	Here's how it goes:

	devel/glib2 depends on devel/gmake  (USE_GMAKE=YES)

	devel/gmake depends on devel/gtexinfo (.include "../../mk/texinfo.mk")

	devel/gtexinfo depends on converters/libiconv (.include "../../converters/libiconv/buildlink2.mk")

	converters/libiconv depends on devel/gmake (USE_GMAKE=YES)

	oops.  It seems the logic in the clean-depends-list target which
	tries to prevent traversing the same modules more than once is
	not quite working right.

	This probably isn't the only place though where a dependency
	loop might happen with these three packages though.

	Luckily converters/libiconv seems to build OK without gmake.

	I really don't like this though -- it would be better for
	devel/gtexinfo not to use libiconv at all (I haven't looked at
	why it does).  It might be nice to make clean-depends-list
	smarter and more robust too, but I think that's secondary.

	I still don't quite see what changed to cause this to happen now
	either, though I can't say for sure when I last did a "make
	clean-depends" in a gmake-using package without any problem.

>How-To-Repeat:

>Fix:

Index: Makefile
===================================================================
RCS file: /cvs/master/m-NetBSD/main/pkgsrc/converters/libiconv/Makefile,v
retrieving revision 1.13
diff -c -r1.13 Makefile
*** Makefile	1 Sep 2002 20:24:17 -0000	1.13
--- Makefile	26 Oct 2002 17:59:58 -0000
***************
*** 11,17 ****
  
  USE_BUILDLINK2=		YES
  GNU_CONFIGURE=		YES
! USE_GMAKE=		YES
  USE_LIBTOOL=		YES
  LIBTOOL_OVERRIDE+=	${WRKSRC}/libtool
  LIBTOOL_OVERRIDE+=	${WRKSRC}/libcharset/libtool
--- 11,18 ----
  
  USE_BUILDLINK2=		YES
  GNU_CONFIGURE=		YES
! # we can't use gmake -- gmake needs gtexinfo which needs libiconv
! #USE_GMAKE=		YES
  USE_LIBTOOL=		YES
  LIBTOOL_OVERRIDE+=	${WRKSRC}/libtool
  LIBTOOL_OVERRIDE+=	${WRKSRC}/libcharset/libtool
>Release-Note:
>Audit-Trail:
>Unformatted: