Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2002 17:46:31 +0200
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Re: buildworld with ro /usr/src broken
Message-ID:  <20020319154631.GF87672@sunbay.com>
In-Reply-To: <20020317050354.GA4524@moo.holy.cow>
References:  <20020209130437.GA15287@myhakas.estpak.ee> <200202091743.g19HhIm00362@beerswilling.netscum.dyndns.dk> <20020227111914.GB30220@sunbay.com> <20020317050354.GA4524@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 17, 2002 at 12:03:55AM -0500, parv wrote:
> in message <20020227111914.GB30220@sunbay.com>,
> wrote Ruslan Ermilov thusly...
> >
> ...
> > MAKEOBJDIR[PREFIX] only work right if set as environment variables.
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This is documented in make(1) manpage and in /usr/share/mk/bsd.obj.mk.
> > 
> > I have an uncommitted patch that makes it possible to set them on
> > make(1)'s command line but still no joy in attempting to set them
> > in /etc/make.conf.  I bear in mind adding a patch to Makefile.inc1
> > too that would prevent people from attempting to set MAKEOBJDIRPREFIX
> > in /etc/make.conf.
> 
> seems like it is not yet possible to use MAKEOBJDIRPREFIX again in
> /etc/make.conf.  last cvsup was done on Sun Mar 17 2002 00:07:35 UTC
> (end time).  (MAKEOBJDIRPREFIX could have been specified in
> /etc/make.conf when i last built 4-stable around 2002-02-03 07.04.04
> UTC.
> 
> 
> if MAKEOBJDIRPREFIX (=/source/obj) had been specified,
> currently, in /etc/make.conf, make buildworld would die at the point
> below.  i had to unset MAKEOBJDIRPREFIX.  (/usr/src is
> symlinked to /source/src-stable, and /usr/obj to /source/obj.)
> 
This is because MAKEOBJDIRPREFIX=/source/obj in /etc/make.conf overrides
the later MAKEOBJDIRPREFIX=/usr/obj/source/src-stable/i386 assignment in
Makefile.inc1 (in BMAKEENV).  (make(1) prefers global variable to an
environment variable if both are specified, unless otherwise told by the
-e or -E options.)

"make obj" then creates object directory using MAKEOBJDIRPREFIX from
/etc/make.conf, but make(1) itself checks MAKEOBJDIRPREFIX environment
variable (as documented in manpage), doesn't find this object directory
("make obj" created different directory), and ends up with ${.OBJDIR}
set to /source/src-stable/games/fortune/strfile, which it cd's into.
mkdep(1) then fails with EACCES if run as non-root user, or (if run
under root) will spam your /usr/src with .depend (and object) files.

The solution (of course) is to set MAKEOBJDIRPREFIX in environment.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020319154631.GF87672>