[libvirt] [PATCH] build: fix build --without-remote

When configured --without-remote, the files remote_protocol.[ch] are not built by src/Makefile, but are still used by daemon/Makefile. The solution is to copy the implicit rule. * daemon/Makefile.am (%protocol.c, %protocol.h): Copy from src. --- Not quite trivial enough to claim the build-breaker rule. daemon/Makefile.am | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 8ed29b8..cb3caa2 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -52,6 +52,14 @@ $(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ $(QEMU_PROTOCOL) > $@ +%protocol.c: %protocol.x %protocol.h $(srcdir)/../src/rpc/genprotocol.pl + $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/genprotocol.pl $(RPCGEN) -c \ + $< $@ + +%protocol.h: %protocol.x $(srcdir)/../src/rpc/genprotocol.pl + $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/genprotocol.pl $(RPCGEN) -h \ + $< $@ + if WITH_LIBVIRTD man8_MANS = libvirtd.8 -- 1.7.4.4

On Tue, Jun 28, 2011 at 09:31:50PM -0600, Eric Blake wrote:
When configured --without-remote, the files remote_protocol.[ch] are not built by src/Makefile, but are still used by daemon/Makefile. The solution is to copy the implicit rule.
* daemon/Makefile.am (%protocol.c, %protocol.h): Copy from src. ---
Not quite trivial enough to claim the build-breaker rule.
daemon/Makefile.am | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 8ed29b8..cb3caa2 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -52,6 +52,14 @@ $(srcdir)/qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \ $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/gendispatch.pl -b qemu \ $(QEMU_PROTOCOL) > $@
+%protocol.c: %protocol.x %protocol.h $(srcdir)/../src/rpc/genprotocol.pl + $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/genprotocol.pl $(RPCGEN) -c \ + $< $@ + +%protocol.h: %protocol.x $(srcdir)/../src/rpc/genprotocol.pl + $(AM_V_GEN)perl -w $(srcdir)/../src/rpc/genprotocol.pl $(RPCGEN) -h \ + $< $@ + if WITH_LIBVIRTD
man8_MANS = libvirtd.8
Does it make sense to allow building of the daemon, when the client is disabled ? I can see value in building client, but not daemon, since you might want a remote only build. But I'm not sure I see any point in the reverse. So we could make configure force the daemon disabled, if the client is disabled instead. Or make it raise an error if the user requests that combo Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On 06/29/2011 03:36 AM, Daniel P. Berrange wrote:
On Tue, Jun 28, 2011 at 09:31:50PM -0600, Eric Blake wrote:
When configured --without-remote, the files remote_protocol.[ch] are not built by src/Makefile, but are still used by daemon/Makefile. The solution is to copy the implicit rule.
* daemon/Makefile.am (%protocol.c, %protocol.h): Copy from src.
Does it make sense to allow building of the daemon, when the client is disabled ?
Hmm, good metaquestion. And I bet that if I fix that issue, then this patch would not be needed.
I can see value in building client, but not daemon, since you might want a remote only build. But I'm not sure I see any point in the reverse. So we could make configure force the daemon disabled, if the client is disabled instead. Or make it raise an error if the user requests that combo
Well, the build in question was './configure --without-remote', which is useful only for connecting to non-daemon hypervisors like ESX. If you are going to skip all rpc-related code, then you should skip both client and daemon. I'll look into that more today. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Daniel P. Berrange
-
Eric Blake