[Help-gnutls] Re: /usr/local/lib/libgnuttls.so: undefined reference to `gcry_cipher_setkey at GCRYPT_1.2'

Simon Josefsson simon at josefsson.org
Thu May 7 11:15:01 CEST 2009


Michael Darling <darlingm at gmail.com> writes:

> I'm building an application that uses vmime.  vmime uses libgnuttls, and I'm
> getting a linker error as shown below.  Searching on google for "undefined
> reference to gcry_cipher_setkey at GCRYPT_1.2" returns no results.  Any ideas?
>  I assume there's probably another library I need to link in?  I originally
> didn't have "-lgcrypt" included, but tried that, and had no effect.
>
> using from source libvmime-0.9.0, gnutls-2.6.6, libgcrypt-1.4.4, and
> libgsasl-1.1 -- and rpm installed GNU Make 3.81, g++ 4.1.2, CentOS 5.3,
> kernel 2.6.18-128.1.6.el5

I recall seeing a report of something similar recently... it seems like
a problem with two libgcrypt's installed on the same machine: one used
for linking gnutls and another when running gnutls applications or
linking to libgnutls.  Do you have multiple installed libgcrypt's?  Even
if you uninstall one of the libgcrypt's, you may need to re-build gnutls
against the proper libgcrypt to make things work.

/Simon

> (Application and library names changed to be more clear)
>
> $ make
> /bin/sh ../libtool --tag=CXX --mode=link g++  -g -O2   -o application
>  application.o ../libraryA/libraryA.a ../libraryB/libraryB.a
> ../libraryC/libraryC.a -lgnutls -lgcrypt -lvmime -lssl -lgsoapssl++
> g++ -g -O2 -o application application.o  ../libraryA/libraryA.a
> ../libraryB/libraryB.a ../libraryC/libraryC.a -lgnutls -lgcrypt -lvmime
> -lssl -lgsoapssl++
> /usr/local/lib/libgnutls.so: undefined reference to
> `gcry_cipher_setkey at GCRYPT_1.2'
> /usr/local/lib/libgnutls.so: undefined reference to
> `gcry_cipher_setiv at GCRYPT_1.2'
> collect2: ld returned 1 exit status
> make: *** [application] Error 1
> _______________________________________________
> Help-gnutls mailing list
> Help-gnutls at gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnutls





More information about the Gnutls-help mailing list