[libvirt] Entering freeze for libvirt-0.10.0

As planned, I just tagged 0.10.0 release candidate 1 in git and pushed a tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ I gave it a try locally and things seems to work as expected, but that's far from an extensive testing :-) So please try it, try to compile it on various platforms and send feedback to the list. My schedule is to make an rc2 probably for the week-end and ideally a final release a week from now, thanks in advance ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 22/08/2012, at 9:51 PM, Daniel Veillard wrote:
As planned, I just tagged 0.10.0 release candidate 1 in git and pushed a tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
I gave it a try locally and things seems to work as expected, but that's far from an extensive testing :-)
So please try it, try to compile it on various platforms and send feedback to the list.
Compilation is failing on OSX 10.7: ... CC libvirt_util_la-viruri.lo CC libvirt_conf_la-netdev_bandwidth_conf.lo util/virnetlink.c:819: error: conflicting types for 'virNetlinkEventAddClient' util/virnetlink.h:82: error: previous declaration of 'virNetlinkEventAddClient' was here util/virnetlink.c: In function 'virNetlinkEventAddClient': util/virnetlink.c:819: error: expected ',' or ';' before ')' token util/virnetlink.c:830: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' util/virnetlink.c:834: error: old-style parameter declarations in prototyped function definition util/virnetlink.c:834: error: expected '{' at end of input make[3]: *** [libvirt_util_la-virnetlink.lo] Error 1 Any ideas? Regards and best wishes, Justin Clift -- Aeolus Community Manager http://www.aeolusproject.org

On Thu, Aug 23, 2012 at 11:21:21PM +1000, Justin Clift wrote:
On 22/08/2012, at 9:51 PM, Daniel Veillard wrote:
As planned, I just tagged 0.10.0 release candidate 1 in git and pushed a tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
I gave it a try locally and things seems to work as expected, but that's far from an extensive testing :-)
So please try it, try to compile it on various platforms and send feedback to the list.
Compilation is failing on OSX 10.7:
... CC libvirt_util_la-viruri.lo CC libvirt_conf_la-netdev_bandwidth_conf.lo util/virnetlink.c:819: error: conflicting types for 'virNetlinkEventAddClient' util/virnetlink.h:82: error: previous declaration of 'virNetlinkEventAddClient' was here util/virnetlink.c: In function 'virNetlinkEventAddClient': util/virnetlink.c:819: error: expected ',' or ';' before ')' token util/virnetlink.c:830: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' util/virnetlink.c:834: error: old-style parameter declarations in prototyped function definition util/virnetlink.c:834: error: expected '{' at end of input make[3]: *** [libvirt_util_la-virnetlink.lo] Error 1
Any ideas?
Please try building from GIT instead - rc1 missed the fix for non-Linux platforms. commit 34b30de5f5812f367af362b602484fe105e4f88f Author: Daniel P. Berrange <berrange@redhat.com> Date: Wed Aug 22 16:09:17 2012 +0100 Fix parameter list in virNetlinkEvent{Add,Remove}Client Win32 stubs The virNetlinkEventAddClient / virNetlinkEventRemoveClient stub impls had syntax errors in their parameter lists, using a ')' after the second-to-last parameter instead of a ',' Signed-off-by: Daniel P. Berrange <berrange@redhat.com> 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 23/08/2012, at 11:24 PM, Daniel P. Berrange wrote:
On Thu, Aug 23, 2012 at 11:21:21PM +1000, Justin Clift wrote:
On 22/08/2012, at 9:51 PM, Daniel Veillard wrote:
As planned, I just tagged 0.10.0 release candidate 1 in git and pushed a tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
I gave it a try locally and things seems to work as expected, but that's far from an extensive testing :-)
So please try it, try to compile it on various platforms and send feedback to the list.
Compilation is failing on OSX 10.7:
... CC libvirt_util_la-viruri.lo CC libvirt_conf_la-netdev_bandwidth_conf.lo util/virnetlink.c:819: error: conflicting types for 'virNetlinkEventAddClient' util/virnetlink.h:82: error: previous declaration of 'virNetlinkEventAddClient' was here util/virnetlink.c: In function 'virNetlinkEventAddClient': util/virnetlink.c:819: error: expected ',' or ';' before ')' token util/virnetlink.c:830: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsigned' util/virnetlink.c:834: error: old-style parameter declarations in prototyped function definition util/virnetlink.c:834: error: expected '{' at end of input make[3]: *** [libvirt_util_la-virnetlink.lo] Error 1
Any ideas?
Please try building from GIT instead - rc1 missed the fix for non-Linux platforms.
commit 34b30de5f5812f367af362b602484fe105e4f88f Author: Daniel P. Berrange <berrange@redhat.com> Date: Wed Aug 22 16:09:17 2012 +0100
Fix parameter list in virNetlinkEvent{Add,Remove}Client Win32 stubs
The virNetlinkEventAddClient / virNetlinkEventRemoveClient stub impls had syntax errors in their parameter lists, using a ')' after the second-to-last parameter instead of a ','
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Thanks Daniel. I'll try again with rc2 instead when it's ready. :) + Justin -- Aeolus Community Manager http://www.aeolusproject.org

On 08/22/2012 01:51 PM, Daniel Veillard wrote:
As planned, I just tagged 0.10.0 release candidate 1 in git and pushed a tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
I gave it a try locally and things seems to work as expected, but that's far from an extensive testing :-)
So please try it, try to compile it on various platforms and send feedback to the list. My schedule is to make an rc2 probably for the week-end and ideally a final release a week from now,
thanks in advance !
Daniel
fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit CC libvirt_util_la-virnetdev.lo cc1: warnings being treated as errors /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined cc1: error: unrecognized command line option "-Wno-suggest-attribute=const" cc1: error: unrecognized command line option "-Wno-suggest-attribute=pure" make[3]: *** [libvirt_util_la-virnetdev.lo] Error 1 it doesn't bother me too much, though as my target platform (s390x) builds and works fine... -- Mit freundlichen Grüßen/Kind Regards Viktor Mihajlovski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

On 08/24/2012 08:28 AM, Viktor Mihajlovski wrote:
fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit
CC libvirt_util_la-virnetdev.lo cc1: warnings being treated as errors /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined
Please report that as a bug in Ubuntu's system headers. Also, can you please show us more context from that broken header, and determine the chain of include files that reached it from virnetdev.c, to see if we might be able to work around it by some temporary #defines around the inclusion of the broken header? -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 08/24/2012 10:28 AM, Viktor Mihajlovski wrote:
fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit
CC libvirt_util_la-virnetdev.lo cc1: warnings being treated as errors /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined
libvirt itself never uses that function. Also, in the version of /usr/include/netlink/object.h I'm working with (on Fedora 17) that function isn't declared as inline. Thomas, do you have any info on the libnl version used in Ubuntu 10.04, and/or what might be the cause of this warning.

On Fri, Aug 24, 2012 at 11:30:44AM -0400, Laine Stump wrote:
On 08/24/2012 10:28 AM, Viktor Mihajlovski wrote:
fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit
CC libvirt_util_la-virnetdev.lo cc1: warnings being treated as errors /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined
libvirt itself never uses that function. Also, in the version of /usr/include/netlink/object.h I'm working with (on Fedora 17) that function isn't declared as inline.
Thomas, do you have any info on the libnl version used in Ubuntu 10.04, and/or what might be the cause of this warning.
It's a static inline which I guess is the problem here. Laine, you are probably using a libnl version which does not include the commit below. Why is the compiler not OK with this? commit a8cd7b62c86127e2c946373d50efac9d2ed8da38 Author: Pavel Roskin <proski@gnu.org> Date: Tue Apr 7 17:04:04 2009 -0400 nl_object_priv() is inline, so define it in the header diff --git a/include/netlink/object.h b/include/netlink/object.h index bae2bf4..ef1ed9f 100644 --- a/include/netlink/object.h +++ b/include/netlink/object.h @@ -56,7 +56,11 @@ extern int nl_object_is_marked(struct nl_object *); /* Access Functions */ extern int nl_object_get_refcnt(struct nl_object *); extern struct nl_cache * nl_object_get_cache(struct nl_object *); -extern inline void * nl_object_priv(struct nl_object *); +static inline void * nl_object_priv(struct nl_object *obj) +{ + return obj; +} + #ifdef __cplusplus }

On 08/24/2012 09:49 AM, Thomas Graf wrote:
It's a static inline which I guess is the problem here. Laine, you
Actually, Viktor hit the problem; Laine couldn't reproduce, so it is probably Viktor with the older header.
are probably using a libnl version which does not include the commit below.
Ah, that rings a bell, I knew I'd seen this issue before. I'm actually surprised it STILL hasn't been fixed in Ubuntu, and maybe it's time to apply the workaround below as a build-breaker fix (I think I've posted it on list before, but never committed it).
Why is the compiler not OK with this?
Because C99 changed the meaning of 'extern inline' from what it used to be in older gcc compilers. You are using a libnl so old that it expects the older gcc semantics
-extern inline void * nl_object_priv(struct nl_object *);
where 'extern inline' meant that the function must always be inlined, but on a system with newer gcc, you get C99 semantics. C99 6.7.4 p. 6 states that requires that "For a function with external linkage, the following restrictions apply: If a function is declared with an inline function specifier, then it shall also be defined in the same translation unit.", which means a forward declaration of an 'extern inline' function without a corresponding function body is a violation that the compiler must diagnose. diff --git i/src/util/virnetlink.h w/src/util/virnetlink.h index 1982dae..82154de 100644 --- i/src/util/virnetlink.h +++ w/src/util/virnetlink.h @@ -26,7 +26,11 @@ # if defined(__linux__) && defined(HAVE_LIBNL) +/* Work around a bug where older libnl-1 headers expected older gcc + * semantics of 'extern inline' that conflict with C99 semantics. */ +# define inline # include <netlink/msg.h> +# undef inline # else -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 08/24/2012 10:19 AM, Eric Blake wrote:
Ah, that rings a bell, I knew I'd seen this issue before. I'm actually surprised it STILL hasn't been fixed in Ubuntu, and maybe it's time to apply the workaround below as a build-breaker fix (I think I've posted it on list before, but never committed it).
diff --git i/src/util/virnetlink.h w/src/util/virnetlink.h index 1982dae..82154de 100644 --- i/src/util/virnetlink.h +++ w/src/util/virnetlink.h @@ -26,7 +26,11 @@
# if defined(__linux__) && defined(HAVE_LIBNL)
+/* Work around a bug where older libnl-1 headers expected older gcc + * semantics of 'extern inline' that conflict with C99 semantics. */ +# define inline # include <netlink/msg.h> +# undef inline
I've now pushed this under the build-breaker rule. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 08/27/12 23:09, Eric Blake wrote:
On 08/24/2012 10:19 AM, Eric Blake wrote:
Ah, that rings a bell, I knew I'd seen this issue before. I'm actually surprised it STILL hasn't been fixed in Ubuntu, and maybe it's time to apply the workaround below as a build-breaker fix (I think I've posted it on list before, but never committed it).
diff --git i/src/util/virnetlink.h w/src/util/virnetlink.h index 1982dae..82154de 100644 --- i/src/util/virnetlink.h +++ w/src/util/virnetlink.h @@ -26,7 +26,11 @@
# if defined(__linux__) && defined(HAVE_LIBNL)
+/* Work around a bug where older libnl-1 headers expected older gcc + * semantics of 'extern inline' that conflict with C99 semantics. */ +# define inline # include <netlink/msg.h> +# undef inline
I've now pushed this under the build-breaker rule.
This breaks the build with libnl3: CC libvirt_util_la-virnetdevbridge.lo cc1: warnings being treated as errors /usr/include/libnl3/netlink/list.h:21:20: error: 'NL_INIT_LIST_HEAD' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:37:20: error: 'nl_list_add_tail' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:43:20: error: 'nl_list_add_head' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:49:20: error: 'nl_list_del' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:55:19: error: 'nl_list_empty' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/object.h:60:23: error: 'nl_object_priv' defined but not used [-Wunused-function] cc1: error: unrecognized command line option "-Wno-suggest-attribute=const" cc1: error: unrecognized command line option "-Wno-suggest-attribute=pure" make[3]: *** [libvirt_util_la-virnetdev.lo] Error 1 That annoying libnl-1 bug exists also in other distros that for some reason refuse to fix it (e.g. gentoo) but upgrading to libnl3 helps and libvirt compiles cleanly. Libnl3 unfortunately has some inline functions in the header files where removing the inline keyword is catastrophic. I vote for reverting this patch and have distros apply that long-known trivial patch that fixes libnl-1 headers rather than breaking libnl3 support. Peter

On Tue, Aug 28, 2012 at 4:19 AM, Peter Krempa <pkrempa@redhat.com> wrote:
On 08/27/12 23:09, Eric Blake wrote:
On 08/24/2012 10:19 AM, Eric Blake wrote:
Ah, that rings a bell, I knew I'd seen this issue before. I'm actually surprised it STILL hasn't been fixed in Ubuntu, and maybe it's time to apply the workaround below as a build-breaker fix (I think I've posted it on list before, but never committed it).
diff --git i/src/util/virnetlink.h w/src/util/virnetlink.h index 1982dae..82154de 100644 --- i/src/util/virnetlink.h +++ w/src/util/virnetlink.h @@ -26,7 +26,11 @@
# if defined(__linux__) && defined(HAVE_LIBNL)
+/* Work around a bug where older libnl-1 headers expected older gcc + * semantics of 'extern inline' that conflict with C99 semantics. */ +# define inline # include <netlink/msg.h> +# undef inline
I've now pushed this under the build-breaker rule.
This breaks the build with libnl3:
CC libvirt_util_la-virnetdevbridge.lo cc1: warnings being treated as errors /usr/include/libnl3/netlink/list.h:21:20: error: 'NL_INIT_LIST_HEAD' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:37:20: error: 'nl_list_add_tail' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:43:20: error: 'nl_list_add_head' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:49:20: error: 'nl_list_del' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/list.h:55:19: error: 'nl_list_empty' defined but not used [-Wunused-function] /usr/include/libnl3/netlink/object.h:60:23: error: 'nl_object_priv' defined but not used [-Wunused-function] cc1: error: unrecognized command line option "-Wno-suggest-attribute=const" cc1: error: unrecognized command line option "-Wno-suggest-attribute=pure" make[3]: *** [libvirt_util_la-virnetdev.lo] Error 1
That annoying libnl-1 bug exists also in other distros that for some reason refuse to fix it (e.g. gentoo) but upgrading to libnl3 helps and libvirt compiles cleanly.
Libnl3 unfortunately has some inline functions in the header files where removing the inline keyword is catastrophic. I vote for reverting this patch and have distros apply that long-known trivial patch that fixes libnl-1 headers rather than breaking libnl3 support.
Peter
Erm. Gentoo doesn't have the issue. I mentioned that Gentoo has the same fix that Fedora had which was the commit from upstream applied. The broken distro was Ubuntu 10.04, which I believe is a LTS release. The other mention of Gentoo I made was that we put libnl3 headers in the same path that Fedora does to support parallel installs of libnl1 and libnl3. -- Doug Goldstein

On 08/24/2012 11:49 AM, Thomas Graf wrote:
On Fri, Aug 24, 2012 at 11:30:44AM -0400, Laine Stump wrote:
fwiw ... with the current GIT level I get the following build error on Ubuntu 10.04 32-bit
CC libvirt_util_la-virnetdev.lo cc1: warnings being treated as errors /usr/include/netlink/object.h:58: error: inline function 'nl_object_priv' declared but never defined
On 08/24/2012 10:28 AM, Viktor Mihajlovski wrote: libvirt itself never uses that function. Also, in the version of /usr/include/netlink/object.h I'm working with (on Fedora 17) that function isn't declared as inline.
Thomas, do you have any info on the libnl version used in Ubuntu 10.04, and/or what might be the cause of this warning. It's a static inline which I guess is the problem here. Laine, you are probably using a libnl version which does not include the commit below.
I'm using libnl-devel-1.1-15.fc17.x86_64 For fun, I just installed libnl3-devel (which has the inlined nl_object_priv(), reconfigured to switch to using libnl3, and it also compiled without problems on F17. So I guess it's completely related to the gcc version.

On 08/24/2012 01:54 PM, Laine Stump wrote:
Thomas, do you have any info on the libnl version used in Ubuntu 10.04, and/or what might be the cause of this warning. It's a static inline which I guess is the problem here. Laine, you are probably using a libnl version which does not include the commit below.
I'm using libnl-devel-1.1-15.fc17.x86_64
For fun, I just installed libnl3-devel (which has the inlined nl_object_priv(), reconfigured to switch to using libnl3, and it also compiled without problems on F17. So I guess it's completely related to the gcc version.
Not just the gcc version, but _how_ the function is declared. 'static inline' is okay, 'extern inline' without a later body is where you run into problems. The bug exists in older libnl headers, and has been fixed upstream for libnl3; but while Fedora 17 ships libnl with a patched header, Ubuntu 10.04 did not. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 08/24/2012 04:02 PM, Eric Blake wrote:
On 08/24/2012 01:54 PM, Laine Stump wrote:
Thomas, do you have any info on the libnl version used in Ubuntu 10.04, and/or what might be the cause of this warning. It's a static inline which I guess is the problem here. Laine, you are probably using a libnl version which does not include the commit below. I'm using libnl-devel-1.1-15.fc17.x86_64
For fun, I just installed libnl3-devel (which has the inlined nl_object_priv(), reconfigured to switch to using libnl3, and it also compiled without problems on F17. So I guess it's completely related to the gcc version. Not just the gcc version, but _how_ the function is declared. 'static inline' is okay, 'extern inline' without a later body is where you run into problems. The bug exists in older libnl headers, and has been fixed upstream for libnl3; but while Fedora 17 ships libnl with a
F17 actually has two different headers - one for libnl-1.1 (which doesn't declare it inline) and one for libnl-3 (which does). Apparently Ubuntu 10.0.4 is somewhere in between.
patched header, Ubuntu 10.04 did not.

I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available, please give it a try and report, I am still shooting for a final release this Wednesday, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time: ... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs.... Any ideas? + Justin -- Aeolus Community Manager http://www.aeolusproject.org

On Mon, Aug 27, 2012 at 4:57 AM, Justin Clift <jclift@redhat.com> wrote:
On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time:
... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs....
Any ideas?
+ Justin
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet. diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr; +#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */ int virNetlinkStartup(void); -- Doug Goldstein

On Mon, Aug 27, 2012 at 11:32:11AM -0500, Doug Goldstein thus spake:
On Mon, Aug 27, 2012 at 4:57 AM, Justin Clift <jclift@redhat.com> wrote:
On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time:
... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs....
Any ideas?
+ Justin
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet.
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr;
+#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */
int virNetlinkStartup(void);
-- Doug Goldstein
Adding this patch to FreeBSD worked just fine, so this should work for MacOSX, as well. https://redports.org/buildarchive/20120827180312-44416/ -jgh -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5

Doug Goldstein wrote:
On Mon, Aug 27, 2012 at 4:57 AM, Justin Clift <jclift@redhat.com> wrote:
On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time:
... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs....
I'm seeing the same issue building on an older SLES where HAVE_LIBNL is not defined.
Any ideas?
+ Justin
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet.
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr;
+#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */
int virNetlinkStartup(void);
This workaround fixed the build. Is this an acceptable fix, or should commits 080bf330 and d5756794 have conditionally called virNetlinkEventServiceStart(...) based on HAVE_LIBNL? Regards, Jim

On Mon, Aug 27, 2012 at 3:39 PM, Jim Fehlig <jfehlig@suse.com> wrote:
Doug Goldstein wrote:
On Mon, Aug 27, 2012 at 4:57 AM, Justin Clift <jclift@redhat.com> wrote:
On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time:
... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs....
I'm seeing the same issue building on an older SLES where HAVE_LIBNL is not defined.
Any ideas?
+ Justin
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet.
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr;
+#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */
int virNetlinkStartup(void);
This workaround fixed the build. Is this an acceptable fix, or should commits 080bf330 and d5756794 have conditionally called virNetlinkEventServiceStart(...) based on HAVE_LIBNL?
Regards, Jim
Yeah that's what I wasn't sure about when I wrote the patch. I can see the argument either way. -- Doug Goldstein

On 28/08/2012, at 2:32 AM, Doug Goldstein wrote: <snip>
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet.
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr;
+#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */
int virNetlinkStartup(void);
Thanks Dough. This worked, and seems to be the last of the problems. The whole compile worked after this. :) + Justin -- Aeolus Community Manager http://www.aeolusproject.org

On Mon, Aug 27, 2012 at 11:32:11AM -0500, Doug Goldstein wrote:
On Mon, Aug 27, 2012 at 4:57 AM, Justin Clift <jclift@redhat.com> wrote:
On 27/08/2012, at 1:00 PM, Daniel Veillard wrote:
I tagged the rc2 in the git tree and pushed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/
it should include the various fixes that were made on top of rc1 and fix the compilation problem exposed on OS-X, as well as picking libnl3 if available,
please give it a try and report, I am still shooting for a final release this Wednesday,
Still a no go on OSX. Different error this time:
... libvirtd.c: In function 'main': libvirtd.c:1316: error: 'NETLINK_ROUTE' undeclared (first use in this function) libvirtd.c:1316: error: (Each undeclared identifier is reported only once libvirtd.c:1316: error: for each function it appears in.) libvirtd.c:1322: error: 'NETLINK_KOBJECT_UEVENT' undeclared (first use in this function) make[3]: *** [libvirtd-libvirtd.o] Error 1 make[3]: *** Waiting for unfinished jobs....
Any ideas?
+ Justin
You can try something like the following to get you a little farther and see if it fails farther on. Just trying to see if we can get Mac OS X built and see what changes need to happen before 0.10.0 goes out final, not necessary "proper" patches just yet.
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 1982dae..c3f3e81 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -34,6 +34,9 @@ struct nl_msg; struct sockaddr_nl; struct nlattr;
+#define NETLINK_ROUTE 0 /* Routing/device hook */ +#define NETLINK_KOBJECT_UEVENT 15 /* Kernel messages to userspace */ + # endif /* __linux__ */
int virNetlinkStartup(void);
I don't like too much the idea of adding kernel defines in our headers. Basically this is all due to commits d57567940153147f4d43875fb92c3030b3178b03 and 080bf330e3749d94ebe094f8deca0e3e67d3f2fe The fact that it breaks only in daemon.c, i.e. after the library compiled is a good infocation that the guards #if WITH_VIRTUALPORT in src/util/virnetdevvportprofile.c #if WITH_MACVTAP in src/util/virnetdevmacvlan.c and #if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX) in src/util/virnetdev.c seems sufficient to avoid the portability problem in those files and the remaining problem is really about daemon/libvirtd.c and I would suggest a fix along those lines: Daniel diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 19dd26b..352d4fe 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1312,17 +1312,21 @@ int main(int argc, char **argv) { goto cleanup; } +#if defined(__linux__) && defined(NETLINK_ROUTE) /* Register the netlink event service for NETLINK_ROUTE */ if (virNetlinkEventServiceStart(NETLINK_ROUTE, 0) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif +#if defined(__linux__) && defined(NETLINK_KOBJECT_UEVENT) /* Register the netlink event service for NETLINK_KOBJECT_UEVENT */ if (virNetlinkEventServiceStart(NETLINK_KOBJECT_UEVENT, 1) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif /* Run event loop. */ virNetServerRun(srv); -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On 28/08/2012, at 6:05 PM, Daniel Veillard wrote: <snip>
I would suggest a fix along those lines:
Daniel
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 19dd26b..352d4fe 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1312,17 +1312,21 @@ int main(int argc, char **argv) { goto cleanup; }
+#if defined(__linux__) && defined(NETLINK_ROUTE) /* Register the netlink event service for NETLINK_ROUTE */ if (virNetlinkEventServiceStart(NETLINK_ROUTE, 0) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
+#if defined(__linux__) && defined(NETLINK_KOBJECT_UEVENT) /* Register the netlink event service for NETLINK_KOBJECT_UEVENT */ if (virNetlinkEventServiceStart(NETLINK_KOBJECT_UEVENT, 1) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
/* Run event loop. */ virNetServerRun(srv);
Just tested this to be absolutely sure, and it definitely works too. ie. as alternative approach to Doug's patch. + Justin -- Aeolus Community Manager http://www.aeolusproject.org

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Tue, Aug 28, 2012 at 04:05:36PM +0800, Daniel Veillard thus spake:
I don't like too much the idea of adding kernel defines in our headers. Basically this is all due to commits d57567940153147f4d43875fb92c3030b3178b03 and 080bf330e3749d94ebe094f8deca0e3e67d3f2fe
The fact that it breaks only in daemon.c, i.e. after the library compiled is a good infocation that the guards #if WITH_VIRTUALPORT in src/util/virnetdevvportprofile.c #if WITH_MACVTAP in src/util/virnetdevmacvlan.c and #if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX) in src/util/virnetdev.c
seems sufficient to avoid the portability problem in those files and the remaining problem is really about daemon/libvirtd.c and I would suggest a fix along those lines:
Daniel
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 19dd26b..352d4fe 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1312,17 +1312,21 @@ int main(int argc, char **argv) { goto cleanup; }
+#if defined(__linux__) && defined(NETLINK_ROUTE) /* Register the netlink event service for NETLINK_ROUTE */ if (virNetlinkEventServiceStart(NETLINK_ROUTE, 0) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
+#if defined(__linux__) && defined(NETLINK_KOBJECT_UEVENT) /* Register the netlink event service for NETLINK_KOBJECT_UEVENT */ if (virNetlinkEventServiceStart(NETLINK_KOBJECT_UEVENT, 1) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
/* Run event loop. */ virNetServerRun(srv); -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
This is building as expected with your new patch for FreeBSD. Here is a link to the build logs. https://redports.org/buildarchive/20120828164025-20179/ - -jgh - -- Jason Helfman System Administrator experts-exchange.com http://www.experts-exchange.com/M_4830110.html E4AD 7CF1 1396 27F6 79DD 4342 5E92 AD66 8C8C FBA5 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlA8+WYACgkQXpKtZoyM+6WK9wD9HXb5AybTrroQJTLseuRLvr7p scRUSIA7lfSFM7s2lxUA/0B5X878TeDFk9IUaXgOWOsbjt6z28+m/1LuH9XcHHHa =MCSJ -----END PGP SIGNATURE-----

On Tue, Aug 28, 2012 at 10:01:27AM -0700, Jason Helfman wrote:
On Tue, Aug 28, 2012 at 04:05:36PM +0800, Daniel Veillard thus spake:
I don't like too much the idea of adding kernel defines in our headers. Basically this is all due to commits d57567940153147f4d43875fb92c3030b3178b03 and 080bf330e3749d94ebe094f8deca0e3e67d3f2fe
The fact that it breaks only in daemon.c, i.e. after the library compiled is a good infocation that the guards #if WITH_VIRTUALPORT in src/util/virnetdevvportprofile.c #if WITH_MACVTAP in src/util/virnetdevmacvlan.c and #if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX) in src/util/virnetdev.c
seems sufficient to avoid the portability problem in those files and the remaining problem is really about daemon/libvirtd.c and I would suggest a fix along those lines:
Daniel
diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 19dd26b..352d4fe 100644 --- a/daemon/libvirtd.c +++ b/daemon/libvirtd.c @@ -1312,17 +1312,21 @@ int main(int argc, char **argv) { goto cleanup; }
+#if defined(__linux__) && defined(NETLINK_ROUTE) /* Register the netlink event service for NETLINK_ROUTE */ if (virNetlinkEventServiceStart(NETLINK_ROUTE, 0) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
+#if defined(__linux__) && defined(NETLINK_KOBJECT_UEVENT) /* Register the netlink event service for NETLINK_KOBJECT_UEVENT */ if (virNetlinkEventServiceStart(NETLINK_KOBJECT_UEVENT, 1) < 0) { ret = VIR_DAEMON_ERR_NETWORK; goto cleanup; } +#endif
/* Run event loop. */ virNetServerRun(srv); -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
This is building as expected with your new patch for FreeBSD. Here is a link to the build logs.
Thanks Justin and Jason for the feedback ! I pushed as a result :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (11)
-
Daniel P. Berrange
-
Daniel Veillard
-
Doug Goldstein
-
Eric Blake
-
Jason Helfman
-
Jim Fehlig
-
Justin Clift
-
Laine Stump
-
Peter Krempa
-
Thomas Graf
-
Viktor Mihajlovski