Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Sep 2016 00:35:30 +0300
From:      Boris Samorodov <bsam@passap.ru>
To:        freebsd-current@freebsd.org
Subject:   should aarch64 cross-build work at amd64?
Message-ID:  <85ef2f0d-a91b-5af2-eae1-b10edf194807@passap.ru>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85ef2f0d-a91b-5af2-eae1-b10edf194807>