From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 16 03:35:09 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 619DC106566C for ; Tue, 16 Nov 2010 03:35:09 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id E92DF8FC16 for ; Tue, 16 Nov 2010 03:35:08 +0000 (UTC) Received: by mail-wy0-f182.google.com with SMTP id 36so251462wyb.13 for ; Mon, 15 Nov 2010 19:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=yWtvstZvNaRQVKIv+VaP+rw0xF2/1wc0rq1RvrNpRrk=; b=uwtCOOMzCdWAzRVFA+C/NMcwB0VYEDz0+CemH93Ro5MjKrG8iMhCrk/mjYZiY1hgFc OqmlyXcT+HB6qV1ZoyxOjgDaz0MWlIDQcqdi0Z05Sjb+bFPj7GwQWbgX5dmgLK8uw2zc fLD/JePgmOawYfdMQ4gdZK9rwjZQKud5MxP70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Rde9mOnrzUM9Bk2Ox4/kzS+Vl4lpdxechkqyNRT2PHv89NC3/BL28sYxPy3MVwKqfj aODzKqkhMbE8HjYGEgRxuBHH3G/zdxm4CcokHEWj1p+ymXzWf0jqtNiV+etMcu/GJg1V 9l3bqGtVbmWK09T5PStB5gbAHGdfLyqQMV3os= MIME-Version: 1.0 Received: by 10.216.46.200 with SMTP id r50mr8049373web.45.1289878508339; Mon, 15 Nov 2010 19:35:08 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Mon, 15 Nov 2010 19:35:08 -0800 (PST) In-Reply-To: <20101116.022422.921.1@DEV> References: <4CA4C63F.4070503@icyb.net.ua> <20101116.022422.921.1@DEV> Date: Mon, 15 Nov 2010 19:35:08 -0800 X-Google-Sender-Auth: WJj8ZMOTVYrhN8Msqh0u06eBFAU Message-ID: From: Garrett Cooper To: rank1seeker@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Unhappy with cross-worlding X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2010 03:35:09 -0000 On Mon, Nov 15, 2010 at 6:24 PM, 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