Ubuntu 16.04搭建交叉编译环境arm-linux-gcc遇到的问题

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qq_38175979/article/details/72530899

          以前在Ubuntu12.04环境中成功搭建了arm-linux-gcc,而环境换成了ubuntu16.04后,一直失败。具体情况为:

解压arm-linux-gcc-4.3.2.tar.gz,并且修改/root/.bashrc文件中的环境变量后,执行arm-linux-gcc,一直出现

  1. arm-linux-gcc:
  2. line 3:
  3. /usr/local/arm/arm-linux-gcc-4.3.2/bin/arm-none-linux-gnueabi-gcc:No such file or directory

     查询了好长时间,原来arm-linux-gcc需要a32-libs软件包的支持,但是Ubuntu16.04版本已不支持ia32-libs的软件包,而是使用了lib32ncurses5、lib32z1软件包做为替代,所以在Ubuntu16.04版本当中应该安装执行:


                   sudo apt-get install lib32ncurses5 lib32z1



结果成功!

展开阅读全文

搭建交叉编译环境遇到问题,求指导

02-08

make subdir=csu -C csu ..=../ subdir_librnmake[2]: Entering directory `/crosstool/glibc-2.13/csu'rn echo '#include "../posix/bits/posix1_lim.h"'; \rn echo '#define _LIBC 1'; \rn echo '#include "../misc/sys/uio.h"'; | \rn arm-linux-gcc -E -dM -MD -MP -MF /crosstool/glibc-2.13/build-arm-linux/bits/stdio_lim.dT -MT '/crosstool/glibc-2.13/build-arm-linux/bits/stdio_lim.h /crosstool/glibc-2.13/build-arm-linux/bits/stdio_lim.d' \rn -I../include -I/crosstool/glibc-2.13/build-arm-linux/csu -I/crosstool/glibc-2.13/build-arm-linux -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/local/arm/3.3.2/lib/gcc/arm-linux/4.6.3/include -isystem /usr/local/arm/3.3.2/lib/gcc/arm-linux/4.6.3/include-fixed -isystem ~/crosstool/linux-2.6.18/include -xc - -o /crosstool/glibc-2.13/build-arm-linux/bits/stdio_lim.hTrn../nptl/sysdeps/unix/sysv/linux/bits/local_lim.h:39:26: 致命错误:linux/limits.h:没有那个文件或目录rn编译中断。rnmake[2]: Leaving directory `/crosstool/glibc-2.13/csu'rnmake[1]: *** [csu/subdir_lib] 错误 2rnmake[1]: Leaving directory `/crosstool/glibc-2.13'rnmake: *** [all] 错误 2rnrn最近刚学交叉编译环境搭建,在搭建glibc库时,遇到上述问题,在网上搜集很多资料,也没有解决。本人Linux新手一个,望高人指导。 论坛

没有更多推荐了,返回首页