Subject: Re: toolchain/25125
To: None <toolchain-manager@netbsd.org, netbsd-bugs@netbsd.org,>
From: None <sketch@netbsd.org>
List: netbsd-bugs
Date: 11/29/2004 16:10:50
Synopsis: build.sh targets set DESTDIR inconsistently

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.