[PATCH] Fix undefined reference error when building with GnuTLS

David Woodhouse dwmw2 at infradead.org
Sun Jan 25 23:41:55 PST 2015


On Sun, 2015-01-25 at 22:51 -0500, Mike Miller wrote:
> Since commit 34f4c68b ("Add undocumented --gnutls-debug command line
> option") the openconnect binary uses gnutls_global_set_log_level
> directly. Link the standalone binary against $(SSL_LIBS).
> 
> Signed-off-by: Mike Miller <mtmiller at debian.org>

Hm, I don't know why that didn't bite me. I seem to get -lgnutls added
to the link command by libtool:

/bin/sh ./libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Werror=pointer-to-int-cast -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wnested-externs -Wpointer-arith -Wwrite-strings -I/usr/include/p11-kit-1   -I/usr/include/libxml2     -I/usr/include/liboath      -pthread -I/usr/include/PCSC  -g -O2   -o openconnect openconnect-xml.o openconnect-main.o libopenconnect.la -lxml2  -lproxy    
libtool: link: gcc -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Werror=pointer-to-int-cast -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wnested-externs -Wpointer-arith -Wwrite-strings -I/usr/include/p11-kit-1 -I/usr/include/libxml2 -I/usr/include/liboath -pthread -I/usr/include/PCSC -g -O2 -o .libs/openconnect openconnect-xml.o openconnect-main.o  ./.libs/libopenconnect.so -L/usr/lib64 -lgnutls -lz -lp11-kit -ltspi -lstoken -loath -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lpcsclite -llz4 -lxml2 -lproxy -pthread -Wl,-rpath -Wl,/usr/local/lib


Anyway, applied. Thanks.

-- 
dwmw2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20150126/87f62525/attachment.sig>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20150126/87f62525/attachment.bin>


More information about the openconnect-devel mailing list