NetBSD Problem Report #43067

From kre@munnari.OZ.AU  Sun Mar 28 09:52:12 2010
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D5CE863B11D
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Mar 2010 09:52:11 +0000 (UTC)
Message-Id: <201003280952.o2S9q4Xu011313@jade.coe.psu.ac.th>
Date: Sun, 28 Mar 2010 16:52:04 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX)
X-Send-Pr-Version: 3.95

>Number:         43067
>Category:       pkg
>Synopsis:       devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 28 09:55:02 +0000 2010
>Closed-Date:    Mon Dec 29 09:13:24 +0000 2014
>Last-Modified:  Mon Dec 29 09:13:24 +0000 2014
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386  (pkgsrc current 2010-03-28)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
	devel/p5-Date-Manip triggers the (a?) bug that causes NetBSD 4's
	make to core dump.

>How-To-Repeat:
	Attempt to build the current version (p5-Date-Manip-6.07) on
	a NetBSD 4 system (on i386 anyway).  A previous version
	(p5-Date-Manip-6.05) built OK - I guess a dependency line
	has gotten just *that much* bigger in the meantime.

>Fix:
	First, apply the patch in PR 42704, then apply the
	following patch to devel/p5-Date-Manip/Makefile

	If you refuse to handle 42704, then this would probably work
	if bmake were replaced by gmake (but I have not verified that.)

Index: Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/devel/p5-Date-Manip/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile	7 Feb 2010 16:04:17 -0000	1.30
+++ Makefile	28 Mar 2010 09:30:19 -0000
@@ -21,6 +21,12 @@

 USE_LANGUAGES=		# empty

+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(MACHINE_PLATFORM:MNetBSD-4*)
+USE_TOOLS+=	bmake
+.endif
+
 PERL5_PACKLIST=		auto/Date/Manip/.packlist

 .include "../../lang/perl5/module.mk"

>Release-Note:

>Audit-Trail:
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43067: devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX)
Date: Tue, 30 Mar 2010 19:51:40 +0700

 Actually, obache@ managed to remind me of PR 42707, where I
 noted the same problem, and same fix, in the previous version
 of this package, it only "built OK" after I applied the fix...
 (I had just forgotten it in the intervening period, when the
 upgrade happened my pkg building machinery attempted a normal
 rebuild, and failed - since I had the package binary before, and
 it didn't rebuild, I just assumed a new problem....)

 Both PRs are about the same problem, both suggest the same fix
 (this one has an actual patch) - obcache closed 42707, so this
 is the only one that remains open - that's fine - this comment
 is just added to the PR to correct the info it contained (and so
 it contains a reference to the earlier PR).

 It would be really nice if this could get fixed (it really is a
 simple fix - and it does work) before the next time this package
 is upgraded!

 kre


State-Changed-From-To: open->feedback
State-Changed-By: shattered@NetBSD.org
State-Changed-When: Tue, 13 Sep 2011 17:46:39 +0000
State-Changed-Why:
That bug was fixed and was pulled up to netbsd-4 branch, IIRC.


From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX))
Date: Wed, 14 Sep 2011 02:24:09 +0700

     Date:        Tue, 13 Sep 2011 17:46:41 +0000 (UTC)
     From:        shattered@NetBSD.org
     Message-ID:  <20110913174641.80E2863BBA9@www.NetBSD.org>

   | That bug was fixed and was pulled up to netbsd-4 branch, IIRC.

 It isn't possible to fix pkgsrc problems by changing NetBSD - we wouldn't
 attempt that with Solaris, or Darwin, or Linux -- just because the pkgsrc
 developers happen to be able to fix bugs in NetBSD doesn't make that the 
 solution.

 That isn't to say that the bugs shouldn't be fixed of course, so the make
 bug fix, and pullup, is all good stuff - but pkgsrc cannot rely upon that.
 I build against NetBSD 4.0 release, not the netbsd-4 branch, and one thing
 that can never happen is that the release gets fixed (it is already burned
 on cdrom/dvd and nothing in it is ever going to change.)

 Even if there were some argument that users must upgrade, you cannot ask them
 to upgrade to some development version, only released versions, and the fix
 for this problem is not in any released NetBSD 4.*, and since it seems
 incredibly unlikely that there will ever be any new releases in the
 NetBSD 4 series, this will probably remain true forever.

 Of course, eventually, pkgsrc support for NetBSD 4 will be dropped, and
 at that point, this PR can close if that's what you want to do, but that
 time has not happened yet, NetBSD 4 is still supposed to be supported.

 Even when support for NetBSD 4 is dropped, and this PR becomes irrelevant,
 the change proposed in PR 42704 (which the fix in this PR depends upon) is
 still (IMO) a good idea, as the underlying problem, of older versions of
 important software (and for pkgsrc, make is obviously that) will always exist
 in whatever are the older versions of NetBSD being supported, which means
 that without some way to use a newer version of make (like pkgsrc has for gcc,
 the pkg_tools, etc) than is in the base system, then nothing in pkgsrc
 can ever use new features or avoid old bugs (like the one that causes the
 problem here.)

 kre

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD
 4.0 (+FIX))
