Menu

#1133 curl-7.27.0 fails to compile with gnutls

closed-fixed
SSL/TLS (37)
5
2014-08-16
2012-08-06
No

When configured with

./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --enable-dict --enable-file --enable-ftp --enable-gopher --enable-http --enable-imap --enable-ldap --enable-ldaps --enable-pop3 --enable-rtsp --without-libssh2 --enable-smtp --enable-telnet --enable-tftp --disable-ares --enable-cookies --enable-hidden-symbols --enable-ipv6 --enable-largefile --enable-manual --enable-nonblocking --enable-proxy --disable-soname-bump --disable-sspi --disable-static --disable-threaded-resolver --disable-versioned-symbols --without-darwinssl --without-libidn --without-gssapi --without-krb4 --without-libmetalink --without-librtmp --without-spnego --without-winidn --without-winssl --with-zlib --without-axtls --without-cyassl --without-gnutls --without-nss --without-polarssl --without-ssl --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --with-gnutls --with-nettle

curl-7.27.0 fails to compile with

libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -c parsedate.c -fPIC -DPIC -o .libs/libcurl_la-parsedate.o
/bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -c -o libcurl_la-select.lo `test -f 'select.c' || echo './'`select.c
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -c select.c -fPIC -DPIC -o .libs/libcurl_la-select.o
/bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -c -o libcurl_la-gtls.lo `test -f 'gtls.c' || echo './'`gtls.c
libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../lib -DCURL_HIDDEN_SYMBOLS -fvisibility=hidden -c gtls.c -fPIC -DPIC -o .libs/libcurl_la-gtls.o
gtls.c: In function 'Curl_gtls_random':
gtls.c:1069:14: error: 'GNUTLS_RND_RANDOM' undeclared (first use in this function)
gtls.c:1069:14: note: each undeclared identifier is reported only once for each function it appears in
gtls.c: In function 'Curl_gtls_md5sum':
gtls.c:1082:18: error: storage size of 'MD5pw' isn't known
make[2]: *** [libcurl_la-gtls.lo] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-misc/curl-7.27.0-r2/work/curl-7.27.0/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/net-misc/curl-7.27.0-r2/work/curl-7.27.0/lib'
make: *** [all-recursive] Error 1

This happens with gnutls-2.12.18 and nettle-2.4 on a Gentoo system. The downstream bug is

https://bugs.gentoo.org/show_bug.cgi?id=428592

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2012-08-06

    Hi, thanks for your report.

    Please try the attached patch and see if that fixes the problem for you.

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-06
    • milestone: --> bad_behaviour
     
  • Anthony G. Basile

    Almost. It fixes the original configuration, which has --without-libmetalink, but if you switch to --with-libmetalink, then the build dies with

    x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../src -I../lib -I../src -pthread -c tool_main.c
    x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I../include -I../lib -I../src -I../lib -I../src -pthread -c tool_metalink.c
    tool_metalink.c:87:29: error: ‘MD5_Init’ undeclared here (not in a function)
    tool_metalink.c:88:31: error: ‘MD5_Update’ undeclared here (not in a function)
    tool_metalink.c:89:30: error: ‘MD5_Final’ undeclared here (not in a function)
    tool_metalink.c:97:29: error: ‘SHA1_Init’ undeclared here (not in a function)
    tool_metalink.c:98:31: error: ‘SHA1_Update’ undeclared here (not in a function)
    tool_metalink.c:99:30: error: ‘SHA1_Final’ undeclared here (not in a function)
    tool_metalink.c:107:29: error: ‘SHA256_Init’ undeclared here (not in a function)
    tool_metalink.c:108:31: error: ‘SHA256_Update’ undeclared here (not in a function)
    tool_metalink.c:109:30: error: ‘SHA256_Final’ undeclared here (not in a function)
    make[2]: *** [tool_metalink.o] Error 1
    make[2]: Leaving directory `/var/tmp/portage/net-misc/curl-7.27.0-r2/work/curl-7.27.0/src'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/var/tmp/portage/net-misc/curl-7.27.0-r2/work/curl-7.27.0/src'
    make: *** [all-recursive] Error 1

    So it look like you need to include some more gnutls/*.h in src/tool_metalink.c

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-06

    Right, see the second patch for what was required for making it build for me. I've already pushed these fixes to the git repo too.

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-07
    • status: open --> open-fixed
     
  • Anthony G. Basile

    • status: open-fixed --> open
     
  • Anthony G. Basile

    Yeah that second patch fixes metalink problem. I've backported both patches to gentoo's ebuild for 7.27.0. I think this bug is resolved.

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-07
    • status: open --> closed-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-07

    Thanks for verifying. I'm therefore closing this issue now.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.