Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Jun 2020 17:25:40 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Gordon Bergling <gbergling@googlemail.com>, freebsd-hackers@freebsd.org
Subject:   Re: Cross compile FreeBSD on amd64 for arm64 failes via compile determination error
Message-ID:  <2e91deb9835aaaadd6dceec95395b81f5257f15b.camel@freebsd.org>
In-Reply-To: <20200605183002.GA2973@lion.0xfce3.net>
References:  <20200605183002.GA2973@lion.0xfce3.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2020-06-05 at 20:30 +0200, Gordon Bergling via freebsd-hackers
wrote:
> Hi,
> 
> I usualy use a pretty straight forward technique to update some 
> development systems to -CURRENNT. On amd64 -> amd64 everything 
> went well, but on arm64 (Rasperry PI 4b) I get the following 
> error messages, while I try to update the system via a NFS share.
> 
> sh: cc: Exec format error
> make[2]: "/boiler/nfs/src/share/mk/bsd.compiler.mk" line 178: Unable
> to determine compiler type for CC=cc -target aarch64-unknown-
> freebsd13.0 --
> sysroot=/boiler/nfs/obj/boiler/nfs/src/arm64.aarch64/tmp
> -B/boiler/nfs/obj/boiler/nfs/src/arm64.aarch64/tmp/usr/bin.  Consider
> setting COMPILER_TYPE.
> 
> The command that produces the error is the following, which 
> was executed on the arm64 system, so no TARGET directive is set.
> 
> # env MAKEOBJDIRPREFIX=/boiler/nfs/obj make KERNCONF=GENERIC-TCP
> SRCCONF=/boiler/nfs/conf/src.conf installkernel
> 
> Has anyone an idea what the problem is in this step of the
> installation?
> 
> Any help is much appreciated.
> 
> Kind regards,
> 
> Gordon
> 

You cannot do that.  The installworld process uses a path that points
into the obj tree that got built (so that new binaries are used to do
the install work), and those binaries are compiled for the arch that
did the build.

-- Ian




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