Re: "make buildworld" fails

From: Boris Samorodov <bsam_at_passap.ru>
Date: Wed, 07 Aug 2013 14:31:48 +0400
06.08.2013 03:45, Robert Huff пишет:
> 
> Boris Samorodov writes:
> 
>>  This note from /usr/src/UPDATING may be relevant:
>>  -----
>>  20130613:
>>          Some people report the following error after the switch to bmake:
>>  
>>                  make: illegal option -- J
>>                  usage: make [-BPSXeiknpqrstv] [-C directory] [-D variable]
>>                          ...
>>                  *** [buildworld] Error code 2
>>  
>>          this likely due to an old instance of make in
>>          ${MAKEPATH} (${MAKEOBJDIRPREFIX}${.CURDIR}/make.${MACHINE})
>>          which src/Makefile will use that blindly, if it exists, so if
>>          you see the above error:
>>  
>>                  rm -rf `make -V MAKEPATH`
>>  
>>          should resolve it.
> 
> 	Would that it were so.  :-(
> 	1) 
> 
> huff_at_>> make -V MAKEPATH
> 
> huff_at_>>
> 
> 	2) After running the above, buildworld stops at the same place:
> 
> (cd /usr/src && make bmake)
> echo
> 
> echo "--------------------------------------------------------------"
> --------------------------------------------------------------
> echo ">>> Building an up-to-date make(1)"
>>>> Building an up-to-date make(1)
> echo "--------------------------------------------------------------"
> --------------------------------------------------------------
> cd /usr/src/usr.bin/bmake;  MAKEOBJDIRPREFIX=/usr/obj/usr/src/make.amd64  DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" make  -D_UPGRADING  -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WERROR obj &&  MAKEOBJDIRPREFIX=/usr/obj/usr/src/make.amd64  DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" make  -D_UPGRADING  -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WERROR depend &&  MAKEOBJDIRPREFIX=/usr/obj/usr/src/make.amd64  DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" make  -D_UPGRADING  -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WERROR all &&  MAKEOBJDIRPREFIX=/usr/obj/usr/src/make.amd64  DESTDIR=  INSTALL="sh /usr/src/tools/install.sh" make  -D_UPGRADING  -DNOMAN -DNO_MAN -DNOSHARED -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WERROR install DESTDIR=/usr/obj/usr/src/make.amd64 BINDIR= PROGNAME=bmake
> if ! test -d /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/; then  mkdir -p /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake;  if ! test -d /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/; then  echo "Unable to create /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake.";  exit 1;  fi;  echo "/usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake created for /usr/src/usr.bin/bmake";  fi
> /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake created for /usr/src/usr.bin/bmake
> set -e; for entry in unit-tests; do  if test -d /usr/src/usr.bin/bmake/${entry}.amd64; then  echo "===> ${entry}.amd64 (obj)";  edir=${entry}.amd64;  cd /usr/src/usr.bin/bmake/${edir};  else  echo "===> $entry (obj)";  edir=${entry};  cd /usr/src/usr.bin/bmake/${edir};  fi;  make obj  DIRPRFX=$edir/;  done
> ===> unit-tests (obj)
> if ! test -d /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests/; then  mkdir -p /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests;  if ! test -d /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests/; then  echo "Unable to create /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests.";  exit 1;  fi;  echo "/usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests created for /usr/src/usr.bin/bmake/unit-tests";  fi
> /usr/obj/usr/src/make.amd64/usr/src/usr.bin/bmake/unit-tests created for /usr/src/usr.bin/bmake/unit-tests
> rm -f .depend
> mkdep -f .depend -a    -DNO_PWD_OVERRIDE -I/usr/src/usr.bin/bmake -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/usr/src/contrib/bmake -DMAKE_NATIVE -std=gnu99   /usr/src/contrib/bmake/arch.c /usr/src/contrib/bmake/buf.c /usr/src/contrib/bmake/compat.c /usr/src/contrib/bmake/cond.c /usr/src/contrib/bmake/dir.c /usr/src/contrib/bmake/for.c /usr/src/contrib/bmake/hash.c /usr/src/contrib/bmake/job.c /usr/src/contrib/bmake/main.c /usr/src/contrib/bmake/make.c /usr/src/contrib/bmake/make_malloc.c /usr/src/contrib/bmake/meta.c /usr/src/contrib/bmake/parse.c /usr/src/contrib/bmake/str.c /usr/src/contrib/bmake/strlist.c /usr/src/contrib/bmake/suff.c /usr/src/contrib/bmake/targ.c /usr/src/contrib/bmake/trace.c /usr/src/contrib/bmake/util.c /usr/src/contrib/bmake/var.c /usr/src/contrib/bmake/lst.lib/lstAppend.c /usr/src/contrib/bmake/lst.lib/lstAtEnd.c /usr/src/contrib/bmake/ls
 t.lib/lst
