NetBSD Problem Report #25125
Received: (qmail 9259 invoked by uid 605); 10 Apr 2004 14:19:11 -0000
Message-Id: <200404101419.i3AEJ8bQ012103@shodo.berklee.net>
Date: Sat, 10 Apr 2004 10:19:08 -0400 (EDT)
From: lguillaume@berklee.edu
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: lguillaume@berklee.edu
To: gnats-bugs@gnats.NetBSD.org
Subject: build.sh targets set DESTDIR inconsistently
X-Send-Pr-Version: 3.95
>Number: 25125
>Category: toolchain
>Synopsis: build.sh targets set DESTDIR inconsistently
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Apr 10 14:20:00 +0000 2004
>Closed-Date:
>Last-Modified: Sun Apr 30 10:57:00 +0000 2006
>Originator: Louis Guillaume
>Release: NetBSD 2.0C
>Organization:
Berklee College of Music
>Environment:
System: NetBSD shodo.berklee.net 2.0C NetBSD 2.0C (ASTER) #0: Fri Apr 9 20:16:39 EDT 2004 louis@shodo.berklee.net:/usr/obj/sys/arch/i386/compile/ASTER i386
Architecture: i386
Machine: i386
>Description:
The build.sh "release" target defaults DESTDIR and RELEASEDIR to /usr/src/destdir.i386 and /usr/src/releasedir respectively.
The "install" target defaults DESTDIR and RELEASEDIR to /usr/src/obj/destdir.i386 and /usr/src/obj/releasedir respsectively.
These defaults are inconsistent.
>How-To-Repeat:
/etc/mk.conf contains the following lines...
OBJMACHINEDIR=YES
MKOBJDIRS=YES
... On a clean checkout of /usr/src, do the following...
$ cd /usr/src
$ ./build.sh -U -T /usr/obj/TOOLDIR.i386 tools
$ ./build.sh -U -T /usr/obj/TOOLDIR.i386 kernel=ASTER # my kernel.
Reboot.
$ cd /usr/src
$ ./build.sh -x -U -T /usr/obj/TOOLDIR.i386 release
$ su -
# ./build.sh -u -U -T /usr/obj/TOOLDIR.i386 install=/
The install will fail beacuse it's looking for DESTDIR in /usr/src/obj/destdir.i386 instead of /usr/src/destdir.i386 as created by the release target.
I suspect that the release target is the one that's misbehaving.
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: jmc
State-Changed-When: Mon Jun 28 04:34:25 UTC 2004
State-Changed-Why:
I can find no way under normal circumstances this can happen and testing
using the exact mechanisms mentioned in the PR also do not show this.
In all cases tested DESTDIR remained the same (it's set in the nbmake wrapper
script so once tools get made the first time it's not changing).
State-Changed-From-To: closed->open
State-Changed-By: sketch@netbsd.org
State-Changed-When: Mon, 29 Nov 2004 16:10:49 +0000
State-Changed-Why:
I'm reopening this PR as I'm seeing the exact same behaviour which is causing
me problems for any MKUPDATE build. I can work around the issue by moving
destdir.i386 to obj/ but that then breaks any subsequent MKUPDATE builds with
odd "can't make sys/types.h" errors.
Relevant information:
mk.conf:
BSDSRCDIR= /usr/sketch/cvs/netbsd/src
X11SRCDIR= /usr/sketch/cvs/netbsd/xsrc
BSDOBJDIR= /var/build/obj
TOOLDIR:= ${BSDOBJDIR}/tooldir.${HOST_OSTYPE}
RELEASEDIR:= ${BSDOBJDIR}/releasedir
MKUNPRIVED= yes
MKUPDATE= yes
MKX11= yes
X11DRI= yes
build process:
$ cd ${HOME}/cvs/netbsd/src
$ ./build.sh tools
[...]
# objdir /var/build/obj/tools
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> TOOLDIR path: /var/build/obj/tooldir.NetBSD-2.99.10-i386
===> DESTDIR path: /usr/sketch/cvs/netbsd/src/destdir.i386
===> RELEASEDIR path: /var/build/obj/releasedir
[...]
$ ./build.sh distribution
[...]
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> TOOLDIR path: /var/build/obj/tooldir.NetBSD-2.99.10-i386
===> DESTDIR path: /usr/sketch/cvs/netbsd/src/destdir.i386
===> RELEASEDIR path: /var/build/obj/releasedir
[...]
$ su -
# cd ~sketch/cvs/netbsd/src
# ./build.sh install=/
[...]
===> MACHINE: i386
===> MACHINE_ARCH: i386
===> TOOLDIR path: /var/build/obj/tooldir.NetBSD-2.99.10-i386
===> DESTDIR path: /usr/sketch/cvs/netbsd/src/obj/destdir.i386
===> RELEASEDIR path: /var/build/obj/releasedir
[...]
installsets ===> distrib/sets (with: INSTALLDIR=/ INSTALLSETS=)
cd /usr/sketch/cvs/netbsd/src/distrib/sets && DESTDIR=/usr/sketch/cvs/netbsd/sr
c/obj/destdir.i386 MACHINE=i386 MACHINE_ARCH=i386 CKSUM=/var/build/obj/tooldir
.NetBSD-2.99.10-i386/bin/nbcksum MAKE=/var/build/obj/tooldir.NetBSD-2.99.10-i386
/bin/nbmake MTREE=/var/build/obj/tooldir.NetBSD-2.99.10-i386/bin/nbmtree MKTEMP
=/var/build/obj/tooldir.NetBSD-2.99.10-i386/bin/nbmktemp PAX=/var/build/obj/tool
dir.NetBSD-2.99.10-i386/bin/nbpax HOST_SH=sh sh ./maketars -d /usr/sketch/cvs/n
etbsd/src/obj/destdir.i386 -M /usr/sketch/cvs/netbsd/src/obj/destdir.i386/METAL
OG -N /usr/sketch/cvs/netbsd/src/etc -b -i /
./maketars: cannot create /usr/sketch/cvs/netbsd/src/obj/destdir.i386/etc/mtree/
set.base: directory nonexistent
[...]
etc. DESTDIR has clearly changed since the 'su -'. If the mk.conf setup is
incorrect, then that may be, but I've not seen anything in the documentation
which suggests my setup is incorrect.
Thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.