Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Feb 2015 14:40:07 +0100
From:      Eivind Evensen <eivinde@terraplane.org>
To:        "Herbert J. Skuhra" <herbert@oslo.ath.cx>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Cross build error
Message-ID:  <20150217134007.GB87703@klump.hjerdalen.lokalnett>
In-Reply-To: <20150217114935.GA51320@oslo.ath.cx>
References:  <20150217085857.GA87703@klump.hjerdalen.lokalnett> <20150217114935.GA51320@oslo.ath.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150217134007.GB87703>