android - mipsel-linux-gcc : Command not found

标签 android linux bash gcc cross-compiling

我正在尝试使用 mipsel-linux-gcc 编译器交叉编译内核和 rootfs。主机是64位的,而要构建的rootfs是32位的。我尝试安装ia32-libs和ia32-libs-multiarch。但失败了。我已经使用 apt-get 安装了 gcc-multilib。但是,我无法构建。我已将 PATH 变量更新为所使用的工具链。

echo $PATH

usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/toolchains/stbgcc-4.5.3-1.1/bin

我得到的错误:

root@android-build:uclinux-rootfs# make vmlinuz-7425b0-android
make TFTPHOST=android-build TFTPDIR=/tftpboot/$USER TFTPPATH=$USER defaults-7425b0-android
make[1]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'

WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin

The recommended toolchain for this release is:
stbgcc-4.5.3-2.4

perl -w bin/config.pl save_defaults 7425b0-android
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile savedefconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --savedefconfig=defconfig Kconfig
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -j1 silentoldconfig
make[2]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'

WARNING: using toolchain binaries in:
/opt/toolchains/stbgcc-4.5.3-1.1/bin

The recommended toolchain for this release is:
stbgcc-4.5.3-2.4

make -C linux ARCH=mips silentoldconfig
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile silentoldconfig
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
scripts/kconfig/conf --silentoldconfig Kconfig
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -C linux ARCH=mips prepare scripts
make[3]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make -f Makefile prepare
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
/bin/sh: mipsel-linux-gcc: not found
make[4]: mipsel-linux-gcc: Command not found
make[4]: Entering directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
CHK     include/linux/version.h
CHK     include/generated/utsrelease.h
CC      kernel/bounds.s
/bin/sh: mipsel-linux-gcc: not found
make[5]: *** [kernel/bounds.s] Error 127
make[4]: *** [prepare0] Error 2
make[4]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[3]: *** [prepare] Error 2
make[3]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/linux'
make[2]: *** [silentoldconfig] Error 2
make[2]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make[1]: *** [defaults-7425b0-android] Error 2
make[1]: Leaving directory `/opt/kernel/android/kernel-3.3-1.2-7425b0/uclinux-rootfs'
make: *** [vmlinuz-7425b0-android] Error 2

但是我得到的 mipsel-linux-gcc 给出了正确的答案

which mipsel-linux-uclibc-gcc
/opt/toolchains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc

我需要导出的变量可能是什么?

最佳答案

我遇到了“找不到命令”的问题。尝试安装 ia32-libs,或者如果未找到,请尝试建议的 lib32z1 lib32ncurses5 lib32bz2-1.0 软件包。这解决了我的问题。

关于android - mipsel-linux-gcc : Command not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25624682/

相关文章:

arrays - 在 Bash 中的不同行上打印数组元素?

java - findViewById 在 func 中动态转换?

android - 如何以编程方式更改选项卡指示器颜色

linux asm x86 产生段错误

python - shell脚本在后台运行的进程没有输出

linux - 检查程序是否存在

Android TextView 3行水平滚动

具有 2 个内容的 Android LinearLayout,一个应该占用 30dp,另一个应该占用其余的

python - Ubuntu Python : "get_mac" function not defined

node.js - 设置终端命令以在 Crontab 中运行