Date: Wed, 14 Sep 2011 11:14:19 +0900

 On Wed, 14 Sep 2011 04:30:06 +0900, Robert Elz <kre@munnari.oz.au> wrote:

 >    | That bug was fixed and was pulled up to netbsd-4 branch, IIRC.
 > It isn't possible to fix pkgsrc problems by changing NetBSD - we wouldn't
 >  attempt that with Solaris, or Darwin, or Linux -- just because the pkgsrc
 >  developers happen to be able to fix bugs in NetBSD doesn't make that the
 >  solution.

 Similarly, it isn't possible to fix NetBSD base problems by pkgsrc.

 You can use tools (bmake) from pkgsrc, if you don't want to update NetBSD base.
 It is the solution provided by pkgsrc.
 You are probably using pkg_install tools from pkgsrc instead of NetBSD-4.0's one,
 you can use OpenSSL from pkgsrc for security fix instead of vulnerable NetBSD-4.0's one.
 Then why not for bmake?

 -- 
 OBATA Akio / obache@NetBSD.org

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX))
Date: Wed, 14 Sep 2011 12:43:37 +0700

     Date:        Wed, 14 Sep 2011 02:15:04 +0000 (UTC)
     From:        "OBATA Akio" <obache@NetBSD.org>
     Message-ID:  <20110914021504.C028363BBA9@www.NetBSD.org>

   |  Similarly, it isn't possible to fix NetBSD base problems by pkgsrc.

 Of course - not fix - but "live with" (or be able to function despite the
 problem).

   |  You can use tools (bmake) from pkgsrc,

 Yes, of course, that's exactly what the fix proposed in the PR is to do.

   |  Then why not for bmake?

 No reason at all, that's exactly what I would like to see happen - please
 look at this PR, and commit the fix so it uses bmake (when that is necessary,
 which is just for NetBSD 4 (and older, except older we no longer care about)).

 Note that Joerg proposed doing this in a different way, by making installing
 bmake a requirement for pkgsrc - making NetBSD 4 require a bootstrap for
 pkgsrc, as do some other systems to get their tools up to a known functional
 state.   That would be an OK solution too (more work for everyone, but
 acceptable).

 Either of those would be OK, but whatever the solution, it needs to "just
 work" for someone who just reads and follows the documentation for making
 pkgsrc & its packages work on their system.   We cannot expect users to
 magically know that they need to do something different.

   | You are probably using pkg_install tools from pkgsrc instead of
   | NetBSD-4.0's one,

 Yes, because pkgsrc insists on that, and installs it by itself, not because
 I made any conscious choice to do it.

 For openssl I have no idea, if pkgsrc has decided that the base system
 version is unacceptable, and decided to use its own version, then that's
 what my NetBSD 4 packages are using.   If not, they're still using the
 base system version.

   | Then why not for bmake?

 No reason at all, that's exactly what I want to happen.  But that needs
 support from pkgsrc - unlike openssl, and pkg_install, devel/bmake does not
 install a new "make", it installs a "bmake" command, so for packages to use
 it, they need to know to have MAKE=bmake (the same as ones that require GNU's
 version of make have MAKE=gmake - accomplished by adding gmake to USE_TOOLS).

 Frankly, this (picking one fix or the other) really ought to be a no-brainer...

 kre

From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD
 4.0 (+FIX))
Date: Wed, 14 Sep 2011 15:13:09 +0900

 On Wed, 14 Sep 2011 14:45:02 +0900, Robert Elz <kre@munnari.oz.au> wrote:

 >    | Then why not for bmake?
 > No reason at all, that's exactly what I want to happen.  But that needs
 >  support from pkgsrc - unlike openssl, and pkg_install, devel/bmake does not
 >  install a new "make", it installs a "bmake" command, so for packages to use
 >  it, they need to know to have MAKE=bmake (the same as ones that require GNU's
 >  version of make have MAKE=gmake - accomplished by adding gmake to USE_TOOLS).

 But it is impossible to support it from pkgsrc - unlike openssl, and pkg_install,
 make (bmake) does not provide its version information, so for packages to use
 newer bmake, they need to know builtin make version is sufficient, but cannot.

 -- 
 OBATA Akio / obache@NetBSD.org

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 14 Sep 2011 06:42:16 +0000
State-Changed-Why:
kre is perfectly right, I would have closed this ages ago if it were invalid


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD
 4.0 (+FIX))
Date: Wed, 14 Sep 2011 06:41:35 +0000

 On Wed, Sep 14, 2011 at 06:15:04AM +0000, OBATA Akio wrote:
  > But it is impossible to support it from pkgsrc - unlike openssl,
  > and pkg_install, make (bmake) does not provide its version
  > information, so for packages to use newer bmake, they need to know
  > builtin make version is sufficient, but cannot.

 It is supposed to. Someone broke it some time back, but I thought it
 had gotten fixed since...

 -- 
 David A. Holland
 dholland@netbsd.org

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/43067 (devel/p5-Date-Manip causes make core dump on NetBSD 4.0 (+FIX))
Date: Wed, 14 Sep 2011 19:03:43 +0700

     Date:        Wed, 14 Sep 2011 06:15:04 +0000 (UTC)
     From:        "OBATA Akio" <obache@NetBSD.org>
     Message-ID:  <20110914061504.D1FFE63BBA9@www.NetBSD.org>

   | they need to know builtin make version is sufficient, but cannot.

 It should always be safe to use the pkgsrc version, just doing so is usually
 unnecessary, and hence wasteful.

 But we can, as is proposed in this PR, discover that (for example) the
 NetBSD 4 version of make is defective, and when that is true, require
 the newer version for that release.  That is, the proposal here is in
 two parts (hence the two PRs) - one is to add the ability to use bmake
 to replace make when a package determines (however that is done) that
 is necessary, and the second is the fix to this package, to use that
 mechanism when building on NetBSD 4 (any version, we'll just wear the
 cost if the particular NetBSD 4 happens to be built from cvs after the
 fix was pulled up, that's harmless, building make isn't all that hard
 or slow, not even on the slower architectures).

 Really, this works, it is simple, and effective - the change is non-intrusive.

 The alternative (Joerg's suggestion of doing a bootstrap mechanism for
 NetBSD 4) is a lot of work, useful for (we hope) only a short time until
 NetBSD 4 support is removed, and thereafter lost.   On the other hand,
 supporting bmake as a build tool replacement for make (note this is for
 package makefiles, not for pkgsrc itself) will continue to be useful when
 some new package uses some feature that's available in make on NetBSD 6,
 or current of the time, but which doesn't work on NetBSD 5, the package
 just selects use of bmake (which should continue to be close enough to the
 most up to date version) and all is OK.

 kre

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 29 Dec 2014 09:13:24 +0000
State-Changed-Why:
netbsd-4 is EOL.

(yeah, I know the proposed infrastructure change might be useful in the
future; but let's worry about it when and if we need it again.)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.