From owner-freebsd-stable@FreeBSD.ORG Tue Feb 17 11:49:39 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 8A8F694E for ; Tue, 17 Feb 2015 11:49:39 +0000 (UTC) Received: from oslo.ath.cx (oslo.ath.cx [IPv6:2a01:4f8:200:42e4::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oslo.ath.cx", Issuer "oslo.ath.cx" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D62E9810 for ; Tue, 17 Feb 2015 11:49:38 +0000 (UTC) Received: by oslo.ath.cx (OpenSMTPD) with ESMTP id 247d45a6; Tue, 17 Feb 2015 12:49:35 +0100 (CET) Date: Tue, 17 Feb 2015 12:49:35 +0100 From: "Herbert J. Skuhra" To: Eivind Evensen Subject: Re: Cross build error Message-ID: <20150217114935.GA51320@oslo.ath.cx> References: <20150217085857.GA87703@klump.hjerdalen.lokalnett> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150217085857.GA87703@klump.hjerdalen.lokalnett> User-Agent: Mutt/1.5.23 (2014-03-12) 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 11:49:39 -0000 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