c - 使用 GnuTLS 构建 wget?

标签 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 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

最佳答案

发生多重定义错误是因为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

关于c - 使用 GnuTLS 构建 wget?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10527976/

相关文章:

c - 我有c语言语法问题

c - GCC 前向声明和 __may__alias

c++ - 如何将 C 数组转换为 std::initializer_list?

linux - 具有多个子目录的 Linux 内核模块的 Makefile

makefile - 获取目录makefile驻留在

c - 我需要相对于三角形平移 3d 点,就好像三角形在其他地方一样

c - 换行/评论评论

iphone - objective-c if 语句不起作用

python - 来自python的gcc编译错误

c - 具有依赖关系的类似 Arduino 的 Makefile ......?