Current-Users archive

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

Re: Where does the kernel get built?



On Sat, 26 Nov 2011, D'Arcy Cain wrote:
I have been having problems building on -current. I finally got a current snapshot and unpacked the sets. I checked out a brand new /usr/src. Then, as an experiment, I took away all my permissions to write in /usr/src and gave myself ownership of /usr/obj. Doing a "grep -i obj /etc/mk.conf" yields this:

MKOBJDIRS =                    YES
MKOBJ =                        YES
WRKOBJDIR =                     /usr/obj
MAKEOBJDIRPREFIX =              /usr/obj
TOOLDIR =                       /usr/obj/tools
OBJMACHINE =                    /usr/obj
BSDOBJDIR =                     /usr/obj
RELEASEDIR =                    /usr/obj/release

Some of those settings are very strange.

MAKEOBJDIRPREFIX must be set in the environment or on the command line, not in a Makefile.

OBJMACHINE should be set or unset; it's not a path.

MAKEOBJDIRPREFIX and BSDOBJDIR disagree about where the obj directories should go. (MAKEOBJDIRPREFIX says that the obj dir for /usr/src shouldbe /usr/obj/usr/src, but BSDOBJDIR says that the obj dir for /usr/src should be /usr/obj.)

Theoretically I should have been able to build everything as myself. I was able to complete "./build.sh tools" except that the only tools built were nbmake and nbmake-i386.

Before looking any further, we need to figure out why the tools
were not built.

I'd suggest removing all those strange settings from your /etc/mk.conf
as a start.

[...]

1.  Why don't all of the tools get built?
2.  Why is it trying to create files in /usr/src?

If obj dirs have not been made, then it will create files in the source tree. Strange mk.conf settings might have caused obj dirs not to be built.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index