提问:/bin/sh: 1: aarch64-none-elf-gcc: not found 如何解决


(ivibill) #1

Android源码下载下来以后,编译出错了。
/bin/sh: 1: aarch64-none-elf-gcc: not found
/bin/sh: 1: aarch64-none-elf-gcc: not found
…/scripts/Makefile.autoconf:40: recipe for target ‘include/autoconf.mk.dep’ failed
make[5]: *** [include/autoconf.mk.dep] Error 1
make[5]: *** Waiting for unfinished jobs…
…/scripts/Makefile.autoconf:64: recipe for target ‘include/autoconf.mk’ failed
make[5]: *** [include/autoconf.mk] Error 1
…/Makefile:487: recipe for target ‘silentoldconfig’ failed
make[4]: *** [silentoldconfig] Error 1
make[3]: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/uboot.release’. Stop.
Makefile:147: recipe for target ‘sub-make’ failed
make[2]: *** [sub-make] Error 2
package/pkg-generic.mk:216: recipe for target ‘/home/cmcc/rokid/output/banban_m2_a113/build/uboot-next-2015-dev-axg/.stamp_built’ failed
make[1]: *** [/home/cmcc/rokid/output/banban_m2_a113/build/uboot-next-2015-dev-axg/.stamp_built] Error 2
/home/cmcc/rokid/output/banban_m2_a113/Makefile:16: recipe for target ‘_all’ failed
make: *** [_all] Error 2
谁知道怎么解决?


(yam.zhang) #2

请问您是在哪儿下载的源码呢,您的系统是什么呢?您需要在Ubuntu (14.04 或者 16.04) 64位系统上进行操作哟,这里是教程呢~https://developer-forum.rokid.com/t/topic/991


(ivibill) #3

源码是从Rokid官网 通过repo同步下来的,编译环境是Ubuntu16.04.
开发版是A113 Linux板。

GEN ./Makefile
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf

configuration written to .config

uboot next-2015-dev-axg Building
PATH="/home/cmcc/Rokid/output/banban_m2_a113/host/bin:/home/cmcc/Rokid/output/banban_m2_a113/host/sbin:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/sbin:/home/cmcc/bin:/home/cmcc/bin:/home/cmcc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" AR="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-ar" AS="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-as" LD="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-ld" NM="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-nm" CC="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-gcc" GCC="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-gcc" CPP="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-cpp" CXX="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-g++" FC="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-gfortran" F77="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-gfortran" RANLIB="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-ranlib" READELF="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-readelf" STRIP="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-strip" OBJCOPY="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-objcopy" OBJDUMP="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-objdump" AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as" CC_FOR_BUILD="/usr/bin/gcc" GCC_FOR_BUILD="/usr/bin/gcc" CXX_FOR_BUILD="/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld" CPPFLAGS_FOR_BUILD="-I/home/cmcc/Rokid/output/banban_m2_a113/host/usr/include" CFLAGS_FOR_BUILD="-O2 -I/home/cmcc/Rokid/output/banban_m2_a113/host/usr/include" CXXFLAGS_FOR_BUILD="-O2 -I/home/cmcc/Rokid/output/banban_m2_a113/host/usr/include" LDFLAGS_FOR_BUILD="-L/home/cmcc/Rokid/output/banban_m2_a113/host/lib -L/home/cmcc/Rokid/output/banban_m2_a113/host/usr/lib -Wl,-rpath,/home/cmcc/Rokid/output/banban_m2_a113/host/usr/lib" FCFLAGS_FOR_BUILD="" DEFAULT_ASSEMBLER="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-as" DEFAULT_LINKER="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/aarch64-linux-gnu-ld" CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " LDFLAGS="" FCFLAGS=" -Os " FFLAGS=" -Os " PKG_CONFIG="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/bin/pkg-config" STAGING_DIR="/home/cmcc/Rokid/output/banban_m2_a113/host/usr/aarch64-linux-gnu/sysroot" INTLTOOL_PERL=/usr/bin/perl PATH=/home/cmcc/bin:/home/cmcc/bin:/home/cmcc/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/aarch64-buildroot-none-gnu/bin:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/gcc-arm-none-eabi-6-2017-q2-update/bin/:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/codesourcery/Sourcery_G++_Lite/bin:/home/cmcc/Rokid/output/banban_m2_a113/host/usr/arc-4.8-amlogic-20130904-r2/bin /usr/bin/make -j3 -j4 -C /home/cmcc/Rokid/output/banban_m2_a113/build/uboot-next-2015-dev-axg ARCH=arm all
make[3]: aarch64-none-elf-gcc: Command not found
/bin/sh: 1: aarch64-none-elf-gcc: not found
dirname: missing operand
Try ‘dirname --help’ for more information.
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
/bin/sh: 1: aarch64-none-elf-gcc: not found
/bin/sh: 1: aarch64-none-elf-gcc: not found
…/scripts/Makefile.autoconf:40: recipe for target ‘include/autoconf.mk.dep’ failed
make[5]: *** [include/autoconf.mk.dep] Error 1
make[5]: *** Waiting for unfinished jobs…
…/scripts/Makefile.autoconf:64: recipe for target ‘include/autoconf.mk’ failed
make[5]: *** [include/autoconf.mk] Error 1
…/Makefile:487: recipe for target ‘silentoldconfig’ failed
make[4]: *** [silentoldconfig] Error 1
make[3]: *** No rule to make target ‘include/config/auto.conf’, needed by ‘include/config/uboot.release’. Stop.
Makefile:147: recipe for target ‘sub-make’ failed
make[2]: *** [sub-make] Error 2
package/pkg-generic.mk:216: recipe for target ‘/home/cmcc/Rokid/output/banban_m2_a113/build/uboot-next-2015-dev-axg/.stamp_built’ failed
make[1]: *** [/home/cmcc/Rokid/output/banban_m2_a113/build/uboot-next-2015-dev-axg/.stamp_built] Error 2
/home/cmcc/Rokid/output/banban_m2_a113/Makefile:16: recipe for target ‘_all’ failed
make: *** [_all] Error 2


(ivibill) #4

一切都是按照步骤一步一步来的。主要就是说aarch64-none-elf-gcc这个编译工具找不到。


(767150435) #5

A113开发版不能编译android ,A113只能编译linux。


(312394539) #6

请问最后是怎么解决的