AtFront.c /usr/src/contrib/bmake/lst.lib/lstClose.c /usr/src/contrib/bmake/lst.lib/lstConcat.c /usr/src/contrib/bmake/lst.lib/lstDatum.c /usr/src/contrib/bmake/lst.lib/lstDeQueue.c /usr/src/contrib/bmake/lst.lib/lstDestroy.c /usr/src/contrib/bmake/lst.lib/lstDupl.c /usr/src/contrib/bmake/lst.lib/lstEnQueue.c /usr/src/contrib/bmake/lst.lib/lstFind.c /usr/src/contrib/bmake/lst.lib/lstFindFrom.c /usr/src/contrib/bmake/lst.lib/lstFirst.c /usr/src/contrib/bmake/lst.lib/lstForEach.c /usr/src/contrib/bmake/lst.lib/lstForEachFrom.c /usr/src/contrib/bmake/lst.lib/lstInit.c /usr/src/contrib/bmake/lst.lib/lstInsert.c /usr/src/contrib/bmake/lst.lib/lstIsAtEnd.c /usr/src/contrib/bmake/lst.lib/lstIsEmpty.c /usr/src/contrib/bmake/lst.lib/lstLast.c /usr/src/contrib/bmake/lst.lib/lstMember.c /usr/src/contrib/bmake/lst.lib/lstNext.c /usr/src/contrib/bmake/lst.lib/lstOpen.c /usr/src/contrib/bmake/lst.lib/lstPrev.c /usr/src/contrib/bmake/lst.lib/lstRemove.c /usr/src/contrib/bmake/lst.lib/lstRepl
 ace.c /us
r/src/contrib/bmake/lst.lib/lstSucc.c /usr/src/contrib/bmake/stresep.c
> echo make: /usr/lib/libc.a  >> .depend
> cc -O -pipe -g -DNO_PWD_OVERRIDE -I/usr/src/usr.bin/bmake  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/usr/src/contrib/bmake  -DMAKE_NATIVE  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion  -c /usr/src/contrib/bmake/arch.c
> cc -O -pipe -g -DNO_PWD_OVERRIDE -I/usr/src/usr.bin/bmake  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/usr/src/contrib/bmake  -DMAKE_NATIVE  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion  -c /usr/src/contrib/bmake/buf.c
> cc -O -pipe -g -DNO_PWD_OVERRIDE -I/usr/src/usr.bin/bmake  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/usr/src/contrib/bmake  -DMAKE_NATIVE  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion  -c /usr/src/contrib/bmake/compat.c
> 
> 	.
> 	.
> 	.
> 
> cc -O -pipe -g -DNO_PWD_OVERRIDE -I/usr/src/usr.bin/bmake  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -DHAVE_CONFIG_H  -DUSE_META -DMAKE_NATIVE -DHAVE_CONFIG_H -D_PATH_DEFSYSPATH=\".../share/mk:/usr/share/mk\" -I. -I/usr/src/contrib/bmake  -DMAKE_NATIVE  -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion   -static -o make arch.o buf.o compat.o cond.o dir.o for.o hash.o job.o main.o make.o make_malloc.o meta.o parse.o str.o strlist.o suff.o targ.o trace.o util.o var.o lstAppend.o lstAtEnd.o lstAtFront.o lstClose.o lstConcat.o lstDatum.o lstDeQueue.o lstDestroy.o lstDupl.o lstEnQueue.o lstFind.o lstFindFrom.o lstFirst.o lstForEach.o lstForEachFrom.o lstInit.o lstInsert.o lstIsAtEnd.o 
 lstIsEmpt
y.o lstLast.o lstMember.o lstNext.o lstOpen.o lstPrev.o lstRemove.o lstReplace.o lstSucc.o stresep.o 
> sh /usr/src/tools/install.sh  -o root -g wheel -m 555   make /usr/obj/usr/src/make.amd64/bmake
> cd /usr/src; PATH=/sbin:/bin:/usr/sbin:/usr/bin `test -x /usr/obj/usr/src/make.amd64/bmake && echo /usr/obj/usr/src/make.amd64/bmake || echo make`  -m /usr/src/share/mk -f Makefile.inc1 TARGET=amd64 TARGET_ARCH=amd64 buildworld
> usage: bmake [-BeikNnqrstWwX] 
>             [-C directory] [-D variable] [-d flags] [-f makefile]
>             [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
>             [-V variable] [variable=value] [target ...]
> *** [buildworld] Error code 2
> 
> Stop in /usr/src.

OK, the note may be written not user-friendly.

Well, I've had something like you get:
http://lists.freebsd.org/pipermail/freebsd-current/2013-May/041976.html

The culprit was /usr/obj/usr/src/make.amd64/make. Seems to be your case
as well.

BTW, total removing of /usr/src should help also.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Received on Wed Aug 07 2013 - 08:31:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:40 UTC