在OS X上使用crosstool-ng构建ARM交叉编译器

时间:2014-05-17 13:43:09

标签: macos crosstool-ng

我正在尝试在我的Mac上为我的Raspberry Pi创建一个交叉编译器,我已经设法配置,构建和安装了crosstool-ng,但是在构建arm-unknow-linux-gnueabi工具链时,它失败了。 ./ct-ng build的输出是:

[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20140517.143156
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Dumping user-supplied crosstool-NG configuration'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@125]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/usr/local/share/doc/crosstool-ng/ct-ng.1.19.0/B - Known issues.txt'
[ERROR]   
[ERROR]  (elapsed: 0:00.00)
[00:00] / make: *** [build] Error 1

build.log的内容是:

[INFO ]  Performing some trivial sanity checks
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  Testing '! ( -n  )'
[DEBUG]  ==> Executing: 'mkdir' '-p' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build' 
[DEBUG]  ==> Executing: 'rm' '-f' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/backtrace' 
[DEBUG]  ==> Executing: 'touch' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/foo' 
[DEBUG]  Testing '! ( -f /Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/FOO )'
[DEBUG]  ==> Executing: 'rm' '-f' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/foo' 
[DEBUG]  Testing '-f /bin/bash -a -x /bin/bash'
[DEBUG]  Creating bin-override for tools in '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools'
[DEBUG]  ==> Executing: 'mkdir' '-p' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin' 
[DEBUG]  Creating script-override for 'install' -> '"/usr/bin/install -c"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/install' 
[DEBUG]  Creating script-override for 'bash' -> '"/bin/bash"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/bash' 
[DEBUG]  Creating script-override for 'awk' -> '"/usr/local/bin/awk"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/awk' 
[DEBUG]  Creating script-override for 'grep' -> '"/usr/bin/grep"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/grep' 
[DEBUG]  Creating script-override for 'make' -> '"/usr/bin/make"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/make' 
[DEBUG]  Creating script-override for 'sed' -> '"/usr/local/bin/sed"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/sed' 
[DEBUG]  Creating script-override for 'libtool' -> '"/usr/local/bin/libtool"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/libtool' 
[DEBUG]  Creating script-override for 'libtoolize' -> '"/usr/local/bin/libtoolize"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/libtoolize' 
[DEBUG]  Creating script-override for 'objcopy' -> '"/usr/local/bin/objcopy"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/objcopy' 
[DEBUG]  Creating script-override for 'objdump' -> '"/usr/local/bin/objdump"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/objdump' 
[DEBUG]  Creating script-override for 'readelf' -> '"/usr/local/bin/readelf"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/readelf' 
[DEBUG]  Creating script-override for 'patch' -> '"/usr/bin/patch"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/patch' 
[DEBUG]  Creating script-override for 'gperf' -> '"/usr/bin/gperf"'
[DEBUG]  ==> Executing: 'chmod' '700' '/Volumes/crosstool/crosstool-ng-1.19.0/usr/local/bin/.build/tools/bin/gperf' 
[INFO ]  Build started 20140517.161844
[DEBUG]  =================================================================
[DEBUG]  Dumping user-supplied crosstool-NG configuration
[DEBUG]    ==> Executing: 'grep' '-E' '^(# |)CT_' '.config' 
[DEBUG]    grep: empty (sub)expression
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Dumping user-supplied crosstool-NG configuration'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@216]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@125]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/usr/local/share/doc/crosstool-ng/ct-ng.1.19.0/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 0:00.00)

更新1:

我在我的crosstool-ng的bin目录中运行'grep' '-E' '^(# |)CT_' '.config'并返回:

CT_CONFIGURE_has_svn=y
CT_MODULES=y
# CT_OBSOLETE is not set
# CT_EXPERIMENTAL is not set
# CT_DEBUG_CT is not set
CT_LOCAL_TARBALLS_DIR="${HOME}/src"
CT_SAVE_TARBALLS=y
CT_WORK_DIR="${CT_TOP_DIR}/.build"
CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
CT_RM_RF_PREFIX_DIR=y
# CT_REMOVE_DOCS is not set
# CT_BUILD_MANUALS is not set
CT_INSTALL_DIR_RO=y
CT_STRIP_ALL_TOOLCHAIN_EXECUTABLES=y
# CT_FORBID_DOWNLOAD is not set
# CT_FORCE_DOWNLOAD is not set
CT_CONNECT_TIMEOUT=10
# CT_ONLY_DOWNLOAD is not set
# CT_USE_MIRROR is not set
# CT_FORCE_EXTRACT is not set
CT_OVERIDE_CONFIG_GUESS_SUB=y
# CT_ONLY_EXTRACT is not set
CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL is not set
# CT_PATCH_BUNDLED_LOCAL is not set
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
CT_PARALLEL_JOBS=0
CT_LOAD=""
CT_USE_PIPES=y
CT_EXTRA_CFLAGS_FOR_BUILD=""
CT_EXTRA_LDFLAGS_FOR_BUILD=""
CT_EXTRA_CFLAGS_FOR_HOST=""
CT_EXTRA_LDFLAGS_FOR_HOST=""
# CT_CONFIG_SHELL_SH is not set
# CT_CONFIG_SHELL_ASH is not set
CT_CONFIG_SHELL_BASH=y
# CT_CONFIG_SHELL_CUSTOM is not set
CT_CONFIG_SHELL="${bash}"
# CT_LOG_ERROR is not set
# CT_LOG_WARN is not set
# CT_LOG_INFO is not set
CT_LOG_EXTRA=y
# CT_LOG_ALL is not set
# CT_LOG_DEBUG is not set
CT_LOG_LEVEL_MAX="EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_PROGRESS_BAR=y
CT_LOG_TO_FILE=y
CT_LOG_FILE_COMPRESS=y
CT_ARCH="arm"
CT_ARCH_SUPPORTS_BOTH_MMU=y
CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
CT_ARCH_SUPPORTS_32=y
CT_ARCH_SUPPORTS_WITH_ARCH=y
CT_ARCH_SUPPORTS_WITH_CPU=y
CT_ARCH_SUPPORTS_WITH_TUNE=y
CT_ARCH_SUPPORTS_WITH_FLOAT=y
CT_ARCH_SUPPORTS_WITH_FPU=y
CT_ARCH_SUPPORTS_SOFTFP=y
CT_ARCH_DEFAULT_HAS_MMU=y
CT_ARCH_DEFAULT_LE=y
CT_ARCH_DEFAULT_32=y
CT_ARCH_ARCH=""
CT_ARCH_CPU=""
CT_ARCH_TUNE=""
CT_ARCH_FPU=""
# CT_ARCH_BE is not set
CT_ARCH_LE=y
CT_ARCH_32=y
CT_ARCH_BITNESS=32
# CT_ARCH_FLOAT_HW is not set
CT_ARCH_FLOAT_SW=y
CT_TARGET_CFLAGS=""
CT_TARGET_LDFLAGS=""
# CT_ARCH_alpha is not set
CT_ARCH_arm=y
# CT_ARCH_avr32 is not set
# CT_ARCH_blackfin is not set
# CT_ARCH_m68k is not set
# CT_ARCH_mips is not set
# CT_ARCH_powerpc is not set
# CT_ARCH_s390 is not set
# CT_ARCH_sh is not set
# CT_ARCH_sparc is not set
# CT_ARCH_x86 is not set
CT_ARCH_alpha_AVAILABLE=y
CT_ARCH_arm_AVAILABLE=y
CT_ARCH_avr32_AVAILABLE=y
CT_ARCH_blackfin_AVAILABLE=y
CT_ARCH_m68k_AVAILABLE=y
CT_ARCH_microblaze_AVAILABLE=y
CT_ARCH_mips_AVAILABLE=y
CT_ARCH_powerpc_AVAILABLE=y
CT_ARCH_s390_AVAILABLE=y
CT_ARCH_sh_AVAILABLE=y
CT_ARCH_sparc_AVAILABLE=y
CT_ARCH_x86_AVAILABLE=y
CT_ARCH_SUFFIX=""
# CT_MULTILIB is not set
CT_ARCH_USE_MMU=y
CT_ARCH_ENDIAN="little"
# CT_ARCH_FLOAT_SOFTFP is not set
CT_ARCH_FLOAT="soft"
CT_ARCH_ARM_MODE="arm"
CT_ARCH_ARM_MODE_ARM=y
# CT_ARCH_ARM_MODE_THUMB is not set
# CT_ARCH_ARM_INTERWORKING is not set
CT_ARCH_ARM_EABI_FORCE=y
CT_ARCH_ARM_EABI=y
CT_FORCE_SYSROOT=y
CT_USE_SYSROOT=y
CT_SYSROOT_NAME="sysroot"
CT_SYSROOT_DIR_PREFIX=""
# CT_STATIC_TOOLCHAIN is not set
CT_TOOLCHAIN_PKGVERSION=""
CT_TOOLCHAIN_BUGURL=""
CT_TARGET_VENDOR="unknown"
CT_TARGET_ALIAS_SED_EXPR=""
CT_TARGET_ALIAS=""
CT_CROSS=y
# CT_CANADIAN is not set
CT_TOOLCHAIN_TYPE="cross"
CT_BUILD=""
CT_BUILD_PREFIX=""
CT_BUILD_SUFFIX=""
# CT_TOOLCHAIN_ENABLE_NLS is not set
CT_KERNEL_SUPPORTS_SHARED_LIBS=y
CT_KERNEL="linux"
CT_KERNEL_VERSION="3.10.2"
# CT_KERNEL_bare_metal is not set
CT_KERNEL_linux=y
CT_KERNEL_bare_metal_AVAILABLE=y
CT_KERNEL_linux_AVAILABLE=y
CT_KERNEL_V_3_10=y
# CT_KERNEL_V_3_9 is not set
# CT_KERNEL_V_3_8 is not set
# CT_KERNEL_V_3_7 is not set
# CT_KERNEL_V_3_6 is not set
# CT_KERNEL_V_3_5 is not set
# CT_KERNEL_V_3_4 is not set
# CT_KERNEL_V_3_3 is not set
# CT_KERNEL_V_3_2 is not set
# CT_KERNEL_V_3_1 is not set
# CT_KERNEL_V_3_0 is not set
# CT_KERNEL_V_2_6_39 is not set
# CT_KERNEL_V_2_6_38 is not set
# CT_KERNEL_V_2_6_37 is not set
# CT_KERNEL_V_2_6_36 is not set
# CT_KERNEL_V_2_6_33 is not set
# CT_KERNEL_V_2_6_32 is not set
# CT_KERNEL_V_2_6_31 is not set
# CT_KERNEL_V_2_6_27 is not set
# CT_KERNEL_LINUX_CUSTOM is not set
CT_KERNEL_windows_AVAILABLE=y
CT_SHARED_LIBS=y
CT_KERNEL_LINUX_VERBOSITY_0=y
# CT_KERNEL_LINUX_VERBOSITY_1 is not set
# CT_KERNEL_LINUX_VERBOSITY_2 is not set
CT_KERNEL_LINUX_VERBOSE_LEVEL=0
CT_KERNEL_LINUX_INSTALL_CHECK=y
CT_ARCH_BINFMT_ELF=y
CT_BINUTILS="binutils"
CT_BINUTILS_binutils=y
# CT_BINUTILS_V_2_22 is not set
# CT_BINUTILS_V_2_21_53 is not set
# CT_BINUTILS_V_2_21_1a is not set
# CT_BINUTILS_V_2_20_1a is not set
CT_BINUTILS_V_2_19_1a=y
# CT_BINUTILS_V_2_18a is not set
CT_BINUTILS_VERSION="2.19.1a"
CT_BINUTILS_2_19_or_later=y
CT_BINUTILS_2_18_or_later=y
CT_BINUTILS_HAS_HASH_STYLE=y
CT_BINUTILS_GOLD_SUPPORTS_ARCH=y
CT_BINUTILS_HAS_PKGVERSION_BUGURL=y
CT_BINUTILS_FORCE_LD_BFD=y
CT_BINUTILS_LINKER_LD=y
CT_BINUTILS_LINKERS_LIST="ld"
CT_BINUTILS_LINKER_DEFAULT="bfd"
CT_BINUTILS_EXTRA_CONFIG_ARRAY=""
CT_BINUTILS_FOR_TARGET=y
CT_BINUTILS_FOR_TARGET_IBERTY=y
CT_BINUTILS_FOR_TARGET_BFD=y
CT_CC="gcc"
CT_CC_VERSION="4.3.2"
CT_CC_CORE_PASSES_NEEDED=y
CT_CC_gcc=y
# CT_CC_GCC_SHOW_LINARO is not set
# CT_CC_V_4_8_1 is not set
# CT_CC_V_4_8_0 is not set
# CT_CC_V_4_7_3 is not set
# CT_CC_V_4_7_2 is not set
# CT_CC_V_4_7_1 is not set
# CT_CC_V_4_7_0 is not set
# CT_CC_V_4_6_4 is not set
# CT_CC_V_4_6_3 is not set
# CT_CC_V_4_6_2 is not set
# CT_CC_V_4_6_1 is not set
# CT_CC_V_4_6_0 is not set
# CT_CC_V_4_5_3 is not set
# CT_CC_V_4_5_2 is not set
# CT_CC_V_4_5_1 is not set
# CT_CC_V_4_5_0 is not set
# CT_CC_V_4_4_7 is not set
# CT_CC_V_4_4_6 is not set
# CT_CC_V_4_4_5 is not set
# CT_CC_V_4_4_4 is not set
# CT_CC_V_4_4_3 is not set
# CT_CC_V_4_4_2 is not set
# CT_CC_V_4_4_1 is not set
# CT_CC_V_4_4_0 is not set
# CT_CC_V_4_3_6 is not set
# CT_CC_V_4_3_5 is not set
# CT_CC_V_4_3_4 is not set
# CT_CC_V_4_3_3 is not set
CT_CC_V_4_3_2=y
# CT_CC_V_4_3_1 is not set
# CT_CC_V_4_2_4 is not set
# CT_CC_V_4_2_2 is not set
CT_CC_GCC_4_2_or_later=y
CT_CC_GCC_4_3=y
CT_CC_GCC_4_3_or_later=y
# CT_CC_GCC_USE_GRAPHITE is not set
# CT_CC_GCC_USE_LTO is not set
CT_CC_GCC_HAS_PKGVERSION_BUGURL=y
CT_CC_GCC_USE_GMP_MPFR=y
CT_CC_LANG_JAVA_USE_ECJ=y
CT_CC_LANG_FORTRAN=y
CT_CC_SUPPORT_CXX=y
CT_CC_SUPPORT_FORTRAN=y
CT_CC_SUPPORT_JAVA=y
CT_CC_SUPPORT_ADA=y
CT_CC_SUPPORT_OBJC=y
CT_CC_SUPPORT_OBJCXX=y
CT_CC_LANG_CXX=y
CT_CC_LANG_JAVA=y
CT_CC_ENABLE_CXX_FLAGS=""
CT_CC_CORE_EXTRA_CONFIG_ARRAY=""
CT_CC_EXTRA_CONFIG_ARRAY=""
# CT_CC_GCC_SYSTEM_ZLIB is not set
CT_CC_GCC_ENABLE_TARGET_OPTSPACE=y
# CT_CC_GCC_LIBMUDFLAP is not set
# CT_CC_GCC_LIBGOMP is not set
# CT_CC_GCC_LIBSSP is not set
CT_CC_CXA_ATEXIT=y
# CT_CC_GCC_DISABLE_PCH is not set
# CT_CC_GCC_SJLJ_EXCEPTIONS is not set
CT_CC_GCC_LDBL_128=m
CT_LIBC="glibc"
CT_LIBC_VERSION="2.9"
# CT_LIBC_eglibc is not set
CT_LIBC_glibc=y
# CT_LIBC_uClibc is not set
CT_LIBC_eglibc_AVAILABLE=y
CT_LIBC_glibc_AVAILABLE=y
# CT_LIBC_GLIBC_V_2_17 is not set
# CT_LIBC_GLIBC_V_2_16_0 is not set
# CT_LIBC_GLIBC_V_2_15 is not set
# CT_LIBC_GLIBC_V_2_14_1 is not set
# CT_LIBC_GLIBC_V_2_14 is not set
# CT_LIBC_GLIBC_V_2_13 is not set
# CT_LIBC_GLIBC_V_2_12_2 is not set
# CT_LIBC_GLIBC_V_2_12_1 is not set
# CT_LIBC_GLIBC_V_2_11_1 is not set
# CT_LIBC_GLIBC_V_2_11 is not set
# CT_LIBC_GLIBC_V_2_10_1 is not set
CT_LIBC_GLIBC_V_2_9=y
# CT_LIBC_GLIBC_V_2_8 is not set
CT_LIBC_mingw_AVAILABLE=y
CT_LIBC_newlib_AVAILABLE=y
CT_LIBC_none_AVAILABLE=y
CT_LIBC_uClibc_AVAILABLE=y
CT_LIBC_SUPPORT_THREADS_ANY=y
CT_LIBC_SUPPORT_NPTL=y
CT_THREADS="nptl"
CT_THREADS_NPTL=y
CT_LIBC_XLDD=y
CT_LIBC_GLIBC_MAY_FORCE_PORTS=y
CT_LIBC_glibc_familly=y
CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY=""
CT_LIBC_GLIBC_CONFIGPARMS=""
CT_LIBC_GLIBC_EXTRA_CFLAGS=""
CT_LIBC_EXTRA_CC_ARGS=""
# CT_LIBC_DISABLE_VERSIONING is not set
CT_LIBC_OLDEST_ABI=""
# CT_LIBC_GLIBC_FORCE_UNWIND is not set
CT_LIBC_GLIBC_USE_PORTS=y
CT_LIBC_ADDONS_LIST=""
# CT_LIBC_LOCALES is not set
# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
CT_LIBC_GLIBC_MIN_KERNEL="3.10.2"
CT_DEBUG_dmalloc=y
CT_DMALLOC_V_5_5_2=y
CT_DMALLOC_VERSION="5.5.2"
CT_DEBUG_duma=y
CT_DUMA_A=y
CT_DUMA_SO=y
CT_DUMA_V_2_5_15=y
CT_DUMA_VERSION="2_5_15"
CT_DEBUG_gdb=y
CT_GDB_CROSS=y
# CT_GDB_CROSS_STATIC is not set
# CT_GDB_CROSS_SIM is not set
CT_GDB_CROSS_PYTHON=y
CT_GDB_CROSS_EXTRA_CONFIG_ARRAY=""
CT_GDB_NATIVE=y
# CT_GDB_NATIVE_STATIC is not set
CT_GDB_GDBSERVER=y
CT_GDB_GDBSERVER_STATIC=y
# CT_DEBUG_GDB_SHOW_LINARO is not set
# CT_GDB_V_7_4_1 is not set
# CT_GDB_V_7_4 is not set
# CT_GDB_V_7_3_1 is not set
# CT_GDB_V_7_3a is not set
# CT_GDB_V_7_2a is not set
# CT_GDB_V_7_1a is not set
# CT_GDB_V_7_0_1a is not set
# CT_GDB_V_7_0a is not set
CT_GDB_V_6_8a=y
CT_GDB_VERSION="6.8a"
CT_DEBUG_ltrace=y
CT_LTRACE_V_0_5_3=y
# CT_LTRACE_V_0_5_2 is not set
CT_LTRACE_VERSION="0.5.3"
CT_LTRACE_0_5_3_or_later=y
CT_DEBUG_strace=y
# CT_STRACE_V_4_5_20 is not set
CT_STRACE_V_4_5_19=y
# CT_STRACE_V_4_5_18 is not set
CT_STRACE_VERSION="4.5.19"
CT_COMPLIBS_NEEDED=y
CT_GMP_NEEDED=y
CT_MPFR_NEEDED=y
CT_COMPLIBS=y
CT_GMP=y
CT_MPFR=y
CT_LIBELF_TARGET=y
# CT_GMP_V_5_1_1 is not set
# CT_GMP_V_5_0_2 is not set
# CT_GMP_V_5_0_1 is not set
CT_GMP_V_4_3_2=y
# CT_GMP_V_4_3_1 is not set
# CT_GMP_V_4_3_0 is not set
CT_GMP_VERSION="4.3.2"
# CT_MPFR_V_3_1_2 is not set
# CT_MPFR_V_3_1_0 is not set
# CT_MPFR_V_3_0_1 is not set
# CT_MPFR_V_3_0_0 is not set
CT_MPFR_V_2_4_2=y
# CT_MPFR_V_2_4_1 is not set
# CT_MPFR_V_2_4_0 is not set
CT_MPFR_VERSION="2.4.2"
CT_LIBELF_V_0_8_13=y
# CT_LIBELF_V_0_8_12 is not set
CT_LIBELF_VERSION="0.8.13"
# CT_COMPLIBS_CHECK is not set

请帮忙,我完全无能为力:)。

