Wrong command in the FreeBSD wiki page about cross compiling

Raven Iqqe raviqqe at gmail.com
Mon Mar 30 06:23:50 UTC 2015


Hi, all.

The command in FreeBSD wiki page, "A_Brief_Guide_To_Cross_Compiling_FreeBSD"
(https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD) 
seems to be wrong.
In the "Build World" section of the "Building and Installing World" 
part, it says;

% make buildworld TARGET=arm TARGET_ARCH=armeb 
MAKEOBJDIRPREFIX=/home/bob/obj

But, for some reason, setting MAKEOBJDIRPREFIX as a command line 
argument should not
be done as that is described in man page build(7). The correct one is below;

% MAKEOBJDIRPREFIX=/home/bob/obj make buildworld TARGET=arm 
TARGET_ARCH=armeb

or exporting it as a persistent environment variable,

% export MAKEOBJDIRPREFIX=/home/bob/obj
% make buildworld TARGET=arm TARGET_ARCH=armeb

This problem of failing cross compiling is reported a few times.
https://lists.freebsd.org/pipermail/freebsd-bugs/2015-January/059735.html
http://comments.gmane.org/gmane.os.freebsd.stable/91829
https://lists.freebsd.org/pipermail/freebsd-questions/2014-January/255447.html

I encountered the same problem as the last one.
I don't know why the original author wrote such a command and if it 
works in some particular
environment or not.
My uname -a is below;
FreeBSD blahblahblahof.blahblah 10.1-RELEASE-p6 FreeBSD 10.1-RELEASE-p6 #0:
Tue Feb 24 18:57:59 UTC 2015
root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386

Thanks,
raviqqe (raviqqe at gmail.com)


More information about the freebsd-doc mailing list