[libvirt] [PATCHv2] build: avoid -lgcrypt with newer gnutls

Doug Goldstein cardoe at gentoo.org
Sat Jul 27 20:09:28 UTC 2013


On Fri, Jul 26, 2013 at 10:37 PM, Eric Blake <eblake at redhat.com> wrote:
> On 07/26/2013 07:22 PM, Doug Goldstein wrote:
>> It appears it was an optional cutover and I guess Gentoo made the
>> plunge. Another idea, that you might hate would be to use pkg-config
>> directly and pass --static so we can get the private libraries. I'm
>> not running Fedora 19 yet so the best I can do is give you Fedora 18
>> as a comp, but that works out great since its using 2.12.23 as well.
>>
>> stable Gentoo:
>>
>> Name: GnuTLS
>> Description: Transport Security Layer implementation for the GNU system
>> URL: http://www.gnu.org/software/gnutls/
>> Version: 2.12.23
>> Libs: -L${libdir} -lgnutls
>> Libs.private:  -L/usr/lib64 -lnettle -lgmp -lhogweed
>> Requires.private: libtasn1 , zlib
>> Cflags: -I${includedir}
>>
>> $ pkg-config --libs --static gnutls
>> -lgnutls -ltasn1 -lz -lnettle -lgmp -lhogweed
>>
>> Fedora 18:
>>
>> Name: GnuTLS
>> Description: Transport Security Layer implementation for the GNU system
>> URL: http://www.gnu.org/software/gnutls/
>> Version: 2.12.23
>> Libs: -L${libdir} -lgnutls
>> Libs.private: -L/usr/lib64 -lgcrypt -L/usr/lib64 -lgpg-error
>> Requires.private: libtasn1 , zlib, p11-kit-1
>> Cflags: -I${includedir}
>>
>> $ pkg-config --libs --static gnutls
>> -lgnutls -lgcrypt -lgpg-error -ltasn1 -lz -lp11-kit
>>
>> With GnuTLS 3.2 I get the following:
>>
>>  pkg-config --libs --static gnutls
>> -lgnutls -lhogweed -lnettle -lz  -lgmp
>>
>>
>> Maybe that helps?
>
> Unfortunately, no:
>
> Fedora 19:
> $ pkg-config --libs --static gnutls
> -lgnutls -lnettle -lhogweed -lgmp -lpthread -ltasn1 -lp11-kit -lz
>
> Correct - nettle instead of gcrypt.
>
> RHEL 6.4:
> $ pkg-config --libs --static gnutls
> -lgnutls -ltasn1
>
> Ouch - no mention of gcrypt, even though this version still used gcrypt.
>

Well that's not really to problematic. RHEL 6.4 uses gnutls 2.8.x
which didn't have any concept of nettle at that point. nettle wasn't
introduced as a supported backend until 2.12 [1]. So let's rework the
patch to assume libgcrypt before gnutls 2.12 and then starting with
2.12 we double probe for nettle or libgcrypt.

[1] http://lists.gnu.org/archive/html/gnutls-devel/2011-03/msg00034.html
-- 
Doug Goldstein




More information about the libvir-list mailing list