Linux(Centos)Hi3516交叉编译问题

1. vim /etc/profile 

    export PATH=$PATH:/home/xxxx/MyWork/arm-hisiv300-linux/arm-hisiv300-linux/bin

    source /etc/profile

2. ./configure --host=arm-hisiv300-linux-uclibcgnueabi(注意没有''-")

    make CC=arm-hisiv300-linux-uclibcgnueabi-gcc

 可能出现错误:

configure: error: C compiler cannot create executable

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

fatal error: gnu/stubs-32.h: No such file or directory


解决办法:

# yum groupinstall "Development Tools"

yum install glibc*.i686
yum install zlib*.i686
yum install libstdc++.so.6


出现这种问题的原因是由于Ubuntu14.04用的是64位的,

解决方法就是使用命令:sudo apt-get install ia32-libs 装一些32位的库,

待安装完32位的库之后,再使用命令:arm-linux-gcc -v,这一次就成功了


你可能感兴趣的:(Linux(Centos)Hi3516交叉编译问题)