我正在尝试构建交叉编译器,但由于某种原因,binutils无法编译。当我运行make all
时,这是我在一段时间后得到的:
加载缓存.././config.cache
检查是否启用Makefile的维护者特定部分...没有 检查是否安装libbfd ...没有 检查可执行文件后缀...(缓存).dSYM
检查gcc ...(缓存)/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
检查C编译器(/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -g -O2)是否有效...没有
configure:error:安装或配置问题:C编译器无法创建可执行文件 make: * [configure-opcodes]错误1
查看config.log
这就是我得到的:
configure:565: checking for Cygwin environment
configure:598: checking for mingw32 environment
configure:675: checking host system type
configure:696: checking target system type
configure:714: checking build system type
configure:739: checking for gcc
configure:852: checking whether the C compiler (/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -g -O2 ) works
configure:868: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -o conftest -g -O2 conftest.c 1>&5
configure:894: checking whether the C compiler (/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -g -O2 ) is a cross-compiler
configure:899: checking whether we are using GNU C
configure:927: checking whether /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 accepts -g
configure:959: checking for POSIXized ISC
configure:997: checking for a BSD compatible install
configure:1050: checking whether build environment is sane
configure:1107: checking whether make sets ${MAKE}
configure:1153: checking for working aclocal
configure:1166: checking for working autoconf
configure:1179: checking for working automake
configure:1192: checking for working autoheader
configure:1205: checking for working makeinfo
configure:1228: checking for ar
configure:1260: checking for ranlib
configure:1407: checking for ld used by GCC
configure:1475: checking if the linker (/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2) is GNU ld
configure:1492: checking for /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 option to reload object files
configure:1504: checking for BSD-compatible nm
configure:1542: checking whether ln -s works
configure:1563: checking how to recognise dependant libraries
configure:1736: checking for object suffix
configure:1762: checking for executable suffix
configure:1932: checking for ranlib
configure:1999: checking for strip
ltconfig:678:checking for /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 option to produce PIC
ltconfig:687:checking that /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 PIC flag -fPIC -DPIC works.
ltconfig:749: checking if /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 static flag works
ltconfig:780: finding the maximum length of command line arguments
ltconfig:@lineno@: result: 98305
ltconfig:887: checking if /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 supports -fno-rtti -fno-exceptions
ltconfig:888: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -c -g -O2 -fno-rtti -fno-exceptions -c conftest.c conftest.c 1>&5
ltconfig:1431: checking if global_symbol_pipe works
ltconfig:1432: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -c -g -O2 conftest.c 1>&5
ltconfig:1435: eval "nm conftest.o | sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > conftest.nm"
cannot find nm_test_var in conftest.nm
ltconfig:1431: checking if global_symbol_pipe works
ltconfig:1432: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -c -g -O2 conftest.c 1>&5
ltconfig:1435: eval "nm conftest.o | sed -n -e 's/^.*[ ]\([BCDEGRST][BCDEGRST]*\)[ ][ ]*\(_\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > conftest.nm"
ltconfig:1487: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -o conftest -g -O2 -fno-builtin conftest.c conftstm.o 1>&5
configure:2338: checking whether to enable maintainer-specific portions of Makefiles
configure:2361: checking whether to install libbfd
configure:2398: checking for executable suffix
configure:2434: checking for gcc
configure:2547: checking whether the C compiler (/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -g -O2 ) works
configure:2563: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 -o conftest.dSYM -g -O2 conftest.c 1>&5
ld: can't open output file for writing: conftest.dSYM, errno=21 for architecture x86_64
collect2: ld returned 1 exit status
configure: failed program was:
#line 2558 "configure"
#include "confdefs.h"
main(){return(0);}
我该怎么做才能纠正这个问题?