From owner-freebsd-arm@freebsd.org Wed Apr 6 06:14:06 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 B3C2EB058A8 for ; Wed, 6 Apr 2016 06:14:06 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x22d.google.com (mail-vk0-x22d.google.com [IPv6:2607:f8b0:400c:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6028F143C; Wed, 6 Apr 2016 06:14:06 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-vk0-x22d.google.com with SMTP id k1so46085301vkb.0; Tue, 05 Apr 2016 23:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=kqJsrpXn3bf/Fy2VpJSr0Xg0E3gGNOAL3tdlOu100dA=; b=qB9j2RNTb7WUL7FE1wRsQcxryv6i7/8TOHy/D3oyEy3we/dnDQ2zRgRjfArwSGjWA/ YGWpr2a/LzQheOHeVo1m0hGizex0+XX5EVYEpGUjlkbWd9L+6mARah1Mr3Hu9HerH2KL LzXnsGdSfVVIX1rhpLAbFH7GwrhC6GEdMpJBQIY8FV/vpDPmxyNnGcMXgRELOFkypagZ AGXqAdpkBAmKO3BphFKbU2Sq1e4vHhyPd+jczpSUHan1Tnl56faXszlLcOcvUZirTL2/ 57E12y6Kh4AQqtTnBfHGdvSsKdRfRUY8yKUsLJmv60VsjfD4Xy8wE4jDmIjSEzGUJYMw Zd1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=kqJsrpXn3bf/Fy2VpJSr0Xg0E3gGNOAL3tdlOu100dA=; b=MUseKkWkVtH0s5MVvvV3FbI1Zy7XM6uankhqMEbilb8w1fEUdbfjxRBwTPjXawSU6U yPdgrCXoJeNwkaLl/OYk5th0ivpb3kBifxAY1W9b34sjS8p+qM5SOkRzINS54GUus7Cn A+gJ4J2BHRl4cU3hqwSewTKs8xrRoA3R7KSDA7FH9TM4NUtA1Z0S2OFDfpWA/VwsFbhE Qxpc1riIcoNaeGMlWjvwiaXnTdwbcTb8pRW6g5Hq2oas3wW7srqJbwc1u5+Ane+Cmiqs wqaqe0PSrce9bRoHSBFdNlyvlMt/ACYwDChTQi56fqZxMlbgArGzzN00uOhFj9U3Mcbj 12Yw== X-Gm-Message-State: AD7BkJINp+wBOTKzaoH4YYgjQmi99SzNvWHlA+nxHiQiNU6lpDHF8Uoa0xwfB7XfF7YwWFp+Fw4JE5vZ3lPXuA== MIME-Version: 1.0 X-Received: by 10.176.2.49 with SMTP id 46mr10944336uas.39.1459923245461; Tue, 05 Apr 2016 23:14:05 -0700 (PDT) Received: by 10.31.54.13 with HTTP; Tue, 5 Apr 2016 23:14:05 -0700 (PDT) In-Reply-To: <20160403193538.4390989.68535.4518@gmail.com> References: <20160403193538.4390989.68535.4518@gmail.com> Date: Tue, 5 Apr 2016 23:14:05 -0700 Message-ID: Subject: Re: Installworld failed From: Russell Haley To: Warner Losh Cc: freebsd-arm , Ian Lapore Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 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 06:14:06 -0000 On Sun, Apr 3, 2016 at 12:35 PM, Russell Haley wrote= : > D'oh! > > Okay, I also noted that the wiki still mentions armv6hf which isn't a > thing anymore (right?). I'll take a shot at updating it and send a copy t= o > the =E2=80=8Emailing list? > > Russ > > Sent from my BlackBerry 10 smartphone on the Koodo network. > *From: *Warner Losh > *Sent: *Sunday, April 3, 2016 10:41 AM > *To: *Russell Haley > *Cc: *freebsd-arm > *Subject: *Re: Installworld failed > > > > On Sun, Apr 3, 2016 at 2:44 AM, Russell Haley > wrote: > >> Hello, >> >> I'm trying out the cross build instructions on the arm page and my >> installworld fails: >> >> Just had a successful buildworld and buildkernel >> Then, tried to run installworld: >> >> russellh@prescott:~/Projects/hummingboard/src% sudo make installworld >> TARGET_ARCH=3Darmv6 DESTDIR=3D${PWD}/nfsroot >> mkdir -p /tmp/install.mYvcGRG7 >> progs=3D$(for prog in [ awk cap_mkdb cat chflags chmod chown cmp cp >> date echo egrep find grep id install ln make mkdir mtree mv pwd_mkdb >> rm sed services_mkdb sh strip sysctl test true uname wc zic tzsetup >> makewhatis; do if progpath=3D`which $prog`; then echo $progpath; else >> echo "Required tool $prog not found in PATH." >&2; exit 1; fi; >> done); libs=3D$(ldd -f "%o %p\n" -f "%o %p\n" $progs 2>/dev/null | sort >> -u | while read line; do set -- $line; if [ "$2 $3" !=3D "not found" >> ]; then echo $2; else echo "Required library $1 not found." >&2; >> exit 1; fi; done); cp $libs $progs /tmp/install.mYvcGRG7 >> cp -R ${PATH_LOCALE:-"/usr/share/locale"} /tmp/install.mYvcGRG7/locale >> cd /usr/home/russellh/Projects/hummingboard/src; >> MAKEOBJDIRPREFIX=3D/usr/obj/arm.armv6 MACHINE_ARCH=3Darmv6 MACHINE=3Darm >> CPUTYPE=3D >> GROFF_BIN_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingbo= ard/src/tmp/legacy/usr/bin >> >> GROFF_FONT_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingb= oard/src/tmp/legacy/usr/share/groff_font >> >> GROFF_TMAC_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingb= oard/src/tmp/legacy/usr/share/tmac >> CC=3D"cc " CXX=3D"c++ " CPP=3D"cpp " AS=3D"as" AR=3D"ar" LD=3D"ld" NM= =3Dnm >> OBJDUMP=3Dobjdump OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SIZE=3D= "size" >> >> PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingboard/src/tm= p/legacy/usr/sbin:/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingboar= d/src/tmp/legacy/usr/bin:/usr/obj/arm.armv6/usr/home/russellh/Projects/humm= ingboard/src/tmp/legacy/bin:/usr/obj/arm.armv6/usr/home/russellh/Projects/h= ummingboard/src/tmp/usr/sbin:/usr/obj/arm.armv6/usr/home/russellh/Projects/= hummingboard/src/tmp/usr/bin:/tmp/install.mYvcGRG7 >> LD_LIBRARY_PATH=3D/tmp/install.mYvcGRG7 >> PATH_LOCALE=3D/tmp/install.mYvcGRG7/locale >> /usr/obj/usr/home/russellh/Projects/hummingboard/src/make.amd64/bmake >> -f Makefile.inc1 __MAKE_SHELL=3D/tmp/install.mYvcGRG7/sh reinstall; >> MAKEOBJDIRPREFIX=3D/usr/obj/arm.armv6 MACHINE_ARCH=3Darmv6 MACHINE=3Darm >> CPUTYPE=3D >> GROFF_BIN_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingbo= ard/src/tmp/legacy/usr/bin >> >> GROFF_FONT_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingb= oard/src/tmp/legacy/usr/share/groff_font >> >> GROFF_TMAC_PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingb= oard/src/tmp/legacy/usr/share/tmac >> CC=3D"cc " CXX=3D"c++ " CPP=3D"cpp " AS=3D"as" AR=3D"ar" LD=3D"ld" NM= =3Dnm >> OBJDUMP=3Dobjdump OBJCOPY=3D"objcopy" RANLIB=3Dranlib STRINGS=3D SIZE=3D= "size" >> >> PATH=3D/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingboard/src/tm= p/legacy/usr/sbin:/usr/obj/arm.armv6/usr/home/russellh/Projects/hummingboar= d/src/tmp/legacy/usr/bin:/usr/obj/arm.armv6/usr/home/russellh/Projects/humm= ingboard/src/tmp/legacy/bin:/usr/obj/arm.armv6/usr/home/russellh/Projects/h= ummingboard/src/tmp/usr/sbin:/usr/obj/arm.armv6/usr/home/russellh/Projects/= hummingboard/src/tmp/usr/bin:/tmp/install.mYvcGRG7 >> LD_LIBRARY_PATH=3D/tmp/install.mYvcGRG7 >> PATH_LOCALE=3D/tmp/install.mYvcGRG7/locale rm -rf /tmp/install.mYvcGRG7 >> cc: not found >> bmake[2]: "/usr/home/russellh/Projects/hummingboard/src/share/mk/ >> bsd.compiler.mk" >> line 141: Unable to determine compiler type for cc . Consider setting >> COMPILER_TYPE. >> *** Error code 1 >> >> Stop. >> bmake[1]: stopped in /usr/home/russellh/Projects/hummingboard/src >> *** Error code 1 >> >> Stop. >> make: stopped in /usr/home/russellh/Projects/hummingboard/src >> russellh@prescott:~/Projects/hummingboard/src% svn info >> Path: . >> Working Copy Root Path: /usr/home/russellh/Projects/hummingboard/src >> URL: https://svn0.us-west.freebsd.org/base/head >> Relative URL: ^/head >> Repository Root: https://svn0.us-west.freebsd.org/base >> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f >> Revision: 297517 >> Node Kind: directory >> Schedule: normal >> Last Changed Author: jmcneill >> Last Changed Rev: 297514 >> Last Changed Date: 2016-04-02 09:53:12 -0700 (Sat, 02 Apr 2016) >> >> russellh@prescott:~/Projects/hummingboard/src% >> >> Any input welcome. >> > > 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=3D$(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=3D$(pwd)/obj export DEST=3D$(pwd)/nfsroot cd src make buildworld TARGET_ARCH=3Darmv6 make buildkernel TARGET_ARCH=3Darmv6 KERNCONF=3DIMX6 sudo -E make installworld TARGET_ARCH=3Darmv6 DESTDIR=3D$DEST sudo -E make distribution TARGET_ARCH=3Darmv6 DESTDIR=3D$DEST sudo -E make installkernelTARGET_ARCH=3Darmv6 KERNCONF=3DIMX6 DESTDIR=3D$DE= ST Alternatively I tested DESTDIR as DESTDIR=3D$(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