DragonFly BSD
DragonFly bugs List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[DragonFlyBSD - Bug #2279] make -j 3 buildkernel fails on UP


From: YONETANI Tomokazu via Redmine <bugtracker-admin@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Jan 2012 02:21:29 -0800

Issue #2279 has been updated by YONETANI Tomokazu.


Hmm, my previous post doesn't explain why it won't break without -JN.
I can reproduce it easier:

$ cd /sys/dev/disk/aic7xxx
$ make cleandir; make cleandir		# make sure to clean up ${.OBJDIR}
$ make obj
$ make -j2 depend

Without -j, aic7xxx_reg.h is built before recursing into ahc_pci from ahc
directory; with -j flag however, building ahc_pci can preceed it, and when
that happens, the build rule for `../aic7xxx_reg.h' in ahc_pci/Makefile is
applied.
Looking at <bsd.subdir.mk>, each ${SUBDIR} target produces a pseudo
target named _SUBDIR_${__target}_${SUBDIR}, and in this case __target=depend,
so adding the following line in /sys/dev/disk/aic7xxx/ahc/Makefile

_SUBDIR_depend_ahc_pci: ${BEFORE_DEPEND}

should resolve this ordering issue.  I don't know where this dependency
should go, though.  The patch in my previous post does solve the error
for me, but I guess that it can still try to create the aic7xxx_reg.h
file from multiple processes.

On Wed, Jan 18, 2012 at 08:31:29AM -0800, YONETANI Tomokazu via Redmine wrote:
> 
> Issue #2279 has been updated by YONETANI Tomokazu.
> 
> 
> On Tue, Jan 17, 2012 at 01:19:31PM -0800, Thomas Nikolajsen via Redmine wrote:
> > 
> > Issue #2279 has been reported by Thomas Nikolajsen.
> > 
> > ----------------------------------------
> > Bug #2279: make -j 3 buildkernel fails on UP
> > http://bugs.dragonflybsd.org/issues/2279
> > 
> > Author: Thomas Nikolajsen
> > Status: New
> > Priority: Normal
> > Assignee: 
> > Category: 
> > Target version: 
> > 
> > 
> > Using fresh master (January 17th 2012)
> > make -j 3 buildkernel
> > fails on UP system.
> > 
> > (quickkernel succeds here)
> > 
> > Make -j 10 buildkernel
> > succeeds on 8 core system.
> > 
> > -
> > ===> dev/disk/aic7xxx/ahc/ahc_pci
> > ( cd ... ; make aic7xxx_reg.h )
> > make: don't know how to make aic7xxx_reg.h. Stop
> 
> In the failure case, the above command invokes the make command
> inside ${.OBJDIR}, which contains no Makefile.  ${.CURDIR} should
> always point to the current directory in the source tree.
> I think this should work:
> 
> diff --git a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile
> index 1973ce1..7b1f3f2 100644
> --- a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile
> +++ b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile
> @@ -6,7 +6,7 @@
>  KMOD=	ahc_pci
>  
>  ../aic7xxx_reg.h:
> -	( cd .. ; ${MAKE} aic7xxx_reg.h )
> +	${MAKE} -C ${.CURDIR}/.. aic7xxx_reg.h
>  
>  SRCS=	ahc_pci.c aic7xxx_pci.c ../aic7xxx_reg.h
>  SRCS+=	device_if.h bus_if.h pci_if.h
> 
> > -- 
> > You have received this notification because you have either subscribed to it, or are involved in it.
> > To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
> ----------------------------------------
> Bug #2279: make -j 3 buildkernel fails on UP
> http://bugs.dragonflybsd.org/issues/2279
> 
> Author: Thomas Nikolajsen
> Status: New
> Priority: Normal
> Assignee: 
> Category: 
> Target version: 
> 
> 
> Using fresh master (January 17th 2012)
> make -j 3 buildkernel
> fails on UP system.
> 
> (quickkernel succeds here)
> 
> Make -j 10 buildkernel
> succeeds on 8 core system.
> 
> -
> ===> dev/disk/aic7xxx/ahc/ahc_pci
> ( cd ... ; make aic7xxx_reg.h )
> make: don't know how to make aic7xxx_reg.h. Stop
> 
> 
> -- 
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account
----------------------------------------
Bug #2279: make -j 3 buildkernel fails on UP
http://bugs.dragonflybsd.org/issues/2279

Author: Thomas Nikolajsen
Status: New
Priority: Normal
Assignee: 
Category: 
Target version: 


Using fresh master (January 17th 2012)
make -j 3 buildkernel
fails on UP system.

(quickkernel succeds here)

Make -j 10 buildkernel
succeeds on 8 core system.

-
===> dev/disk/aic7xxx/ahc/ahc_pci
( cd ... ; make aic7xxx_reg.h )
make: don't know how to make aic7xxx_reg.h. Stop


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]