From owner-freebsd-stable@FreeBSD.ORG Tue Feb 17 14:10:20 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4606D7F5 for ; Tue, 17 Feb 2015 14:10:20 +0000 (UTC) Received: from nmsh1.e.nsc.no (nmsh1.e.nsc.no [193.213.121.72]) by mx1.freebsd.org (Postfix) with ESMTP id 87F1CA7C for ; Tue, 17 Feb 2015 14:10:18 +0000 (UTC) Received: from terraplane.org (ti0027a400-0301.bb.online.no [85.164.8.49]) by nmsh1.nsc.no (8.14.7/8.14.7) with ESMTP id t1HDQU8X004262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 17 Feb 2015 14:26:30 +0100 (MET) Received: from terraplane.org (localhost [127.0.0.1]) by terraplane.org (8.14.5/8.14.5) with ESMTP id t1HDe7ea093056; Tue, 17 Feb 2015 14:40:07 +0100 (CET) (envelope-from rumrunner@terraplane.org) Received: (from rumrunner@localhost) by terraplane.org (8.14.5/8.13.8/Submit) id t1HDe7ZD093055; Tue, 17 Feb 2015 14:40:07 +0100 (CET) (envelope-from rumrunner) Date: Tue, 17 Feb 2015 14:40:07 +0100 From: Eivind Evensen To: "Herbert J. Skuhra" Subject: Re: Cross build error Message-ID: <20150217134007.GB87703@klump.hjerdalen.lokalnett> References: <20150217085857.GA87703@klump.hjerdalen.lokalnett> <20150217114935.GA51320@oslo.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150217114935.GA51320@oslo.ath.cx> Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2015 14:10:20 -0000 On Tue, Feb 17, 2015 at 12:49:35PM +0100, Herbert J. Skuhra wrote: > On Tue, Feb 17, 2015 at 09:58:58AM +0100, Eivind Evensen wrote: > > Hello. > > > > Using https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD > > as a reference, I've tried building for i386 on an amd64 machine. > > > > It stops in rescue/rescue with: > > > > (cd /home/rumrunner/midlertidig/krysskomp/rescue/rescue/../../usr.sbin/chown && make -DRESCUE CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/chown/ depend && make -DRESCUE CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/chown/ chown.o) > > cc -O2 -pipe -DRESCUE -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -c /home/rumrunner/midlertidig/krysskomp/usr.sbin/chown/chown.c > > MAKEOBJDIRPREFIX=/home/rumrunner/midlertidig/krysskomp/rescue/rescue make -f rescue.mk exe > > cc -O2 -pipe -c rescue.c > > rescue.c:59:2: warning: implicit declaration of function > > 'crunched_usage' is invalid in C99 > > [-Wimplicit-function-declaration] > > crunched_usage(); > > ^ > > 1 warning generated. > > echo "int _crunched_cat_stub(int argc, char **argv, char **envp){return main(argc,argv,envp);}" >cat_stub.c > > cc -O2 -pipe -c cat_stub.c > > cat_stub.c:1:67: warning: implicit declaration of function 'main' is > > invalid in C99 [-Wimplicit-function-declaration] > > ...argc, char **argv, char **envp){return main(argc,argv,envp);} > > ^ > > 1 warning generated. > > cc -O2 -pipe -c /home/rumrunner/midlertidig/krysskomp/bin/cat/cat.c > > ld -dc -r -o cat.lo cat_stub.o /home/rumrunner/midlertidig/krysskomp/bin/cat/cat.o > > ld: /home/rumrunner/midlertidig/krysskomp/bin/cat/cat.o: No such file: No such file or directory > > *** Error code 1 > > [...] > > > make.conf is empty and I don't have a src.conf. I started the build > > using > > $ make buildworld TARGET=i386 TARGET_ARCH=i386 \ > > MAKEOBJDIRPREFIX=/home/rumrunner/midlertidig/kryssobj > > > > > > which is how I interpreted the doc. Did I miss anything, or is this a > > real problem? > > Have you tried without MAKEOBJDIRPREFIX? Or: > > % export MAKEOBJDIRPREFIX=/home/rumrunner/midlertidig/kryssobj > % make buildworld TARGET=i386 TARGET_ARCH=i386 > > Have you tried with setting SRCCONF and __MAKE_CONF to /dev/null? > > What version are you running (uname -a) and what version are you trying > to build? > Herbert I forgot to mention the version. This is 10.1-stable. Just tried setting MAKEOBJDIRPREFIX in the environment as you suggested and that worked. Thanks -- Eivind