Re: buildkernel broken for META_MODE

From: Bryan Drewery <bdrewery_at_FreeBSD.org>
Date: Tue, 18 Apr 2017 14:44:11 -0700
On 4/18/2017 2:33 PM, Simon J. Gerraty wrote:
> Bryan Drewery <bdrewery_at_freebsd.org> wrote:
>> Aha /usr/obj/usr/obj.
>>
>> That was in Renato's report as well.
>>
>> The bug is WITH_AUTO_OBJ. I just confirmed that. A bunch of errors occur
>> when doing the first build and the opt_*.h files are not generated in
>> the "proper" place by config(8).
>>
>> WITH_AUTO_OBJ is not really workable yet in buildworld/buildkernel. I
>> have patches that I will commit soon to add support for them (meaning to
>> work as it all does not but without a 'make obj' tree walk).
> 
> What is the issue above? diff?

I don't know what the issue is with buildkernel specifically, I never
looked into it. Buildworld had other issues like rescue/rescue not being
AUTO_OBJ safe. That's fixed. I forget the details of buildworld as well.
One of the simpler changes is to remove the 'make obj' treewalk and
prefer .OBJDIR/OBJTOP over other ${CANONICALOBJDIR} ${OBJTREE} type
hacks. My patches are quite mangled with the idea of moving to
/usr/obj/CURDIR/TARGET.TARGET_ARCH/RELDIR and I need to split it all up
still.

> 
> FWIW the latest version of auto.obj.mk deals with __objdir=obj which is
> a corner case compared to any use of MAKEOJDIRPREFIX etc.
> 

It does not fix the issues.

> --------------------------------------------------------------
>>>> stage 2.2: rebuilding the object tree
> --------------------------------------------------------------
> cd /usr/obj/root/git/freebsd/sys/GENERIC; COMPILER_VERSION=40000  COMPILER_FEATURES=c++11  COMPILER_TYPE=clang  COMPILER_FREEBSD_VERSION=1200006 MAKEOBJDIRPREFIX=/usr/obj  MACHINE_ARCH=amd64  MACHINE=amd64  CPUTYPE= BUILD_TOOLS_META=.NOMETA GROFF_BIN_PATH=/usr/obj/root/git/freebsd/tmp/legacy/usr/bin  GROFF_FONT_PATH
> =/usr/obj/root/git/freebsd/tmp/legacy/usr/share/groff_font  GROFF_TMAC_PATH=/usr/obj/root/git/freebsd/tmp/legacy/usr/share/tmac CC="/usr/local/bin/ccache cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/root/git/freebsd/tmp -B/usr/obj/root/git/freebsd/tmp/usr/bin" CXX="/usr/local/bin/ccache c++  -target x86_
> 64-unknown-freebsd12.0 --sysroot=/usr/obj/root/git/freebsd/tmp -B/usr/obj/root/git/freebsd/tmp/usr/bin"  CPP="cpp -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/root/git/freebsd/tmp -B/usr/obj/root/git/freebsd/tmp/usr/bin"  AS="as" AR="ar" LD="ld" LLVM_LINK=""  NM=nm OBJCOPY="objcopy"  RANLIB=ranlib STRINGS=
>  SIZE="size"  INSTALL="sh /root/git/freebsd/tools/install.sh"  PATH=/usr/obj/root/git/freebsd/tmp/legacy/usr/sbin:/usr/obj/root/git/freebsd/tmp/legacy/usr/bin:/usr/obj/root/git/freebsd/tmp/legacy/bin:/usr/obj/root/git/freebsd/tmp/usr/sbin:/usr/obj/root/git/freebsd/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -j 1
> 5 -D NO_FILEMON -d M -J 15,16 -m /root/git/freebsd/share/mk  KERNEL=kernel obj
> [Creating objdir /usr/obj/usr/obj/root/git/freebsd/sys/GENERIC...]
Wrong^

Note we have 'cd /usr/obj/....' and 'MAKEOBJDIRPREFIX=/usr/obj' in
there, so we get a nested /usr/obj/.CURDIR problem of /usr/obj/usr/obj.


> grep: opt_md.h: No such file or directory
> grep: opt_ddb.h: No such file or directory
> grep: opt_kdtrace.h: No such file or directory
> grep: opt_hwpmc_hooks.h: No such file or directory
Wrong^


I will look into this as part of my larger patch, but it's likely due to
the first bug.



-- 
Regards,
Bryan Drewery


Received on Tue Apr 18 2017 - 19:44:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC