[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined reference to gnutls_protocol_set_priority() when compiling

From: Petr Pisar
Subject: Re: Undefined reference to gnutls_protocol_set_priority() when compiling latest wget version
Date: Wed, 13 May 2020 07:46:04 +0200

On Tue, May 12, 2020 at 05:34:22PM -0600, Stephen Kirby wrote:
> I'm using GnuTLS version 3.6.13.  I believe it is the latest.  If anyone
> knows otherwise please let me know.
> Sorry for the delay in getting back to you Tim (was swamped this morning)
> and thanks for your fast response!  I double-checked the versions of GnuTLS
> and wget I am using.  Both are the absolute latest (gnutls-3.6.13 and
> wget-1.20.3).  As such, I am not sure why the latest wget (in src/gnutls.c)
> would employ a deprecated/removed function, specifically,
> "gnutls_protocol_set_priority()?  Do you recommend stepping back to an
> older version of GnuTLS to get around this and if so which one would work?
> Otherwise, would anyone know of a patch for the wget source code,
> specifically, for the file  /src/gnutls.c so I can use the latest versions
> of GnuTLS and wget?  Thanks so much.
I have also these latest versions and I do not observe your problem.

Indeed GnuTLS version 3.6.13 does not provide gnutls_protocol_set_priority
symbol. It provides gnutls_priority_set_direct. You can check it by inspecting
the library:

$ nm -D /usr/lib64/libgnutls.so.30.27.0 |grep gnutls_priority_set_direct
0000000000052bc0 T gnutls_priority_set_direct
$ nm -D /usr/lib64/libgnutls.so.30.27.0 |grep gnutls_protocol_set_priority

If you read wget code, you will find out that gnutls_protocol_set_priority()
function is used only if HAVE_GNUTLS_PRIORITY_SET_DIRECT C preprocessor macro
is not defined. Please check src/config.h generated after running ./configure.
I bet it defines it.

If that's so, you need to find out why the configure check was unable to
discover support for gnutls_priority_set_direct. configure does this:

    for ac_func in gnutls_priority_set_direct
do :
  ac_fn_c_check_func "$LINENO" "gnutls_priority_set_direct" 
if test "x$ac_cv_func_gnutls_priority_set_direct" = xyes; then :
  cat >>confdefs.h <<_ACEOF

I recommed you reading config.log (around "checking for
gnutls_priority_set_direct" line) to find it out.

I suspect your GnuTLS installation is botched. Probably the library and header
files do not match.

-- Petr

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]