Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2011 14:16:03 +0100
From:      Ulrich =?utf-8?B?U3DDtnJsZWlu?= <uqs@spoerlein.net>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: $PATH and buildworld not getting along
Message-ID:  <20110218131603.GO65811@acme.spoerlein.net>
In-Reply-To: <20110215211029.GA74471@freebsd.org>
References:  <20110215211029.GA74471@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 15.02.2011 at 21:10:29 +0000, Alexander Best wrote:
> hi there,
> 
> i've run into an issue where $PATH doesn't get discarded during buildworld. is
> this behavior to be expected? to reproduce do:
> 
> 1) be sure /usr/local/bin comes *before* /usr/bin in your $PATH
> 2) ln -s /bin/cat /usr/local/bin/cc (some sh script would be better)
> 3) cd /usr/src ; make SRCCONF=/dev/null __MAKE_CONF=/dev/null buildworld
> 4) see how buildworld fails, because cat(1) gets invoked instead of cc(1).
> 
> ... buildkernel on the other hand seems to be immune to such an issue.

The bootstrap stage needs *some* compiler on the host system to build
the (cross)compiler that is then used during the rest of buildworld (and
all of buildkernel). If you remove cc or c++ or libstdc++.so then you're
screwed.

As to whether the user's PATH should be honored for building the
bootstrap/cross/build-tools, I'd say yes.

If, however, the breakage is during the actual build-everything stage,
that would be a problem indeed.

Regards,
Uli



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