我在构建 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
最佳答案
发生多重定义
错误是因为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 解决了我的问题。
关于c - 使用 GnuTLS 构建 wget?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10527976/