should aarch64 cross-build work at amd64?

From: Boris Samorodov <bsam_at_passap.ru>
Date: Sat, 24 Sep 2016 00:35:30 +0300
Hi All!

I've just created an armv6 jail by poudriere at FreeBSD-current-amd64.
It works fine:
---
% poudriere jail -l
JAILNAME   VERSION              ARCH      METHOD       TIMESTAMP
  PATH
HEAD-armv6 12.0-CURRENT r306267 arm.armv6 svn+https    2016-09-23
17:38:10 /poudriere/jails/HEAD-armv6
---


Then I tried to create an aarch64 jail which failed. Should it work?

-----
% uname -a
FreeBSD bb055.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #19 r306268: Fri
Sep 23 20:13:21 MSK 2016     bsam_at_bb055.bsnet:/usr/obj/usr/src/sys/BB64X
 amd64

% sudo binmiscctl lookup aarch64
name: aarch64
interpreter: /usr/local/bin/qemu-aarch64-static
flags: ENABLED USE_MASK
magic size: 20
magic offset: 0
magic: 0x7f 0x45 0x4c 0x46  0x02 0x01 0x01 0x00  0x00 0x00 0x00 0x00
       0x00 0x00 0x00 0x00  0x02 0x00 0xb7 0x00
mask:  0xff 0xff 0xff 0xff  0xff 0xff 0xff 0x00  0xff 0xff 0xff 0xff
       0xff 0xff 0xff 0xff  0xfe 0xff 0xff 0xff

% sudo poudriere jail -c -j HEAD-aarch64 -a arm.aarch64 -v head -m
svn+https -J 8

[00:00:00] ====>> Cross-building ports for arm.aarch64 on amd64 requires
QEMU
[00:00:00] ====>> Creating HEAD-aarch64 fs... done
[00:00:00] ====>> Checking out the sources from svn... done
[00:03:32] ====>> Starting make buildworld with 8 jobs
--- buildworld ---
make[1]: /poudriere/jails/HEAD-aarch64/usr/src/Makefile.inc1 line 146:
SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not
bootstrapping a cross-compiler.
make[1]: /poudriere/jails/HEAD-aarch64/usr/src/Makefile.inc1 line 177:
In-tree binutils does not support the aarch64 architecture. Install the
aarch64-binutils port or package or set CROSS_BINUTILS_PREFIX.
*** [buildworld] Error code 1

make: stopped in /poudriere/jails/HEAD-aarch64/usr/src
.ERROR_TARGET='buildworld'
.ERROR_META_FILE=''
.MAKE.LEVEL='0'
MAKEFILE=''
.MAKE.MODE='normal'
.CURDIR='/poudriere/jails/HEAD-aarch64/usr/src'
.MAKE='make'
.OBJDIR='/poudriere/jails/HEAD-aarch64/usr/src'
.TARGETS='buildworld'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/poudriere/jails/HEAD-aarch64/usr/src/share/mk'
MAKE_VERSION='20160818'
PATH='/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/poudriere/jails/HEAD-aarch64/usr/src'
OBJTOP='/poudriere/jails/HEAD-aarch64/usr/src'
1 error

make: stopped in /poudriere/jails/HEAD-aarch64/usr/src
.ERROR_TARGET='buildworld'
.ERROR_META_FILE=''
.MAKE.LEVEL='0'
MAKEFILE=''
.MAKE.MODE='normal'
.CURDIR='/poudriere/jails/HEAD-aarch64/usr/src'
.MAKE='make'
.OBJDIR='/poudriere/jails/HEAD-aarch64/usr/src'
.TARGETS='buildworld'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj'
MAKESYSPATH='/poudriere/jails/HEAD-aarch64/usr/src/share/mk'
MAKE_VERSION='20160818'
PATH='/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/poudriere/jails/HEAD-aarch64/usr/src'
OBJTOP='/poudriere/jails/HEAD-aarch64/usr/src'
[00:03:32] ====>> Error: Failed to 'make buildworld'
[00:03:32] ====>> Error while creating jail, cleaning up.
[00:03:32] ====>> Removing HEAD-aarch64 jail... done
%
-----

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Received on Fri Sep 23 2016 - 19:35:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:08 UTC