3 个答案:

答案 0 :(得分:1)

想通了! Crosstool-ng使用自己的grep(很奇怪,我知道),所以我删除了自己的grep(无法处理正则表达式),并为我构建的GNU grep添加了一个符号链接,位于usr/local/bin/grep

答案 1 :(得分:1)

我遇到了同样的错误信息,但却出现了不同的诊断并以完全不同的方式修复了它。我不确定谁是对的,但我会分享我的经验,希望能帮助别人。

经过多次搜索,我得出的结论是ct-ng正在使用系统grep,它没有Linux grep所具有的所有功能以及ct-ng所期望的功能。我的解决方案是使用Homebrew包管理器安装linux grep并让它覆盖系统grep。

我采取的步骤:

  1. 使用brew.sh
  2. 中的说明安装Hombrew
  3. 在终端提示符下键入brew install grep --with-default-names--with-default-names标志告诉Homebrew覆盖系统grep。 (否则它会将其安装为" ggrep"以避免混淆)这实际上并没有删除你的系统grep,所以如果卸载Hombrew grep,系统grep仍然会在那里。
  4. 执行此操作后,错误消失,我可以继续编译crosstool-ng。

答案 2 :(得分:0)

许多网站都建议对grep和gettext进行特殊处理,例如:在这里:

http://will-tm.com/cross-compiling-mac-os-x-mavericks/

  

安装crosstool-ng之前的一些事情

brew tap homebrew/dupes
brew install gettext
brew edit crosstool-ng
  

将此行添加到depends部分:

depends_on 'grep' => '--default-names'"