2012-05-10 39 views
0

我無法獲得wget構建。下面是我目前的咒語,修剪簡潔用GnuTLS構建wget?

host=i686-w64-mingw32 
prefix=/usr/i686-w64-mingw32/sys-root/mingw 

# Install gmp 
./configure --host=$host --prefix=$prefix 
make install 

# Install nettle 
./configure --host=$host --prefix=$prefix 
make install AR=$host-ar 

# Install GnuTLS 
./configure --host=$host --prefix=$prefix --disable-shared 
make install 

# Install Wget 
./configure --host=$host --prefix=$prefix --disable-ipv6 
make install 

的誤差對最終make installwget

/usr/i686-w64-mingw32/sys-root/mingw/lib/libgnutls.a(base64.o): In function `base64_encode': 
/home/Steven/gnutls-3.0.19/gl/base64.c:69: multiple definition of `_base64_encode' 
utils.o:utils.c:(.text+0x49b0): first defined here 
collect2: ld returned 1 exit status 
+1

你可能有一些舊的對象代碼躺在附近。做一個'make clean'並刪除你看到的任何* .o文件,然後再試一次。另外,你不會說上面的四個編譯中的哪一個是那個失敗的錯誤(由於錯誤,我假設GnuTLS--這意味着wget與這個問題無關)。 –

+0

你試過我建議的嗎? –

回答

0

multiple definition錯誤發生,因爲base64_encode定義不止一次。

// wget-1.13.4/src/utils.c 
int 
base64_encode (const void *data, int length, char *dest) 

// gnutls-3.0.19/gl/base64.c 
void 
base64_encode (const char *restrict in, size_t inlen, 
       char *restrict out, size_t outlen) 

此問題是由GnuTLS 3.0.13引入的。使用3.0.12版本解決了我的問題。

ftp.gnu.org/gnu/gnutls