From owner-freebsd-current@FreeBSD.ORG Fri Feb 18 13:16:05 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8888D106564A; Fri, 18 Feb 2011 13:16:05 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 18E968FC16; Fri, 18 Feb 2011 13:16:04 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id p1IDG3cw025934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Feb 2011 14:16:03 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1298034963; bh=agaeMwDOINw2QRMo3w55dBfFK7YB7UoFTYbEFWYNxFw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=A8V6CDHbZBDy46r2JpoAz9kjaHTP5digXQIxdkPBEiNTZazXqAzjIvN6wtcg0+5Gp nrdsbT3IpN3aRCM4jG7MDuOeSBtUIYWWlB6X4Sfxomurk9qM0V5IWmQymxTCiCPKpD Zd+sNZgb9jkqsS6zWShyOAcwY2Nxmfagfio8bgeA= Date: Fri, 18 Feb 2011 14:16:03 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Alexander Best Message-ID: <20110218131603.GO65811@acme.spoerlein.net> Mail-Followup-To: Alexander Best , freebsd-current@freebsd.org References: <20110215211029.GA74471@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110215211029.GA74471@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-current@freebsd.org Subject: Re: $PATH and buildworld not getting along X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Feb 2011 13:16:05 -0000 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