2015-10-15 28 views
0

我最近遇到了兩個開源項目,GNU GetText和W3M的配置步驟問題。配置凍結在「檢查GCC使用的ld」 - MSYS2

配置步驟在兩個項目的相同位置失敗。

檢查GCC使用LD ...

系統細節:

  • 操作系統:windows 10 Pro的64位
  • MSYS2
  • 的gcc --version :gcc.exe(Rev4,由MSYS2項目構建)5.2.0
  • gcc -dumpmachine:x86_64-w64-mingw32
  • 的bash --version:GNU的bash,版本42年3月4日(2)-release下(x86_64-PC-MSYS)

上什麼可能導致此任何想法?

以下是配置用於執行此測試的代碼。

# Check if gcc -print-prog-name=ld gives a path. 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 
$as_echo_n "checking for ld used by GCC... " >&6; } 
    case $host in 
    *-*-mingw*) 
    # gcc leaves a trailing carriage return which upsets mingw 
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 
    *) 
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 
    esac 
    case $ac_prog in 
    # Accept absolute paths. 
    [\\/]* | [A-Za-z]:[\\/]*) 
     re_direlt='/[^/][^/]*/\.\./' 
     # Canonicalize the path of ld 
     ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 
     while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 
     ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 
     done 
     test -z "$LD" && LD="$ac_prog" 
     ;; 
    "") 
    # If it fails, then pretend we aren't using GCC. 
    ac_prog=ld 
    ;; 
    *) 
    # If it is relative, then search for the first ld in PATH. 
    with_gnu_ld=unknown 
    ;; 
    esac 

我添加了調試代碼來確定發生問題的確切位置。它發生在調用grep的while循環中。

回答

0

我不知道爲什麼,但我發現下列軟件包會干擾configure。

  • 的mingw-W64-i686的-grep的
  • 的mingw-W64-i686的-sed的
  • 的mingw-W64-x86_64的-grep的
  • 的mingw-W64-x86_64的-sed的

這些包似乎已經過時了。當我刪除他們配置工作。

+0

我有與msys2相同的問題。但這些軟件包對我而言並不存在。 –