From owner-freebsd-stable@FreeBSD.ORG Mon Jun 9 04:01:21 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39C48AA6 for ; Mon, 9 Jun 2014 04:01:21 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 15C7D26AE for ; Mon, 9 Jun 2014 04:01:21 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 48549668; Sun, 8 Jun 2014 21:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1402286479; bh=Sq+grfReu0FoaSKHz/nXDfpDJ9tySyPkKVDuhpbcDGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ml7+T2BdEanI0DS8lay9DDzlYeGMD91kfDWFzIenHfQSHvsSCt2/k/zmuAqPSIxjt bN8yuSBUy92ElVTTyEd6PesNO3DsypgzBi8bxnZGX+y+9SD/JZMccFfdp6UxBP/Ixu YIkBRBEvWIlLh8aWimzbst4yV26YFOf1iubiU3Uo= From: Peter Wemm To: freebsd-stable@freebsd.org Subject: Re: Cross-building FreeBSD core... Date: Sun, 08 Jun 2014 21:01:18 -0700 Message-ID: <2158607.RZmBJ56eyy@overcee.wemm.org> User-Agent: KMail/4.12.4 (FreeBSD/11.0-CURRENT; KDE/4.12.4; amd64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: Chris Ross X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2014 04:01:21 -0000 On Sunday 08 June 2014 23:05:25 Chris Ross wrote: > So, I was investigating the notion of cross-building FreeBSD stable/10. > Specifically, I wanted to try to build a full amd64 buildworld and > buildkernel on a sparc64. > > I found https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD > which I knew was a little old, but tried it. It failed in "stage 4.2: > building libraries", after quite a long time, eventually failing in: > > ===> lib/ncurses/ncurses (obj,depend,all,install) > [....] > cc -o make_keys -O2 -pipe -I. > -I/home/cross/obj.amd64/usr/src/lib/ncurses/ncurses/../ncurses > -I/usr/src/lib/ncurses/ncurses/../ncurses > -I/usr/src/lib/ncurses/ncurses/../ncurses > -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/include > -I/usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses -Wall > -DNDEBUG -DHAVE_CONFIG_H -DFREEBSD_NATIVE -DTERMIOS -std=gnu99 > -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall > -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign > -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare > -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function > -Wno-enum-conversion > /usr/src/lib/ncurses/ncurses/../../../contrib/ncurses/ncurses/tinfo/make_ke > ys.c ./make_keys keys.list > init_keytry.h > ./make_keys: Exec format error > *** Error code 126 > > > Is this a bug that needs to be fixed in the build system, or something I > did wrong to perform the build? > > I effectively did: > > make buildworld TARGET=amd64 TARGET_ARCH=amd64 > MAKEOBJDIRPREFIX=/home/cross/obj.amd64 I don't know if it's still the case, but MAKEOBJDIRPREFIX used to have to be set before calling make, ie something more like: env MAKEOBJDIRPREFIX=/home/cross/obj.amd64 make buildworld TARGET=amd64 TARGET_ARCH=amd64 -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246