Date: Mon, 15 Nov 2010 19:35:08 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: rank1seeker@gmail.com Cc: freebsd-hackers@freebsd.org Subject: Re: Unhappy with cross-worlding Message-ID: <AANLkTikj5fmg08Vy-SfA-Hax2XwtJCKpRAWmVEytWghL@mail.gmail.com> In-Reply-To: <20101116.022422.921.1@DEV> References: <4CA4C63F.4070503@icyb.net.ua> <20101116.022422.921.1@DEV>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 15, 2010 at 6:24 PM, <rank1seeker@gmail.com> wrote: > So, I have Core 2 Duo, runing as i386. > I decided to go for amd64 (it's name, is so deceiving, that I've just > recently, accidentaly figured out, that it can be used, with intel CPUs, > too) :P > > 8.1 cross build i386 -> amd64 has failed > World completes successfully, but kernel fails: > > =A0 =A0mkdep -f .depend -a =A0 -nostdinc -D_KERNEL -DKLD_MODULE > -DHAVE_KERNEL_OPTION_HEADERS -I. -I@ -I@/contrib/altq - > =A0 =A0I/usr/obj/amd64/usr/src/sys/GENERIC > /usr/src/sys/modules/amr/amr_linux/../../../dev/amr/amr_linux.c > =A0 =A0/usr/src/sys/modules/amr/amr_linux/../../../dev/amr/amr_linux.c:43= :36: > error: machine/../linux/linux.h: No such file or directory > =A0 =A0/usr/src/sys/modules/amr/amr_linux/../../../dev/amr/amr_linux.c:44= :42: > error: machine/../linux/linux_proto.h: No such file or directory > =A0 =A0mkdep: compile failed > =A0 =A0*** Error code 1 > =A0 =A01 error > =A0 =A0*** Error code 2 > =A0 =A01 error > =A0 =A0*** Error code 2 > =A0 =A01 error > =A0 =A0*** Error code 2 > =A0 =A02 errors > =A0 =A0*** Error code 2 > =A0 =A01 error > =A0 =A0*** Error code 2 > =A0 =A01 error > > Then, I've snapped and took an USB stick and did a binary 8.1 amd64 insta= ll > on it. > Booted from it and kernel compiled flawlessly > > PS: > Core 2 Duo - 8.1 GENERIC > =A0 =A0Kernel build time: > =A0 =A010:30 --> i386 > =A0 =A008:30 --> amd64 > > =A0 =A0Yes, without caching! > > > PORTS: > ------ > >From i386, when created USB amd64, I wanted to compile some ports(i386 -= > > amd64), for that USB stick, on my own. > Especially because of port's patches ... > > DESTIR has been set, as usual, but TARGET, was a no go! > Looking into documentation, only /usr/src, supports TARGET, used for cros= s > world compilation. > Also, after throwing an eye into /usr/ports/Mk ..., I've concluded that > ports, simply can't be cross world compiled, as they don't support it. > > This 2 problems should be fixed. The best way to work with this is to create a chroot, set the appropriate variables (OSVERSION, UNAME_m, UNAME_r, etc), mount the /usr/ports via nullfs (if you dare) and then call chroot to access the chroot and build to your heart's content. There's an entry in the handbook somewhere that better describes how to do it from scratch, but my search skills are failing me and I don't have the full docs tree checked out. But yes, building amd64 on i386 probably won't work too well :)... HTH, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikj5fmg08Vy-SfA-Hax2XwtJCKpRAWmVEytWghL>