Subject: build.sh & lex & dependall
To: None <current-users@netbsd.org>
From: Iain Hibbert <plunky@rya-online.net>
List: current-users
Date: 04/07/2006 13:19:40
Hi,
   Trying to build a world with a just now -current and getting the
following error. I was trying this last week and got the same thing, and I
dont see anybody else complaining so I guess it must be my system, but I
can't see what is wrong. Last time I built a world like this was back in
november and it worked ok then that I recall.

source is in /usr/src, owned by root.wheel and I have read only access
(0755 & 0644) there. I own the obj/tools directories and they were empty
when I started.

	sh build.sh -O /home/obj -T /home/tools tools kernel=GENERIC

worked fine, but

	sh build.sh -O /home/obj -T /home/tools -U build

Fails as below. it looks to me that lex is being told to put the
output file in the src directory, is that right? I was under the vague
impression that with -U, the src directory should be readonly?

iain

#    create  ar/ar.d
CC=/home/tools/bin/i386--netbsdelf-gcc /home/tools/bin/nbmkdep -f ar.d --      -I/usr/src/gnu/usr.bin/binutils/ar/../common/arch/i386 -DHAVE_CONFIG_H -D_GNU_SOURCE -Dbin_dummy_emulation=bin_vanilla_emulation -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/../bfd -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/../include -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/../intl  -I/usr/src/gnu/lib/libbfd/arch/i386  -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/include -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/bfd -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils  -DLOCALEDIR=\"/usr/share/locale\"  -nostdinc -isystem /home/obj/destdir.i386/usr/include   /usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/ar.c
#       lex  ar//usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.c
/home/tools/bin/nblex  -Pyy -o/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.c /usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.l
/home/tools/bin/nblex: could not create /usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.c

*** Failed target:  arlex.c
*** Failed command: /home/tools/bin/nblex -Pyy -o/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.c /usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/arlex.l
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/usr.bin/binutils/ar

*** Failed target:  dependall-ar
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="gnu/usr.bin/binutils/"; real="/usr/src/gnu/usr.bin/binutils" ;; *) this="gnu/usr.bin/binutils/${dir}/"; real="/usr/src/gnu/usr.bin/binutils/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget ar dependall
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/usr.bin/binutils

*** Failed target:  dependall-binutils
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="gnu/usr.bin/"; real="/usr/src/ gnu/usr.bin" ;; *) this="gnu/usr.bin/${dir}/"; real="/usr/src/gnu/usr.bin/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real} " && /home/tools/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget binutils dependall
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu/usr.bin

*** Failed target:  dependall-usr.bin
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="gnu/"; real="/usr/src/gnu" ;; *) this="gnu/${dir}/"; real="/usr/src/gnu/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THI SDIR_="${this}" "$@" ${target}; }; _makedirtarget usr.bin dependall
*** Error code 1

Stop.
nbmake: stopped in /usr/src/gnu

*** Failed target:  dependall-gnu
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this=
"${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THISDIR_="${this}"
"$@" ${target}; }; _makedirtarget gnu dependall
*** Error code 1

Stop.
nbmake: stopped in /usr/src

*** Failed target:  do-build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this=
"${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THISDIR_="${this}"
"$@" ${target}; }; _makedirtarget . dependall BUILD_tools=no BUILD_lib=no
*** Error code 1

Stop.
nbmake: stopped in /usr/src

*** Failed target:  build
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/usr/src" ;; *) this=
"${dir}/"; real="/usr/src/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THISDIR_="${this}"
"$@" ${target}; }; _makedirtarget . do-build
*** Error code 1

Stop.
nbmake: stopped in /usr/src

ERROR: Failed to make build
*** BUILD ABORTED ***
galant: {9}