has Trouble with Parallel Makes
To: None <gnats-bugs@gnats.netbsd.org>
From: Chris Jepeway <jepeway@blasted-heath.com>
List: netbsd-bugs
Date: 10/27/2001 19:00:49
>Number: 14378
>Category: misc
>Synopsis: bsd.links.mk has Trouble with Parallel Makes
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: misc-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 27 16:01:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Chris Jepeway
>Release: NetBSD 1.5
>Organization:
Blasted Heath Consulting, LLC
>Environment:
System: NetBSD the-morrigan 1.5.2 NetBSD 1.5.2 (GENERIC) #3: Sat Aug 18 23:37:05 CEST 2001 he@hamster.urc.uninett.no:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
When using LINKS in a Makefile to build links to
an installed target, the ln command(s) can execute
before the target gets installed if you're running
a parallel make. ln will, of course, fail, and
will the make. I see this in a -current build,
and I expect it's a problem for any parallel make
where LINKS is used.
>How-To-Repeat:
On a fastish machine, try to build -current with
a parallel make. Something like
./build.sh -j 4 + all the other flags to kick off a build
should do it. If you make it into the do-lib part of the build
(and you may not depending on the state of -current), you can die
in the section of the libcrypto build that creates the libdes*
links.
>Fix:
I don't yet grok the bsd.*.mk workings, but here's
the patch I'm using as a workaround. It forces the
linksinstall commands to be run after all realinstall
commands are executed. Well, that's the idea, anyways.
--- bsd.links.mk 2001/10/25 21:47:02 1.1.1.1
+++ bsd.links.mk 2001/10/27 22:06:57
@@ -1,7 +1,8 @@
# $NetBSD: bsd.links.mk,v 1.14 2000/07/07 04:35:36 cgd Exp $
.PHONY: linksinstall
-realinstall: linksinstall
+afterinstall: linksinstall
+.ORDER: realinstall linksinstall
.if defined(SYMLINKS) && !empty(SYMLINKS)
linksinstall::
>Release-Note:
>Audit-Trail:
>Unformatted: