[libvirt] BSD gcrypt warnings [was: [PATCH] build: mark conditionally unused variables]
Eric Blake
eblake at redhat.com
Sat May 11 03:18:57 UTC 2013
On 05/02/2013 09:32 PM, Roman Bogorodskiy wrote:
>>>
>>> Can you actually compile it successfully without '--disable-werror'?
>>
>> Looks like I skipped a few files:
>>
>> $ ./config.status --version | head -n3
>> libvirt config.status 1.0.5
>> configured by ./configure, generated by GNU Autoconf 2.68,
>> with options "'-C' 'CFLAGS=-g' '--without-network'"
>>
>> Maybe I should try again and see how omitting --without-network fares.
>>
>>>
>>> It fails for me because of gcrypt.h:
>>>
>>> http://people.freebsd.org/~novel/misc/libvirt_gcrypt_warns.txt
>>
>>
>> CC libvirt_driver_la-libvirt.lo
>> cc1: warnings being treated as errors
>> In file included from libvirt.c:58:
>> /usr/local/include/gcrypt.h:1336: warning: 'gcry_ac_io_mode_t' is
>> deprecated [-Wdeprecated-declarations]
Okay, I updated my Ports repository on my FreeBSD vm, and I'm seeing
this same sort of failure failure with gcc 4.2.1 and gcrypt 1.5.2 (wow -
Fedora rawhide still only ships with gcrypt 1.5.1).
>
> I'm using gcrypt 1.5.0.
>
> Relevant part of gcrypt.h:
>
> 1333 typedef struct gcry_ac_io
> 1334 {
> 1335 /* This is an INTERNAL structure, do NOT use manually. */
> 1336 gcry_ac_io_mode_t mode _GCRY_ATTR_INTERNAL;
> 1337 gcry_ac_io_type_t type _GCRY_ATTR_INTERNAL;
> 1338 union
The sad part is that we aren't even using the deprecated symbols - their
mere inclusion in the installed header is provoking the problems. It
looks like newer gcc is a bit more tolerant (that is, this is a
shortcoming of FreeBSD's use of an older compiler).
> ....
>
> gcc version 4.2.1 20070831 patched [FreeBSD]
>
I'm trying to come up with the best workaround (perhaps disabling
-Wdeprecated-declarations if gcrypt.h exists but provokes compiler
warnings).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130510/94b5924f/attachment-0001.sig>
More information about the libvir-list
mailing list