NetBSD Problem Report #25125

Received: (qmail 9259 invoked by uid 605); 10 Apr 2004 14:19:11 -0000
Message-Id: <>
Date: Sat, 10 Apr 2004 10:19:08 -0400 (EDT)
Subject: targets set DESTDIR inconsistently
X-Send-Pr-Version: 3.95

>Number:         25125
>Category:       toolchain
>Synopsis: 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
>Last-Modified:  Sun Apr 30 10:57:00 +0000 2006
>Originator:     Louis Guillaume
>Release:        NetBSD 2.0C
Berklee College of Music
System: NetBSD 2.0C NetBSD 2.0C (ASTER) #0: Fri Apr 9 20:16:39 EDT 2004 i386
Architecture: i386
Machine: i386
The "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.
/etc/mk.conf contains the following lines...


... On a clean checkout of /usr/src, do the following...

$ cd /usr/src
$ ./ -U -T /usr/obj/TOOLDIR.i386 tools
$ ./ -U -T /usr/obj/TOOLDIR.i386 kernel=ASTER # my kernel.
$ cd /usr/src
$ ./ -x -U -T /usr/obj/TOOLDIR.i386 release
$ su -
# ./ -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.

State-Changed-From-To: open->closed 
State-Changed-By: jmc 
State-Changed-When: Mon Jun 28 04:34:25 UTC 2004 
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-When: Mon, 29 Nov 2004 16:10:49 +0000
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:


    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
    $ ./ 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
    $ ./ 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
    # ./ 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.



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.