[Top][All Lists]

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

Re: wrong gnutls.pc

From: Andreas Metzler
Subject: Re: wrong gnutls.pc
Date: Fri, 26 Feb 2010 19:30:26 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

On 2010-02-26 Vincent Torri <address@hidden> wrote:
> Hey,
> 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/ 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


This broke somewhere after 2.6.6. 2.6.6 still has
Libs: -L${libdir} -lgnutls
Libs.private: -L${exec_prefix}/lib -lgnutls -lgcrypt  -L/usr/lib -ltasn1

but e.g. 2.7.11 is missing -lgcrypt in Libs.private.

I will try to investigate further this weekend.

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

It does not hurt either, pkg-config strips the duplicates.
>  * libtasn1 is not checked with pkg-config if it exists (well, i don't see
> anything in gnutls/lib/

tasn is searched for with AC_LIB_HAVE_LINKFLAGS. See

> If it exists, 'libtasn1' must appear
> in the Requires.private field (or Requires field if you support pkg-config <
> 0.22).

It does.

> If it does not exists, i think that you link directly against your
> own libtasn2 code, so @LTLIBTASN1@ should not appear in Libs.private

This seems to work correctly for me, too. If build against external
tasn I get -ltasn1 in Libs.private, if I uses internal tasn I do not:
address@hidden:/tmp/GNUTLS$ wdiff */debian/tmp/usr/lib/pkgconfig/gnutls.pc | \
       grep -1 tasn
Libs: -L${libdir} -lgnutls
Libs.private: -L${exec_prefix}/lib -lgnutls  {+-L/usr/lib -ltasn1+}
Cflags: -I${includedir}

For reference all my testing was done on Linux, not Windows.

cu andreas
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'

reply via email to

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