[英]Make cannot find present cross compiler
I'm using a make file to compile a kernel for an arm/Xilinx platform. 我正在使用一个make文件来为arm / Xilinx平台编译内核。
I'm setting an env variable CROSS_COMPILE
which the make file will then use. 我设置一个环境变量CROSS_COMPILE
,然后make文件将使用它。
I'm trying to use a cross compiler, which is present on my system, called arm-xilinx-linux-gnueabi-gcc
by setting the env var in the following ways; 我试图通过以下方式设置env var来使用系统中存在的交叉编译器,称为arm-xilinx-linux-gnueabi-gcc
。
export CROSS_COMPILE=/opt/Xilinx/SDK/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
The make file should append gcc
. 生成文件应附加gcc
。
The error given for both is 两者给出的错误是
make: /opt/Xilinx/SDK/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: Command not found
scripts/kconfig/conf --silentoldconfig Kconfig
make: /opt/Xilinx/SDK/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: Command not found
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
/bin/sh: 1: /opt/Xilinx/SDK/2015.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2
It works with other arm cross compilers but this one. 它可以与其他交叉双臂编译器一起使用,但是这一点。
Why is this? 为什么是这样?
According answers you gave in comments, you are trying to run a 32bits executable on a 64bits host platform. 根据您在注释中给出的答案,您正在尝试在64位主机平台上运行32位可执行文件。
So, if your are on Ubuntu check this answer from askubuntu . 因此,如果您使用的是Ubuntu,请从askubuntu查看此答案 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.