Subject: build looping recursively
To: None <>
From: David Laight <>
List: tech-toolchain
Date: 07/17/2002 16:07:26
I did a cvs update to 'current' this morning, built a kernel,
rebooted and tried to build userspace....

The build would have UPDATE set and needed to build the 1.6D tools.
Now instead of failing because 'groff' didn't exist it go as far as

Making all in doc
Making all in po
/bin/sh ./libtool --mode=link cc -W -Wall -O  -o as-new  ...
cc -W -Wall -O -o as-new ...
.../nbmake -f /src/tools/toolchain/../Makefile.gnuwrap  all-recursive
Making all in po
/bin/sh ./libtool --mode=link cc -W -Wall -O  -o ld-new  ...
cc -W -Wall -O -o ld-new ldgram.o ...
running /bin/sh /src/tools/toolchain/../../gnu/dist/toolchain/gcc/configure ...
loading cache ../config.cache
checking LIBRARY_PATH variable... ok  
checking GCC_EXEC_PREFIX variable... ok
checking host system type... i386-unknown-netbsdelf1.6B
checking target system type... i386--netbsdelf
checking build system type... i386-unknown-netbsdelf1.6B
checking for gcc... (cached) cc 
checking whether the C compiler (cc -O ) works... yes
checking whether the C compiler (cc -O ) is a cross-compiler... no 
checking whether we are using GNU C... (cached) yes
checking whether cc accepts -g... (cached) yes
checking whether /obj/tools/tools.NetBSD-1.6D-i386/bin/nbmake -f /src/tools/toolchain/../Makefile.gnuwrap sets ${MAKE}...

investigation showed that the system was busy and generating more and
more processes.  The process loop seems to be:

/bin/sh -ec if [ ! -f config.status ] ; then  echo You must configure gcc.
	Look at the INSTALL file for details.;  false;  else
	LANGUAGES="c++ f77 objc" /bin/sh config.status --recheck;  fi
/bin/sh /src/tools/toolchain/../../gnu/dist/toolchain/gcc/configure
	--host=i386-unknown-netbsdelf1.6B --target=i386--netbsdelf
	--with-gnu-as --with-gnu-ld --disable-nls --disable-shared
	--cache-file=../config.cache --no-create --no-recursion
/bin/sh /src/tools/toolchain/../../gnu/dist/toolchain/gcc/configure ...
grep temp=
	-f /src/tools/toolchain/../Makefile.gnuwrap -f conftestmake

I tracked down part of the loop to the gcc configure script:
where it does (circa line 1270):
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1263: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; the
  echo $ac_n "(cached) $ac_c" 1>&6
  cat > conftestmake <<\EOF
        @echo 'ac_maketemp="${MAKE}"'
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`

Although I couldn't find out exactly what the make in the last line
was trying to do that caused the recursion.

An immediate rerun of failed saying that gcc must be configured.
A build after deleting all of obj/tools seems to be working.

I've still got the output log (stdout+stderr) from the first build.


David Laight: