From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 16 03:36:30 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 B80A1106564A for ; Tue, 16 Nov 2010 03:36:30 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0488FC16 for ; Tue, 16 Nov 2010 03:36:29 +0000 (UTC) Received: by wwd20 with SMTP id 20so245561wwd.31 for ; Mon, 15 Nov 2010 19:36:29 -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=q9/O1Suq1XhJnD1g+cQI2fK1Igowdynx0nr8WAePZtk=; b=TU3pfDbSYrXArn4xxqqad98u4yFLc8tEExGq95LUEwsVC85sSRjiqjTv70LNhN8OmW ERdSsqFy9DuGzFd8qoQFEfL9IKs3RnydTJ6DKJuxSYhp2vU8ApG3ZG16/9Y0dqDOUS7j eAaJvRtbEvsQYyMtrLuEKWjnpeNV9ravfNsYI= 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=M/EenYRkrzuN4JGFm9YvHxlQEHj9UtlKRY3aj1AXmcHtBmZUOuldnUv5VPaoblU6qz af7YtkZ5NE6oINAz44mP4EhtzOju4e2SkVHkWje4bQSTX9CUR5hT39hletGXY5l3jKQB Goif917fDY3Z+dvFqVVEzEa2iH+KaD5Kl2zWM= MIME-Version: 1.0 Received: by 10.216.46.200 with SMTP id r50mr8050441web.45.1289878588935; Mon, 15 Nov 2010 19:36:28 -0800 (PST) Sender: yanegomi@gmail.com Received: by 10.216.198.27 with HTTP; Mon, 15 Nov 2010 19:36:28 -0800 (PST) In-Reply-To: References: <4CA4C63F.4070503@icyb.net.ua> <20101116.022422.921.1@DEV> Date: Mon, 15 Nov 2010 19:36:28 -0800 X-Google-Sender-Auth: iUp_CiUAL8sy-TkT5N2TqNpnm3A 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:36:30 -0000 On Mon, Nov 15, 2010 at 7:35 PM, Garrett Cooper wrote= : > On Mon, Nov 15, 2010 at 6:24 PM, =A0 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