wrong gnutls.pc

Vincent Torri vincent.torri at gmail.com
Fri Feb 26 12:57:46 CET 2010


compiling libcurl on Windows with MinGW leads to undefined symbols. The
problem is in a bug in gnutls.pc. Indeed libgcrypt is a required dependency
(btw, it is not checked in gnutls/lib/configure.ac. I think that it must be
checked there. The library has a libgcrypt-config to  get cflags and libs).
Hence, -lgcrypt must appear in the Libs.private field of gnutls.pc


* in Libs.private of gnutls.pc.in, @LIBGNUTLS_LIBS@ is added, which means,
according to its definition, that -lgnutls appears in Libs.private, which is

 * libtasn1 is not checked with pkg-config if it exists (well, i don't see
anything in gnutls/lib/configure.ac). If it exists, 'libtasn1' must appear
in the Requires.private field (or Requires field if you support pkg-config <
0.22). If it does not exists, i think that you link directly against your
own libtasn2 code, so @LTLIBTASN1@ should not appear in Libs.private

So gnutls.pc.in should be:

Name: GnuTLS
Description: Transport Security Layer implementation for the GNU system
URL: http://www.gnu.org/software/gnutls/
Version: @VERSION@
Requires.private: @requirement_libtasn1@
Libs: -L${libdir} -lgnutls
Libs.private: -lgcrypt @requirement_zlib@
Cflags: -I${includedir}

where :

 * requirement_libtasn1 is set to libtasn1 if libtasn1 is installed
 * requirement_zlib is set to -lz if zlib is found.


Vincent Torri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20100226/1f27a0e8/attachment.htm>

More information about the Gnutls-devel mailing list