Cross compile FreeBSD on amd64 for arm64 failes via compile determination error

Yuri Pankov yuripv at yuripv.dev
Sat Jun 6 11:34:54 UTC 2020


Gordon Bergling wrote:
> Hi Mark,
> 
>> Am 06.06.2020 um 11:56 schrieb Mark Murray <markm at FreeBSD.org>:
>>
>>
>>> On 6 Jun 2020, at 00:25, Ian Lepore <ian at FreeBSD.org> wrote:
>>>
>>> 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.
>>
>> That is my experience.
>>
>> I used to work around a closely related problem when I built build* on
>> a fast machine, and did the install* on the slow ones. As I was using
>> automounts, I ended up with incompatible paths baked into the build,
>> so I worked around those with symlinks.
>>
>> I never tried this with anything other than i386/i386 or amd64/amd64,
>> so the above is interesting. Could a viable cross-build* be "fixed" by
>> symlinks, and somehow and easily forcing a cross-build of the bootstrap
>> tools?
>>
>> My RPis wish to know :-)
>>
>> M
>>> 
> In theory it should be possible to export the root filesystem of the RPIs and do a
> 
> make installworld -DNOROOT DESTDIR=/exported/root/rpi-1
> 
> or something like this on the fast machine.
> 
> But for now I have started the build on the raspberry pi directly to stress test
> it a bit. :)

I wonder why we need the compiler in the install* targets at all, 
shouldn't it be considered an error if we need to compile something 
while *installing*?


More information about the freebsd-hackers mailing list