我在构建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错误出现在带有wget的最终make install上
/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发布于 2012-05-13 05:54:03
由于多次定义了base64_encode,因此发生了multiple definition错误。
// 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
https://stackoverflow.com/questions/10527976
复制相似问题