From owner-freebsd-current@FreeBSD.ORG Mon May 20 09:53:31 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D9554494 for ; Mon, 20 May 2013 09:53:31 +0000 (UTC) (envelope-from bsam@passap.ru) Received: from forward13.mail.yandex.net (forward13.mail.yandex.net [IPv6:2a02:6b8:0:801::3]) by mx1.freebsd.org (Postfix) with ESMTP id 54556869 for ; Mon, 20 May 2013 09:53:31 +0000 (UTC) Received: from smtp14.mail.yandex.net (smtp14.mail.yandex.net [95.108.131.192]) by forward13.mail.yandex.net (Yandex) with ESMTP id EE3E5140756; Mon, 20 May 2013 13:53:29 +0400 (MSK) Received: from smtp14.mail.yandex.net (localhost [127.0.0.1]) by smtp14.mail.yandex.net (Yandex) with ESMTP id BB5541B607A3; Mon, 20 May 2013 13:53:29 +0400 (MSK) Received: from 87.249.28.58.tel.ru (87.249.28.58.tel.ru [87.249.28.58]) by smtp14.mail.yandex.net (nwsmtp/Yandex) with ESMTP id sceZ2fdApH-rTn0abwa; Mon, 20 May 2013 13:53:29 +0400 Message-ID: <5199F298.5060608@passap.ru> Date: Mon, 20 May 2013 13:53:28 +0400 From: Boris Samorodov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130518 Thunderbird/17.0.6 MIME-Version: 1.0 To: florent+FreeBSD-current@peterschmitt.fr Subject: [analyzed] bmake (installed as default make): make: illegal option -- J References: <519688D6.4020309@peterschmitt.fr> In-Reply-To: <519688D6.4020309@peterschmitt.fr> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 09:53:31 -0000 17.05.2013 23:45, Florent Peterschmitt пишет: > Hi, > > With the r250749 revision of head, rebuilt world with make -j4 > buildworld, all was fine. > > Then install new world, reboot and so: > > $ cd /usr/src > $ make -j4 kernel > --- buildkernel --- > make: illegal option -- J > usage: make [-BPSXeiknpqrstv] [-C directory] [-D variable] > [-d flags] [-E variable] [-f makefile] [-I directory] > [-j max_jobs] [-m directory] [-V variable] > [variable=value] [target ...] > *** [buildkernel] Error code 2 > > make: stopped in /usr/src > 1 error > > make: stopped in /usr/src > > It's not from bmake itself because if I build something anywhere (like > bmake itself), -jx works. > > I tried to look in Makefile* and a grep -rn "JFLAG" in /usr/share/mk/, > but I really don't know where and what to search, sorry :( > > Can someone help ? Seems to be a feature of the CURRENT build infrastructure. I have got almost two identical systems FreeBSD 10-amd64 which I update several times a week. One is affected while the other is not. I managed to build/install world/kernel without '-j' option. But this did not help to recover '-j' option. Here is my further investigation. At the affected system I run "make -j 5" under ktrace. Here is the relevant part of kdump: ----- [...] 38629 sh CALL read(0,0x624100,0x400) 38629 sh GIO fd 0 read 247 bytes "{ cd /usr/src; PATH=/sbin:/bin:/usr/sbin:/usr/bin `if [ -x /usr/obj/usr/src/make.amd64/make ]; then echo /usr/obj/usr/src/make.a" 38629 sh RET read 247/0xf7 [...] 38629 sh CALL wait4(0xffffffff,0x7fffffffd5f4,0<>0,0) 38631 sh CALL execve(0x801889778,0x8018898a0,0x8018898e8) 38631 sh NAMI "/usr/obj/usr/src/make.amd64/make" 38631 make RET execve 0 [...] 38631 make CALL write(0x2,0x7fffffffbe80,0x1a) 38631 make GIO fd 2 wrote 26 bytes "make: illegal option -- J " [...] ----- So, if there is a file /usr/obj/usr/src/make.amd64/make, it is launched. And if this make file is of the wrong version, it boils out. The affected system: ----- % uname -a FreeBSD BB049.int.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #24 r250806: Sun May 19 15:08:43 SAMT 2013 bsam@BB049.int.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 % LANG=C ls -l /usr/obj/usr/src/make.amd64 total 1476 -rwxr-xr-x 1 bsam wheel 751094 May 17 14:52 bmake -rwxr-xr-x 1 bsam wheel 686618 May 15 23:31 make drwxr-xr-x 3 bsam wheel 512 Dec 9 12:19 usr % /usr/obj/usr/src/make.amd64/make -V MAKE_VERSION 10201205300 ----- Not affected system: ----- % uname -a FreeBSD bsam.int.wart.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #22 r250806: Sun May 19 22:07:39 SAMT 2013 bsam@bsam.int.wart.ru:/usr/obj/usr/src/sys/BB64X amd64 % LANG=C ls -l /usr/obj/usr/src/make.amd64 total 1543 -rwxr-xr-x 1 bsam wheel 751094 May 17 14:52 bmake -rwxr-xr-x 1 bsam wheel 751060 May 19 16:31 make drwxr-xr-x 3 bsam wheel 3 Jan 5 02:18 usr % /usr/obj/usr/src/make.amd64/make -V MAKE_VERSION 20130330 ----- So, the affected system has and uses the wrong version of /usr/obj/usr/src/make.amd64/make. And it even is not overritten while building (at least without -j option). Sure, if this file is removed, the whole status-quo is restored (i.e. the build with '-j' option proceeds). Well, where this behaviuor is expected or not remains a question I have no answer to. -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve