NetBSD Problem Report #55786

From  Thu Nov  5 06:01:13 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id 481E11A9246
	for <>; Thu,  5 Nov 2020 06:01:13 +0000 (UTC)
Message-Id: <>
Date: Thu,  5 Nov 2020 07:01:04 +0100 (CET)
Subject: make(1) warns about unused obj dir
X-Send-Pr-Version: 3.95

>Number:         55786
>Category:       bin
>Synopsis:       make(1) warns about unused obj dir
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 05 06:05:00 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.75
The NetBSD Foundation, Inc.
System: NetBSD 9.99.75 NetBSD 9.99.75 (GENERIC) #425: Wed Nov 4 15:34:33 CET 2020 amd64
Architecture: x86_64
Machine: amd64

When manually cross-compiling a kernel for some machine where the OBJDIR in
the make wrapper was set up for another user (and the current ueser has no
permissions) causes a warning.


as one user:
	cd src
	./ -m evbarm -a earmv5 -M /work/obj/evbearmv5 -T /work/tools ...

as another user:
	cd src/sys/arch/evbarm/conf
	config $KERNEL
	/work/tools/bin/nbmake-evbarm depend && /work/tools/bin/nbmake-evbarm -j $N

This now causes a warning if the -M dir is not writable:

make warning: /work/obj/evbearmv5/work/src: Permission denied.
depending the kern library objects
#    create  kern/proc_compare.d
CC=/work/tools/bin/arm--netbsdelf-eabi-gcc /work/tools/bin/nbmkdep -f proc_compare.d.tmp  --   -std=gnu99   --sysroot=/work/hosts/evbearmv5 -I../../../../../../lib/libkern/arch/arm --sysroot=/work/hosts/evbearmv5 -DKERNEL_BASE_VOFFSET="(0xc0008000-0x00008000)" -I../../. -I../../../../../../external/bsd/libnv/dist -I../../../../../../../common/lib/libx86emu -I../../../../../../../common/lib/libc/misc -I../../../../../../../common/include -I../../../../../../arch -I../../../../../.. -nostdinc -DCOMPAT_UTILS -D__HAVE_PCI_CONF_HOOK -D__HAVE_CPU_UAREA_ALLOC_IDLELWP -DCOM_REGMAP -DKERNEL_BASE_EXT="0xc0000000" -DMSGBUFSIZE="32768" -DDIAGNOSTIC -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I../../../../../../lib/libkern/../../../common/lib/libc/quad -I../../../../../../lib/libkern/../../../common/lib/libc/string -I../../../../../../lib/libkern/../../../common/lib/libc/arch/arm/string -I../../../../../../lib/libkern/../../../common/lib/libc/hash/sha3 -I../../../../../../lib/libkern/../../../common/lib/
 libc/quad -I../../../../../../lib/libkern/../../../common/lib/libc/string -I../../../../../../lib/libkern/../../../common/lib/libc/arch/arm/string -I../../../../../../lib/libkern/../../../common/lib/libc/hash/sha3 -I../../../../../../lib/libkern/../../../common/include -I../../../../../../lib/libkern/../../../common/libc/hash/sha3     ../../../../../../lib/libkern/../../../common/lib/libutil/proc_compare.c &&  mv -f proc_compare.d.tmp proc_compare.d

This always used to work if the kernel in question did not already have an
objdir, so the local dir is used for building.

I'd argue that it should continue to work w/o warning.

Also the warning itself is not very descriptive maybe something like:

could not create $OBJDIR /work/obj/evbearmv5/work/src/sys/arch/evbarm/compile/$KERNEL: Permission denied.

would be better.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.