Date: Mon, 15 Nov 2010 19:36:28 -0800 From: Garrett Cooper <gcooper@FreeBSD.org> To: rank1seeker@gmail.com Cc: freebsd-hackers@freebsd.org Subject: Re: Unhappy with cross-worlding Message-ID: <AANLkTim43e62SOGWKmEwKKmHA9T884U3h5JRZeXp4LJx@mail.gmail.com> In-Reply-To: <AANLkTikj5fmg08Vy-SfA-Hax2XwtJCKpRAWmVEytWghL@mail.gmail.com> References: <4CA4C63F.4070503@icyb.net.ua> <20101116.022422.921.1@DEV> <AANLkTikj5fmg08Vy-SfA-Hax2XwtJCKpRAWmVEytWghL@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 15, 2010 at 7:35 PM, Garrett Cooper <gcooper@freebsd.org> wrote= : > On Mon, Nov 15, 2010 at 6:24 PM, =A0<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:4= 3: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:4= 4: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 inst= all >> 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 cro= ss >> 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. > > =A0 =A0The 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. > =A0 =A0But yes, building amd64 on i386 probably won't work too well :)... Clarification: well, when applied to the above method. I don't know how well cross-building amd64 works on 8-stable... Thanks, -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim43e62SOGWKmEwKKmHA9T884U3h5JRZeXp4LJx>