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

Re: [libvirt] Libvirt CVS fails to build on PPC



Chris Lalancette <clalance redhat com> wrote:
> Actually, the subject isn't strictly true.  Libvirt CVS currently fails to build
> when using this configuration on any platform:
>
> ./configure --build=i686-redhat-linux-gnu --host=i686-redhat-linux-gnu
> --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr
> --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
> --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib
> --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com
> --mandir=/usr/share/man --infodir=/usr/share/info --without-xen --without-qemu
> --with-init-script=redhat --with-qemud-pid-file=/var/run/libvirt_qemud.pid
> --with-remote-file=/var/run/libvirtd.pid
>
> (the important part is the --without-xen --without-qemu in there).  This just
> happens to be the configuration that koji uses when it is building the ppc
> libvirt package.  There are a lot of build errors, but they start with:
>
> network_driver.c:64: error: expected specifier-qualifier-list before
> 'iptablesContext'
> network_driver.c: In function 'networkStartup':
> network_driver.c:124: error: 'struct network_driver' has no member named 'logDir'
>
> This seems to stem from the new module refactoring.  I'm not entirely sure
> what's the correct way to fix it, however; I *think* we always want to build the
> network_driver at this point, but if that's the case, then we need to make sure
> we have the header files for iptablesContext and friends included.  Dan, any ideas?

Hi Chris,

FYI, this patch fixes it.
The result builds both on rawhide and for mingw.

>From ea7a97d34f1ae04ef6bd1f9584d946a5bc4575b4 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Thu, 6 Nov 2008 08:42:33 +0100
Subject: [PATCH] always compile iptables.c

Avoid a build error when configuring --without-xen --without-qemu.
* src/iptables.c [WITH_QEMU]: Don't #ifdef-out.
* src/iptables.h [WITH_QEMU]: Don't #ifdef-out.
---
 src/iptables.c |    4 ----
 src/iptables.h |    6 +-----
 2 files changed, 1 insertions(+), 9 deletions(-)

diff --git a/src/iptables.c b/src/iptables.c
index 53e0f41..ad7fddf 100644
--- a/src/iptables.c
+++ b/src/iptables.c
@@ -21,8 +21,6 @@

 #include <config.h>

-#if WITH_QEMU
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1120,5 +1118,3 @@ iptablesRemoveForwardMasquerade(iptablesContext *ctx,
 {
     return iptablesForwardMasquerade(ctx, network, physdev, REMOVE);
 }
-
-#endif /* WITH_QEMU */
diff --git a/src/iptables.h b/src/iptables.h
index 95f07de..fbe9b5d 100644
--- a/src/iptables.h
+++ b/src/iptables.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Red Hat, Inc.
+ * Copyright (C) 2007, 2008 Red Hat, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -22,8 +22,6 @@
 #ifndef __QEMUD_IPTABLES_H__
 #define __QEMUD_IPTABLES_H__

-#if WITH_QEMU
-
 typedef struct _iptablesContext iptablesContext;

 iptablesContext *iptablesContextNew              (void);
@@ -95,6 +93,4 @@ int              iptablesRemoveForwardMasquerade (iptablesContext *ctx,
                                                   const char *network,
                                                   const char *physdev);

-#endif /* WITH_QEMU */
-
 #endif /* __QEMUD_IPTABLES_H__ */
--
1.6.0.3.756.gb776d


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