首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

一套完整的ARM交叉编译环境的搭建过程(6)

一套完整的ARM交叉编译环境的搭建过程(6)

编译出错:

1)checking for suffix of object files... configure: error: in `/opt/embedded/build-tools/build-glibc':

configure: error: cannot compute suffix of object files: cannot compile

See `config.log' for more details

## ----------- ##

## Core tests. ##

## ----------- ##



configure:2363: checking build system type

configure:2377: result: x86_64-unknown-linux-gnu

configure:2397: checking host system type

configure:2410: result: arm-unknown-linux-gnu

configure:2439: checking for arm-linux-gcc

configure:2466: result: arm-linux-gcc

configure:2735: checking for C compiler version

configure:2744: arm-linux-gcc --version >&5

../glibc-2.13/configure: line 2746: arm-linux-gcc: command not found

configure:2755: $? = 127

configure:2744: arm-linux-gcc -v >&5

../glibc-2.13/configure: line 2746: arm-linux-gcc: command not found

configure:2755: $? = 127

configure:2744: arm-linux-gcc -V >&5

../glibc-2.13/configure: line 2746: arm-linux-gcc: command not found

configure:2755: $? = 127

configure:2744: arm-linux-gcc -qversion >&5

../glibc-2.13/configure: line 2746: arm-linux-gcc: command not found

configure:2755: $? = 127

configure:2760: checking for suffix of object files

configure:2782: arm-linux-gcc -c conftest.c >&5

../glibc-2.13/configure: line 2784: arm-linux-gcc: command not found

configure:2786: $? = 127

configure: failed program was:

| /* confdefs.h */

| #define PACKAGE_NAME "GNU C Library"

| #define PACKAGE_TARNAME "c-library"

| #define PACKAGE_VERSION "(see version.h)"

| #define PACKAGE_STRING "GNU C Library (see version.h)"

| #define PACKAGE_BUGREPORT "glibc"

| #define PACKAGE_URL "http://www.gnu.org/software/c-library/"



解决方法:PATH=$PREFIX/binPATH ../glibc-2.13/configure BUILD_CC="gcc" CC=arm-linux-gcc --host=$TARGET --target=$TARGET --prefix=/usr --enable-add-ons --disable-profile --cache-file=config.cache --with-binutils=$PREFIX/bin/ --with-headers=$TARGET_PREFIX/include/ ,在配置前面加上PATH=$PREFIX/binPATH ,虽然你可能已加到bash.bashrc或/etc/profile,即将编译成的arm-linux-gcc设置了环境变量,用arm-linux-gcc -v检查发现已存在,但就是不好使,编译会报错(上述),故在配置前面加上此句。
继承事业,薪火相传
返回列表