> On 31. Dec 2021, at 12:37, John D. Baker <jdba...@consolidated.net> wrote:
> 
> The recent changes to build "netbsd-${CONF}.debug" seems not to work
> for unprivileged builds when building custom kernels as it wants to
> install the file owned by "root":
> 
> [...]
> #      link  DAVID/netbsd
> /r0/build/current/tools/amd64/bin/sparc--netbsdelf-ld -Map netbsd.map --cref 
> -n -T netbsd.ldscript -Ttext F0004000 -e start -X -X -o netbsd 
> ${SYSTEM_OBJ:[@]:Nswapnetbsd.o} ${EXTRA_OBJ} vers.o swapnetbsd.o
> NetBSD 9.99.93 (DAVID) #376: Fri Dec 31 02:44:31 CST 2021
>   text    data     bss     dec     hex filename
> 4808082  118584  147752 5074418  4d6df2 netbsd
> + mv -f netbsd netbsd.gdb
> + /r0/build/current/tools/amd64/bin/sparc--netbsdelf-objcopy 
> --only-keep-debug netbsd.gdb netbsd-DAVID.debug
> + /r0/build/current/tools/amd64/bin/sparc--netbsdelf-objcopy --strip-debug -p 
> -R .gnu_debuglink --add-gnu-debuglink=netbsd-DAVID.debug netbsd.gdb netbsd
> + chmod 755 netbsd netbsd.gdb netbsd-DAVID.debug
> --- /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug ---
> #   install  /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug
> /r0/build/current/tools/amd64/bin/sparc--netbsdelf-install  -c -p -r -o root 
> -g bin -m 444 netbsd-DAVID.debug 
> /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug
> sparc--netbsdelf-install: 
> /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug.inst.fO9ANt:
>  chown/chgrp: Operation not permitted
> 
> *** Failed target: 
> /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug
> *** Failed commands:
>        ${_MKTARGET_INSTALL}
>        => @echo '#  ' "install " 
> /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug
>        ${INSTALL_FILE} -o root -g bin -m 444 ${.ALLSRC} ${.TARGET}
>        => /r0/build/current/tools/amd64/bin/sparc--netbsdelf-install  -c -p 
> -r -o root -g bin -m 444 netbsd-DAVID.debug 
> /r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug
> *** [/r0/build/current/DEST/sparc/usr/libdata/debug/netbsd-DAVID.debug] Error 
> code 1
> 
> nbmake: stopped in /r0/build/current/obj/sparc/sys/arch/sparc/compile/DAVID
> 1 error
> 
> nbmake: stopped in /r0/build/current/obj/sparc/sys/arch/sparc/compile/DAVID
> 
> ERROR: Failed to make debuginstall in 
> "/r0/build/current/obj/sparc/sys/arch/sparc/compile/DAVID"
> *** BUILD ABORTED ***

For me the attached diff works.  It skips the install
outside ${NETBSDSRCDIR}.

--
J. Hannken-Illjes - hann...@mailbox.org

Attachment: Makefile.kern.inc.diff
Description: Binary data

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to