[Libvir] Patch for include file syntax

When doing an out-of-tree build of code which uses virterror.h, one gets a build failure, because when deployed virterror.h lives in subdir of the include directory rather than the top level In file included from Virt.xs:25: /usr/include/libvirt/virterror.h:17:21: error: libvirt.h: No such file or directory In file included from Virt.xs:25: /usr/include/libvirt/virterror.h:62: error: expected specifier-qualifier-list before âvirConnectPtrâ /usr/include/libvirt/virterror.h:122: error: expected â)â before âconnâ /usr/include/libvirt/virterror.h:123: error: expected â)â before âconnâ /usr/include/libvirt/virterror.h:129: error: expected â)â before âconnâ /usr/include/libvirt/virterror.h:132: error: expected â)â before âconnâ This is fixable by making virterror.h use "..." instead of <...> to include libvirt.h. Attaching a patch to fix this Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|

On Thu, Mar 23, 2006 at 10:06:45PM +0000, Daniel P. Berrange wrote:
When doing an out-of-tree build of code which uses virterror.h, one gets a build failure, because when deployed virterror.h lives in subdir of the include directory rather than the top level [...]
This is fixable by making virterror.h use "..." instead of <...> to include libvirt.h. Attaching a patch to fix this
Hum, I would rather fix the include path since this header is to be installed in /usr/include . src/Makefile.am had -I@srcdir@/include instead of -I@top_srcdir@/include, fixed in CVS, thanks for pointing this. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

On Fri, Mar 24, 2006 at 08:04:09AM -0500, Daniel Veillard wrote:
On Thu, Mar 23, 2006 at 10:06:45PM +0000, Daniel P. Berrange wrote:
When doing an out-of-tree build of code which uses virterror.h, one gets a build failure, because when deployed virterror.h lives in subdir of the include directory rather than the top level [...]
This is fixable by making virterror.h use "..." instead of <...> to include libvirt.h. Attaching a patch to fix this
Hum, I would rather fix the include path since this header is to be installed in /usr/include . src/Makefile.am had -I@srcdir@/include instead of -I@top_srcdir@/include, fixed in CVS, thanks for pointing this.
Okay, as you pointed out one really need to have a relative reference from virterror.h to libvirt.h, so I made that chnage too, thanks ! Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

You probably should add a case statement for this one: virterror.c: In function '__virErrorMsg': virterror.c:374: warning: enumeration value 'VIR_ERR_NO_XENSTORE' not handled in switch

On Fri, Mar 24, 2006 at 11:42:09PM +0100, Jim Meyering wrote:
You probably should add a case statement for this one:
virterror.c: In function '__virErrorMsg': virterror.c:374: warning: enumeration value 'VIR_ERR_NO_XENSTORE' not handled in switch
Right, I have a few warnings left following the code reorganization, which I use as reminders for stuff needing love :-) In that case VIR_ERR_NO_XENSTORE wasn't used yet, but I added the corresponding messages in CVS, thanks :-) Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Hi Daniel, When I tried to build using the snapshot tarball, there were compilation failures because src/build.h was missing. Here's the obvious patch, against what's in CVS: 2006-03-24 Jim Meyering <jim@meyering.net> * src/Makefile.am (libvirt_la_SOURCES): Add driver.h. Index: src/Makefile.am =================================================================== RCS file: /data/cvs/libvirt/src/Makefile.am,v retrieving revision 1.22 diff -u -p -r1.22 Makefile.am --- src/Makefile.am 24 Mar 2006 13:03:30 -0000 1.22 +++ src/Makefile.am 24 Mar 2006 22:12:50 -0000 @@ -12,6 +12,7 @@ libvirt_la_LIBADD = @LIBXML_LIBS@ libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \ -version-info @LIBVIRT_VERSION_INFO@ libvirt_la_SOURCES = \ + driver.h \ libvirt.c internal.h \ hash.c hash.h \ xml.c xml.h \

On Fri, Mar 24, 2006 at 11:15:01PM +0100, Jim Meyering wrote:
Hi Daniel,
When I tried to build using the snapshot tarball, there were compilation failures because src/build.h was missing. Here's the obvious patch, against what's in CVS:
Dohh, I didn't do 'make dist', fixed, thanks ! Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Daniel P. Berrange
-
Daniel Veillard
-
Jim Meyering