NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/55786: make(1) warns about unused obj dir



>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
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 9.99.75 NetBSD 9.99.75 (GENERIC) #425: Wed Nov 4 15:34:33 CET 2020 martin%seven-days-to-the-wolves.aprisoft.de@localhost:/work/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

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.

>How-To-Repeat:

as one user:
	cd src
	./build.sh -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 build.sh -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.

>Fix:
n/a



Home | Main Index | Thread Index | Old Index