Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2016 23:14:05 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>, Ian Lapore <ian@freebsd.org>
Subject:   Re: Installworld failed
Message-ID:  <CABx9NuS-NwmAr0PB8htigZYuetHegP8vBAbtN5=oXKeLp6%2BK2A@mail.gmail.com>
In-Reply-To: <20160403193538.4390989.68535.4518@gmail.com>
References:  <CABx9NuR_ykXYnwtiamdBij%2B2wwKcXW1VJndEsX=iae%2B4ji4udw@mail.gmail.com> <CANCZdfoRgxNbT-OnCxDQ2kT7DNmS6C7J2jEQVwhM22bZBAe3HQ@mail.gmail.com> <20160403193538.4390989.68535.4518@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Apr 3, 2016 at 12:35 PM, Russell Haley <russ.haley@gmail.com> 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 <russ.haley@gmail.com>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuS-NwmAr0PB8htigZYuetHegP8vBAbtN5=oXKeLp6%2BK2A>