Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bmake (installed as default make): make: illegal option -- J

1 view
Skip to first unread message

Florent Peterschmitt

unread,
May 17, 2013, 3:45:59 PM5/17/13
to freebsd...@freebsd.org
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 ?

--
Florent Peterschmitt
+33 (0)6 64 33 97 92
flo...@peterschmitt.fr

------------------------
O< ascii ribbon campaign
- stop html mail
- www.asciiribbon.org

signature.asc

Boris Samorodov

unread,
May 20, 2013, 5:53:52 AM5/20/13
to florent+Fre...@peterschmitt.fr, freebsd...@freebsd.org
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<><invalid>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
bs...@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
bs...@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
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

David Wolfskill

unread,
May 20, 2013, 8:00:04 AM5/20/13
to Boris Samorodov, freebsd...@freebsd.org
On Mon, May 20, 2013 at 01:53:28PM +0400, Boris Samorodov wrote:
> 17.05.2013 23:45, Florent Peterschmitt ??????????:
> > ...
> > Then install new world, reboot and so:
> >
> > $ cd /usr/src
> > $ make -j4 kernel
> > --- buildkernel ---
> > make: illegal option -- J
> ...
> > 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.
> ...
> 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.
> ....

OK; generalized a bit to "${MAKEOBJDIRPREFIX}/usr/src/make.`uname -p`/make",
I find that my systems that had been affected as above were (also)
restored to handling -j4 properly once I removed the offending file.

Thank you!

Peace,
david
--
David H. Wolfskill da...@catwhisker.org
Taliban: Evil men with guns afraid of truth from a 14-year old girl.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

Florent Peterschmitt

unread,
May 21, 2013, 4:51:41 PM5/21/13
to freebsd...@freebsd.org
You're right. I've juste rebuilt the world with previously rm -rf
/usr/obj/* to ensure anything could interfere with the new build.

I'll try soon with a partial rebuild and tell what's happening.

Thanks for investagation.
signature.asc

Julian Stecklina

unread,
May 22, 2013, 7:26:08 AM5/22/13
to freebsd...@freebsd.org
On 05/17/2013 09:45 PM, Florent Peterschmitt wrote:
> 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


This also affects building CURRENT from a 9.1 system. One workaround is
to build without -j, but this is quite painful on an 8-core box.

I tried using bmake from ports, but this fails, because the build system
seems to have PATH hardcoded and it doesn't include /usr/local/bin. With
`which bmake` -j8 buildworld it seems to work, though, but it is not
finished compiling yet.

Maybe a paragraph about the proper way to upgrade could be added to the
UPDATING entry?

Julian

Julian Stecklina

unread,
May 22, 2013, 9:02:31 AM5/22/13
to freebsd...@freebsd.org
On 05/22/2013 01:05 PM, Julian Stecklina wrote:
> This also affects building CURRENT from a 9.1 system. One workaround is
> to build without -j, but this is quite painful on an 8-core box.
>
> I tried using bmake from ports, but this fails, because the build system
> seems to have PATH hardcoded and it doesn't include /usr/local/bin. With
> `which bmake` -j8 buildworld it seems to work, though, but it is not
> finished compiling yet.

Fails when building /rescue, same as without absolute path.

+a-#+3-d+c-v+:-.+@-=+w-x@s@d@e@x@g@h@p@k

unread,
May 23, 2013, 10:12:45 AM5/23/13
to Julian Stecklina, freebsd...@freebsd.org
I disagree using bmake as default make

man src.conf
--


(c) http://glx.me/
0 new messages