Date: Mon, 23 Apr 2018 22:44:08 +0000 From: Glen Barber <gjb@FreeBSD.org> To: KIRIYAMA Kazuhiko <kiri@kx.openedu.org> Cc: freebsd-stable@freebsd.org Subject: Re: What should do in chrooted environment? Message-ID: <20180423224408.GC56778@FreeBSD.org> In-Reply-To: <201804232228.w3NMS6UW042861@kx.openedu.org> References: <201804232228.w3NMS6UW042861@kx.openedu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--JWEK1jqKZ6MHAcjA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 24, 2018 at 07:28:06AM +0900, KIRIYAMA Kazuhiko wrote: > Hi, all >=20 > I've make buildworld in chrooted environment. But failed at > 'stage 4.2: building libraries' [1]: >=20 > objcopy --only-keep-debug libproc.so.3.full libproc.so.3.debug > objcopy --strip-debug --add-gnu-debuglink=3Dlibproc.so.3.debug libproc.s= o.3.full libproc.so.3 > sh /usr/src/tools/install.sh -C -o root -g wheel -m 444 libproc.a /usr= /obj/usr/src/tmp/usr/lib/ > sh /usr/src/tools/install.sh -s -o root -g wheel -m 444 libproc.so.3= /usr/obj/usr/src/tmp/usr/lib/ > sh /usr/src/tools/install.sh -o root -g wheel -m 444 libproc.so.3.deb= ug /usr/obj/usr/src/tmp/usr/lib/debug/usr/lib/ > sh /usr/src/tools/install.sh -l rs libproc.so.3 /usr/obj/usr/src/tmp/usr= /lib/libproc.so > sh /usr/src/tools/install.sh -C -o root -g wheel -m 444 /usr/src/lib/li= bproc/libproc.h /usr/obj/usr/src/tmp/usr/include/ > make[5]: "/dev/null" line 1: Need an operator > make[5]: Fatal errors encountered -- cannot continuemake[4]: "/usr/src/Ma= kefile.inc1" line 421: warning: "MK_AUTO_OBJ=3Dno MAKEFLAGS=3D CPUTYPE=3Ddu= mmy make -f /dev/null -m /usr/src/share/mk -V CPUTYPE" returned non-zero s= tatus > make[4]: "/usr/src/Makefile.inc1" line 423: CPUTYPE global should be set = with ?=3D. > *** Error code 1 >=20 > Stop. > make[3]: stopped in /usr/src > *** Error code 1 >=20 > Stop. > make[2]: stopped in /usr/src > *** Error code 1 >=20 > Stop. > make[1]: stopped in /usr/src >=20 > My chrooted environment is a bhyve vm attach & mounted one > like this(*1): >=20 > root@vms:~ # mdconfig -a -t vnode -f /vm/tbedfs/disk0.img=20 > md0 > root@vms:~ # gpart show md0 > =3D> 40 16777136 md0 GPT (8.0G) > 40 24 - free - (12K) > 64 1024 1 freebsd-boot (512K) > 1088 16776023 2 freebsd-ufs (8.0G) > 16777111 41 - free - (21K) > 16777152 23 3 freebsd-swap (12K) > 16777175 1 - free - (512B) >=20 > root@vms:~ # mount /dev/md0p2 /mnt >=20 >=20 > And src and obj are nullfs mounted to latest src > repository(r332874) and OBJDIR respectively: >=20 >=20 > root@vms:~ # uname -a > FreeBSD vms.pis 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r331153: Tue Mar 20 = 10:13:56 JST 2018 admin@t.pis:/ds/obj/current/12.0/r331153/ds/src/curre= nt/12.0/r331153/amd64.amd64/sys/GENERIC amd64 > root@vms:~ #=20 > admin@vms:~ % df > Filesystem 1K-blocks Used Avail Capacity Mo= unted on > /dev/aacd0p4 10143484 4624840 4707168 50% / > devfs 1 1 0 100% /d= ev > /dev/aacd0p5 14560423728 79273144 13316316688 1% /ds > /ds/.dake 14560423728 79273144 13316316688 1% /.= dake > /ds/vm 14560423728 79273144 13316316688 1% /vm > /dev/md0p2 5061084 3053316 1602884 66% /m= nt > /ds/src/stable/11.1/r332874 14560423728 79273144 13316316688 1% /m= nt/usr/src > /ds/obj/stable/11.1/r332874 14560423728 79273144 13316316688 1% /m= nt/usr/obj > admin@vms:~ %=20 >=20 >=20 > Then chroot to /mnt and make buildworld: >=20 >=20 > root@vms:~ # chroot /mnt "make buildworld" >=20 >=20 > Of course 'make buildworld' in vm was successfully finished [2]: >=20 >=20 > admin@tbedfs:~ % uname -a > FreeBSD tbedfs 11.1-STABLE FreeBSD 11.1-STABLE #0 r332428: Thu Apr 12 16:= 37:51 UTC 2018 root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERI= C amd64 > admin@tbedfs:~ % df > Filesystem 1K-blocks Used Avail Capa= city Mounted on > /dev/vtbd0p2 8106116 849980 6607648 1= 1% / > devfs 1 1 0 10= 0% /dev > vms.pis:/.dake 14560423728 83720204 13311869628 = 1% /.dake > vms.pis:/ds/src/stable/11.1/r332874 14560423728 83720204 13311869628 = 1% /usr/src > vms.pis:/ds/obj/stable/11.1/r332874 14560423728 83720204 13311869628 = 1% /usr/obj > admin@tbedfs:~ % su > Password: > root@tbedfs:/usr/home/admin # cd /usr/src/ > root@tbedfs:/usr/src # make buildworld >=20 >=20 > To make buildworld in chrooted environment, what should I do ? >=20 I think you might not have the devfs mount in the image. With the paths provided above, I think this should fix it: # mount -t devfs devfs /mnt/dev Glen --JWEK1jqKZ6MHAcjA Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAlreYbgACgkQAxRYpUeP 4pPU3RAAnPkyTicQYW1s/Tq9VeLFGL28yhzAx9d0mPL6Sxl66vk/0Fr8PeMSldzE 06oCGbw2EQXRc9BMXOkPSg72BLh3gPq5XpLI0F0WwV9Fv7oKpvqZpb7GOKPJNcpF /DqoKIfNrMkobFt0T+5O8Cj+/n4kv9uCZH1JreXpltCkvRKFoczZ+7OH5yHi8WTo rTC8f8rov3cij8joGnG+SqKWeg6UCTcO4CWGAcGXXgSw6M5+GmSSlQ5ajW6Vrqg3 8E1oOwKX49Cp/3WBqfizT79T/HSQjrVC1WwA22vATMm/IcXlES4MqTv8yOyeoP3Y nlfInttrL9C1WbrjhAKjY9l2n45E2JqAQ2yusxyxl/aK/2XH9VQX6En6A2r3JVwV x9ngi47U+/zyaDthmBxnGJ8aPTckTebLOyKpEt5wI8SvTGmjpAJn6p418qneTFgB 6pMUrZ9U0vSuMcOR5WZ8I4sz0RH0X0OCE6i/VsWzO7BxGSfOcog2aYAhV+8Mvts+ Sy+GhXgmyOylr5XxWdEqkKgXQwssE5/49iY5VPd2nFlJJ2QqgXSsRXj/GybkvCg2 hdl2xStom/ispzVaGRe5KEdf4c9bLBrugqv3aTRp0nSUtW/3i2OuhEeoshWNwXel dH/edf1qf6VvfcxyemjpCW3/EW3KyU7+j4zeCCuA9wOa/+Mwg6o= =U9XW -----END PGP SIGNATURE----- --JWEK1jqKZ6MHAcjA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180423224408.GC56778>