Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lt5dP-0001f4-3r for mharc-qemu-trivial@gnu.org; Tue, 15 Jun 2021 05:45:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lt5dM-0001af-Me for qemu-trivial@nongnu.org; Tue, 15 Jun 2021 05:45:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:47784) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lt5dJ-0004EQ-TG for qemu-trivial@nongnu.org; Tue, 15 Jun 2021 05:45:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623750320; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wPVJr5OHWBXcDqcCM1rti2fIf2kaAeJ7t+ZHtXtQD/w=; b=BabLc/5C5XJIevgpiASYUkmFEF4Rf6xQEqBvMrNeyDSN0T4l/B/Fwy0c6Sek07ztzu+3f6 UzNtNlf9XW+SUGS5tIibUGwiOg+RkeWvY8acjwI8l7GjEQ3iYrtKJh7Qy78gBkpc8XY6IM 8AIXLqnA7eKY7LquK4IEYb1kVCZP9TA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-603-VS8bQdXdO1eZjL-XKbKjGg-1; Tue, 15 Jun 2021 05:45:16 -0400 X-MC-Unique: VS8bQdXdO1eZjL-XKbKjGg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 15A9080293F; Tue, 15 Jun 2021 09:45:15 +0000 (UTC) Received: from redhat.com (ovpn-114-213.ams2.redhat.com [10.36.114.213]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 346BD60622; Tue, 15 Jun 2021 09:45:10 +0000 (UTC) Date: Tue, 15 Jun 2021 10:45:07 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Peter Maydell Cc: Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , QEMU Developers , Leonardo Bras , Lukas Straub , Juan Quintela , QEMU Trivial , Stefan Weil , "Dr. David Alan Gilbert" , Paolo Bonzini Subject: Re: [RFC PATCH] migration: Add missing dependency on GNUTLS Message-ID: Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20210614052623.1657103-1-f4bug@amsat.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/2.0.7 (2021-05-04) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2021 09:45:24 -0000 On Tue, Jun 15, 2021 at 10:39:08AM +0100, Peter Maydell wrote: > On Mon, 14 Jun 2021 at 06:28, Philippe Mathieu-Daudé wrote: > > > > Commit 7de2e856533 made migration/qemu-file-channel.c include > > "io/channel-tls.h" but forgot to add the new GNUTLS dependency > > on Meson, leading to build failure on OSX: > > > > [2/35] Compiling C object libmigration.fa.p/migration_qemu-file-channel.c.o > > FAILED: libmigration.fa.p/migration_qemu-file-channel.c.o > > cc -Ilibmigration.fa.p -I. -I.. -Iqapi [ ... ] -o libmigration.fa.p/migration_qemu-file-channel.c.o -c ../migration/qemu-file-channel.c > > In file included from ../migration/qemu-file-channel.c:29: > > In file included from include/io/channel-tls.h:26: > > In file included from include/crypto/tlssession.h:24: > > include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found > > #include > > ^~~~~~~~~~~~~~~~~ > > 1 error generated. > > > > Reported-by: Stefan Weil > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/407 > > Fixes: 7de2e856533 ("yank: Unregister function when using TLS migration") > > Signed-off-by: Philippe Mathieu-Daudé > > Is there really no way to get Meson to handle this kind > of thing properly (ie "just put all the include paths in the CFLAGS > for every compilation") rather than requiring us to add dependency > markers all over the meson.build files every time we add some > extra #include somewhere ? This is demonstrably horribly fragile > the way we have it at the moment :-( A better way to fix this might be to figure out a change to make the crypto struct definitions be private in the .c file, since the public callers should not need to see them. That would let us remove the #include for gnutls from the header. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|