https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082012-01-18T15:16:38ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=104772012-01-18T15:16:38Zphma
<ul></ul><p>make -j 2 buildkernel fails on 2 cpu system (one core hyperthreaded). It may be a race condition or depend on the number j.</p>
CCVER=gcc44 BINUTILSVER=binutils221 OBJFORMAT_PATH=/ <br />PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/pkg/bin cc <del>O -pipe -nostdinc -<br />I/usr/include -I. -I/usr/src/sys/dev/disk/aic7xxx/aicasm -std=gnu99 -Wsystem</del><br />headers <del>Werror -Wall -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing</del><br />prototypes <del>Wpointer-arith -Wold-style-definition -Wreturn-type -Wcast-qual -<br />Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar</del><br />subscripts -Winline -Wnested-externs -Wredundant-decls -static -o aicasm.nx <br />aicasm.no aicasm_symbol.no aicasm_gram.no aicasm_macro_gram.no <br />aicasm_scan.no aicasm_macro_scan.no -ll<br />===> dev/disk/aic7xxx/ahc<br />===> dev/disk/aic7xxx/ahc/ahc_pci<br />( cd .. ; make aic7xxx_reg.h )<br />make: don't know how to make aic7xxx_reg.h. Stop
<ul>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />make <del>V SFILES -V SYSTEM_SFILES | xargs env MKDEP_CPP="cc -E" mkdep -a -f <br />.newdep -x assembler-with-cpp -DLOCORE -O -pipe -Wall -Wredundant-decls -<br />Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -<br />Winline -Wcast-qual -Wold-style-definition -std=c99 -Wold-style-declaration -g <br />-nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -<br />I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica5" -<br />I"/usr/src/sys/contrib/dev/acpica-unix/include" -<br />I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal -<br />D_KERNEL -include opt_global.h -finline-limit=8000 --param inline-unit</del><br />growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -<br />mpreferred-stack-boundary=2 -fno-stack-protector -mno-mmx -mno-3dnow -<br />mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 <br />-mno-sse4a -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt <br />-msoft-float<br />rm -f .depend<br />mv -f .newdep .depend<br />1 error</li>
<li>Error code 2<br />1 error</li>
<li>Error code 2<br />1 error
#</li>
</ul> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=104782012-01-18T16:31:29Zy0n3t4n1
<ul></ul><p>On Tue, Jan 17, 2012 at 01:19:31PM -0800, Thomas Nikolajsen via Redmine wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a> has been reported by Thomas Nikolajsen.</p>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a>: make -j 3 buildkernel fails on UP<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2279">http://bugs.dragonflybsd.org/issues/2279</a></p>
<p>Author: Thomas Nikolajsen<br />Status: New<br />Priority: Normal<br />Assignee: <br />Category: <br />Target version:</p>
<p>Using fresh master (January 17th 2012)<br />make -j 3 buildkernel<br />fails on UP system.</p>
<p>(quickkernel succeds here)</p>
<p>Make -j 10 buildkernel<br />succeeds on 8 core system.</p>
<p>-<br />===> dev/disk/aic7xxx/ahc/ahc_pci<br />( cd ... ; make aic7xxx_reg.h )<br />make: don't know how to make aic7xxx_reg.h. Stop</p>
</blockquote>
<p>In the failure case, the above command invokes the make command<br />inside ${.OBJDIR}, which contains no Makefile. ${.CURDIR} should<br />always point to the current directory in the source tree.<br />I think this should work:</p>
<p>diff --git a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br />index 1973ce1..7b1f3f2 100644<br />--- a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br />+++ b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br /><code>@ -6,7 +6,7 </code>@<br /> KMOD= ahc_pci</p>
<pre><code>../aic7xxx_reg.h:<br />- ( cd .. ; ${MAKE} aic7xxx_reg.h )<br />+ ${MAKE} -C ${.CURDIR}/.. aic7xxx_reg.h</code></pre>
<pre><code>SRCS= ahc_pci.c aic7xxx_pci.c ../aic7xxx_reg.h<br /> SRCS+= device_if.h bus_if.h pci_if.h</code></pre>
<blockquote>
<p>-- <br />You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="http://bugs.dragonflybsd.org/my/account">http://bugs.dragonflybsd.org/my/account</a></p>
</blockquote> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=104802012-01-19T10:21:29Zy0n3t4n1
<ul></ul><p>Hmm, my previous post doesn't explain why it won't break without -JN.<br />I can reproduce it easier:</p>
<p>$ cd /sys/dev/disk/aic7xxx<br />$ make cleandir; make cleandir # make sure to clean up ${.OBJDIR}<br />$ make obj<br />$ make -j2 depend</p>
<p>Without -j, aic7xxx_reg.h is built before recursing into ahc_pci from ahc<br />directory; with -j flag however, building ahc_pci can preceed it, and when<br />that happens, the build rule for `../aic7xxx_reg.h' in ahc_pci/Makefile is<br />applied.<br />Looking at <bsd.subdir.mk>, each ${SUBDIR} target produces a pseudo<br />target named <em>SUBDIR</em>${__target}_${SUBDIR}, and in this case __target=depend,<br />so adding the following line in /sys/dev/disk/aic7xxx/ahc/Makefile</p>
<p>_SUBDIR_depend_ahc_pci: ${BEFORE_DEPEND}</p>
<p>should resolve this ordering issue. I don't know where this dependency<br />should go, though. The patch in my previous post does solve the error<br />for me, but I guess that it can still try to create the aic7xxx_reg.h<br />file from multiple processes.</p>
<p>On Wed, Jan 18, 2012 at 08:31:29AM -0800, YONETANI Tomokazu via Redmine wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a> has been updated by YONETANI Tomokazu.</p>
<p>On Tue, Jan 17, 2012 at 01:19:31PM -0800, Thomas Nikolajsen via Redmine wrote:</p>
<blockquote>
<p>Issue <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a> has been reported by Thomas Nikolajsen.</p>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a>: make -j 3 buildkernel fails on UP<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2279">http://bugs.dragonflybsd.org/issues/2279</a></p>
<p>Author: Thomas Nikolajsen<br />Status: New<br />Priority: Normal<br />Assignee: <br />Category: <br />Target version:</p>
<p>Using fresh master (January 17th 2012)<br />make -j 3 buildkernel<br />fails on UP system.</p>
<p>(quickkernel succeds here)</p>
<p>Make -j 10 buildkernel<br />succeeds on 8 core system.</p>
<p>-<br />===> dev/disk/aic7xxx/ahc/ahc_pci<br />( cd ... ; make aic7xxx_reg.h )<br />make: don't know how to make aic7xxx_reg.h. Stop</p>
</blockquote>
<p>In the failure case, the above command invokes the make command<br />inside ${.OBJDIR}, which contains no Makefile. ${.CURDIR} should<br />always point to the current directory in the source tree.<br />I think this should work:</p>
<p>diff --git a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br />index 1973ce1..7b1f3f2 100644<br />--- a/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br />+++ b/sys/dev/disk/aic7xxx/ahc/ahc_pci/Makefile<br /><code>@ -6,7 +6,7 </code>@<br />KMOD= ahc_pci</p>
<p>../aic7xxx_reg.h:<br />- ( cd .. ; ${MAKE} aic7xxx_reg.h )<br />+ ${MAKE} -C ${.CURDIR}/.. aic7xxx_reg.h</p>
<p>SRCS= ahc_pci.c aic7xxx_pci.c ../aic7xxx_reg.h<br />SRCS+= device_if.h bus_if.h pci_if.h</p>
<blockquote>
<p>-- <br />You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="http://bugs.dragonflybsd.org/my/account">http://bugs.dragonflybsd.org/my/account</a></p>
</blockquote>
<p>----------------------------------------<br />Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: make -j 3 buildkernel fails on UP (Closed)" href="https://bugs.dragonflybsd.org/issues/2279">#2279</a>: make -j 3 buildkernel fails on UP<br /><a class="external" href="http://bugs.dragonflybsd.org/issues/2279">http://bugs.dragonflybsd.org/issues/2279</a></p>
<p>Author: Thomas Nikolajsen<br />Status: New<br />Priority: Normal<br />Assignee: <br />Category: <br />Target version:</p>
<p>Using fresh master (January 17th 2012)<br />make -j 3 buildkernel<br />fails on UP system.</p>
<p>(quickkernel succeds here)</p>
<p>Make -j 10 buildkernel<br />succeeds on 8 core system.</p>
<p>-<br />===> dev/disk/aic7xxx/ahc/ahc_pci<br />( cd ... ; make aic7xxx_reg.h )<br />make: don't know how to make aic7xxx_reg.h. Stop</p>
<p>-- <br />You have received this notification because you have either subscribed to it, or are involved in it.<br />To change your notification preferences, please click here: <a class="external" href="http://bugs.dragonflybsd.org/my/account">http://bugs.dragonflybsd.org/my/account</a></p>
</blockquote> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=105012012-01-21T01:43:09Zjustin
<ul></ul><p>Could this be related to commit d2e9c9d8664f753a0d599eceed1dd98ffa7ef479 ?</p>
<p><a class="external" href="http://leaf.dragonflybsd.org/mailarchive/users/2011-11/msg00109.html">http://leaf.dragonflybsd.org/mailarchive/users/2011-11/msg00109.html</a> for example.</p> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=105312012-01-21T21:05:56Zjustin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>Fixed in f1c957b2612529a64e35c5d2500dc7a9555c844a</p> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=105342012-01-22T08:59:31Zthomas.nikolajsen
<ul></ul><p>YONETANI,</p>
<p>Thank you for your insight on this issue,<br />I have committed your first patch, which is correct and fixes problem I have seen.</p>
<p>Also thanks for your further notes on why the problem occurs,<br />this was indeed my immediate question when I read your first note :)<br />Please feel free to commit further changes if you think we need it.</p> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=105412012-01-23T04:10:20Zy0n3t4n1
<ul></ul><p>(Sorry for the late reply)</p>
<blockquote>
<p>Could this be related to commit d2e9c9d8664f753a0d599eceed1dd98ffa7ef479 ?</p>
</blockquote>
<p>I don't know, but apparently buildkernel hasn't passed the -j flag<br />until recently? I usually build the kernel using old style, i.e.<br /> $ cd /sys/config<br /> $ s=`git rev-parse --short HEAD`<br /> $ config -rd /usr/obj/KERNEL.$s MYCFG<br /> $ cd /usr/obj/KERNEL.$s<br /> $ make -s depend && make -sj4</p>
<p>so I always had to avoid -j on `make depend', like above.</p> DragonFlyBSD - Bug #2279: make -j 3 buildkernel fails on UPhttps://bugs.dragonflybsd.org/issues/2279?journal_id=105422012-01-23T04:29:27Zy0n3t4n1
<ul></ul><p>(Sorry for late reply)</p>
<p>Hi, thanks for the commit!</p>
<p>On Sun, Jan 22, 2012 at 12:59:31AM -0800, Thomas Nikolajsen via Redmine wrote:</p>
<blockquote>
<p>Please feel free to commit further changes if you think we need it.</p>
</blockquote>
<p>No, I haven't figured out how best to add the dependency yet.</p>