[blfs-support] curl-7.24.0, gnutls and nettle problem

Andrew Benton b3nton at gmail.com
Thu Feb 2 17:19:38 PST 2012

On Thu, 2 Feb 2012 14:55:28 -0800 (PST)
Fernando de Oliveira <famobr at yahoo.com.br> wrote:

> "libtool: link: gcc -g0 -O2 -Wno-system-headers -o .libs/curl hugehelp.o tool_binmode.o tool_bname.o tool_cb_dbg.o tool_cb_hdr.o tool_cb_prg.o tool_cb_rea.o tool_cb_see.o tool_cb_skt.o tool_cb_wrt.o tool_cfgable.o tool_convert.o tool_dirhie.o tool_doswin.o tool_easysrc.o tool_formparse.o tool_getparam.o tool_getpass.o tool_help.o tool_helpers.o tool_homedir.o tool_libinfo.o tool_main.o tool_mfiles.o tool_msgs.o tool_operate.o tool_operhlp.o tool_panykey.o tool_paramhlp.o tool_parsecfg.o tool_setopt.o tool_sleep.o tool_urlglob.o tool_util.o tool_vms.o tool_writeenv.o tool_writeout.o tool_xattr.o strtoofft.o strdup.o rawstr.o nonblock.o  ../lib/.libs/libcurl.so -lrt -lz
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md5_digest'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_des_encrypt'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_des_set_key'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md5_init'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md5_update'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md4_digest'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md4_update'
> ../lib/.libs/libcurl.so: undefined reference to `nettle_md4_init'
> collect2: ld returned 1 exit status
> make[2]: ** [curl] Erro 1
> make[2]: Saindo do diretório `/media/dados/home/fernando/tmp/paco-build-2012.02.01/curl-7.24.0/src'
> make[1]: ** [all] Erro 2
> make[1]: Saindo do diretório `/media/dados/home/fernando/tmp/paco-build-2012.02.01/curl-7.24.0/src'
> make: ** [all-recursive] Erro 1"
> It builds correctly with ssl (i.e., omiting the switches referred above).

I can't reproduce this, the build succeeds for me, and ldd shows that
libcurl is indeed linked to libgnutls and not libssl.
What does configure say about libnettle? For me it says:

checking for pkg-config... /bin/pkg-config
checking for gnutls options with pkg-config... found
checking for gnutls_check_version in -lgnutls... yes
configure: detected GnuTLS version 3.0.4
checking for nettle_MD5Init in -lgnutls... no
checking for gcry_control in -lgnutls... no
checking for nettle_MD5Init in -lnettle... yes
checking for gnutls_srp_verifier in -lgnutls... yes

Also, have a look at config.log to see what happened.
It looks to me as though it's not linking to libnettle. Try configuring
it with:

LIBS="-lnettle" ./configure --prefix=/usr --without-ssl --with-gnutls


More information about the blfs-support mailing list