Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android mipsel linux gcc:未找到命令_Android_Linux_Bash_Gcc_Cross Compiling - Fatal编程技术网

Android mipsel linux gcc:未找到命令

Android mipsel linux gcc:未找到命令,android,linux,bash,gcc,cross-compiling,Android,Linux,Bash,Gcc,Cross Compiling,我正在尝试使用mipsellinuxgcc编译器交叉编译内核和rootfs。主机是64位的,而要构建的rootfs是32位的。但失败了。我已经使用apt get安装了gcc多库。然而,我不能建立。我已将PATH变量更新为所使用的工具链 echo $PATH usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/opt/toolschains/stbgcc-4.5.3-1.1/bin 我得到的错误是: root@an

我正在尝试使用mipsellinuxgcc编译器交叉编译内核和rootfs。主机是64位的,而要构建的rootfs是32位的。但失败了。我已经使用apt get安装了gcc多库。然而,我不能建立。我已将PATH变量更新为所使用的工具链

echo $PATH
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/opt/toolschains/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 LIB,如果找不到,请尝试建议的lib32z1 lib32ncurses5 lib32bz2-1.0软件包。这解决了我的问题。

尝试调用/opt/toolschains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc-v,如果系统仍然说找不到,那么您就没有合适的32位lib。还可以试试ldd/opt/toolschains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc.ldd显示的不是动态可执行文件,我希望是这样的。ldd不理解它的格式。ls-l/opt/toolschains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc和file/opt/toolschains/stbgcc-4.5.3-1.1/bin/mipsel-linux-uclibc-gcc说什么?为了确保,这些简单的事情都没问题。虽然这可能回答了这个问题,但请记住,这个问题是两年前提出的,而最初的海报很可能还没有遇到这个问题。因此,任何答案都应该针对可能也有相同问题的更多当前用户,并且还应该包括所建议的库的一些版本控制信息。