使用GnuTLS构建wget?

时间:2012-05-10 05:26:14

标签: c gcc makefile wget

我无法构建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 install wget

/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 个答案:

答案 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