Subject: Re: build.sh & lex & dependall
To: Iain Hibbert <plunky@rya-online.net>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: current-users
Date: 04/07/2006 08:08:43
I think -U is used to indicate that when building sets a non-root user
is doing the build.  This, I suspect, circumvents some file ownership tes=
ts.

I don't *think* -U has anything to do with who owns the source tree.=20
I've always had my own source tree owned by me, and done all my work
under my own account.  This is known to work.

    -- Garrett

Iain Hibbert wrote:
> 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, an=
d 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 i=
n
> 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 empt=
y
> when I started.
>
> 	sh build.sh -O /home/obj -T /home/tools tools kernel=3DGENERIC
>
> 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=3D/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_C=
ONFIG_H -D_GNU_SOURCE -Dbin_dummy_emulation=3Dbin_vanilla_emulation -I/us=
r/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils -I/usr/src/=
gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils -I/usr/src/gnu/us=
r.bin/binutils/ar/../../../dist/binutils/binutils/../bfd -I/usr/src/gnu/u=
sr.bin/binutils/ar/../../../dist/binutils/binutils/../include -I/usr/src/=
gnu/usr.bin/binutils/ar/../../../dist/binutils/binutils/../intl  -I/usr/s=
rc/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/bi=
nutils/bfd -I/usr/src/gnu/usr.bin/binutils/ar/../../../dist/binutils/binu=
tils  -DLOCALEDIR=3D\"/usr/share/locale\"  -nostdinc -isystem /home/obj/d=
estdir.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/a=
r/../../../dist/binutils/binutils/arlex.c
>
> *** Failed target:  arlex.c
> *** Failed command: /home/tools/bin/nblex -Pyy -o/usr/src/gnu/usr.bin/b=
inutils/ar/../../../dist/binutils/binutils/arlex.c /usr/src/gnu/usr.bin/b=
inutils/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=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D"gnu/usr.bin/binutils/"; real=3D"/usr/src/gnu/usr.bin/binutils" ;; *)=
 this=3D"gnu/usr.bin/binutils/${dir}/"; real=3D"/usr/src/gnu/usr.bin/binu=
tils/${dir}" ;; esac; show=3D${this:-.}; echo "${target} =3D=3D=3D> ${sho=
w%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THISDIR_=3D=
"${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=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D"gnu/usr.bin/"; real=3D"/usr/src/ gnu/usr.bin" ;; *) this=3D"gnu/usr.=
bin/${dir}/"; real=3D"/usr/src/gnu/usr.bin/${dir}" ;; esac; show=3D${this=
:-.}; echo "${target} =3D=3D=3D> ${show%/}${1:+ (with: $@)}"; cd "${real}=
 " && /home/tools/bin/nbmake _THISDIR_=3D"${this}" "$@" ${target}; }; _ma=
kedirtarget binutils dependall
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src/gnu/usr.bin
>
> *** Failed target:  dependall-usr.bin
> *** Failed command: _makedirtarget() { dir=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D"gnu/"; real=3D"/usr/src/gnu" ;; *) this=3D"gnu/${dir}/"; real=3D"/us=
r/src/gnu/${dir}" ;; esac; show=3D${this:-.}; echo "${target} =3D=3D=3D> =
${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/tools/bin/nbmake _THI =
SDIR_=3D"${this}" "$@" ${target}; }; _makedirtarget usr.bin dependall
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src/gnu
>
> *** Failed target:  dependall-gnu
> *** Failed command: _makedirtarget() { dir=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D""; real=3D"/usr/src" ;; *) this=3D
> "${dir}/"; real=3D"/usr/src/${dir}" ;; esac; show=3D${this:-.}; echo "$=
{target} =3D=3D=3D> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/to=
ols/bin/nbmake _THISDIR_=3D"${this}"
> "$@" ${target}; }; _makedirtarget gnu dependall
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src
>
> *** Failed target:  do-build
> *** Failed command: _makedirtarget() { dir=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D""; real=3D"/usr/src" ;; *) this=3D
> "${dir}/"; real=3D"/usr/src/${dir}" ;; esac; show=3D${this:-.}; echo "$=
{target} =3D=3D=3D> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/to=
ols/bin/nbmake _THISDIR_=3D"${this}"
> "$@" ${target}; }; _makedirtarget . dependall BUILD_tools=3Dno BUILD_li=
b=3Dno
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src
>
> *** Failed target:  build
> *** Failed command: _makedirtarget() { dir=3D"$1"; shift; target=3D"$1"=
; shift; case "${dir}" in /*) this=3D"${dir}/"; real=3D"${dir}" ;; .) thi=
s=3D""; real=3D"/usr/src" ;; *) this=3D
> "${dir}/"; real=3D"/usr/src/${dir}" ;; esac; show=3D${this:-.}; echo "$=
{target} =3D=3D=3D> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /home/to=
ols/bin/nbmake _THISDIR_=3D"${this}"
> "$@" ${target}; }; _makedirtarget . do-build
> *** Error code 1
>
> Stop.
> nbmake: stopped in /usr/src
>
> ERROR: Failed to make build
> *** BUILD ABORTED ***
> galant: {9}
>  =20


--=20
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191