From owner-freebsd-arm@freebsd.org Wed Apr 6 20:25:58 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0CC7B06E01 for ; Wed, 6 Apr 2016 20:25:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D154A1A1E for ; Wed, 6 Apr 2016 20:25:58 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 7d9ee4b2-fc35-11e5-827e-7d17a39bef25 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 6 Apr 2016 20:23:57 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u36KOm7E001808; Wed, 6 Apr 2016 14:24:48 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1459974288.1091.284.camel@freebsd.org> Subject: Re: Installworld failed From: Ian Lepore To: Russell Haley , Warner Losh Cc: freebsd-arm Date: Wed, 06 Apr 2016 14:24:48 -0600 In-Reply-To: References: <20160403193538.4390989.68535.4518@gmail.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 20:25:59 -0000 On Tue, 2016-04-05 at 23:14 -0700, Russell Haley wrote: > On Sun, Apr 3, 2016 at 12:35 PM, Russell Haley wrote: > > > [mixed top/bottom posting stuff trimmed] > > > > This usually is because MAKEOBJDIRPREFIX isn't set anymore > > now that you are root. > > > > So what's interesting for me is I've always run my cross builds in a jail > and just run it from /usr/src. The idea that I don't need sudo to build > (just install) is new to me. > > I tried adding MAKEOBJDIRPREFIX=$(PWD)/../obj to all my make commands but > that didn't work (and later noted Ian's script indicates this is an issue). > I lucked out and found something that said sudo can retain the current > users environment. The FreeBSD flag is -E. So I tried that with limited > success. The final problem was my destdir was not an absolute path. SO the > update to the wiki would be: > > export MAKEOBJDIRPREFIX=$(pwd)/obj > export DEST=$(pwd)/nfsroot > > cd src > make buildworld TARGET_ARCH=armv6 > make buildkernel TARGET_ARCH=armv6 KERNCONF=IMX6 > > sudo -E make installworld TARGET_ARCH=armv6 DESTDIR=$DEST > sudo -E make distribution TARGET_ARCH=armv6 DESTDIR=$DEST > sudo -E make installkernelTARGET_ARCH=armv6 KERNCONF=IMX6 DESTDIR=$DEST > > Alternatively I tested DESTDIR as DESTDIR=$(pwd)/../nfsroot which also > worked. > > So now after looking back at Ian's cross build script further down, my > question is why doesn't it fail due to the same issue? > > Thanks, > > Russ Doh! It works for me because my sudoers file contains: Defaults env_keep += "PKG_PATH PKG_DBDIR PKG_TMPDIR PACKAGEROOT PACKAGESITE PKGDIR" Defaults env_keep += "TMPDIR FTP_PASSIVE_MODE XDG_SESSION_COOKIE" Defaults env_keep += "PORTSDIR PORTS_INDEX PORTS_DBDIR PACKAGES PKGTOOLS_CONF" Defaults env_keep += "MAKEOBJDIRPREFIX MODULES_OVERRIDE SUBDIR_OVERRIDE" I guess I should mention that on the wiki page. -- Ian