Bug 643118 - libvirt rpm fails to build if libxenserver 5.6.0 is installed
Summary: libvirt rpm fails to build if libxenserver 5.6.0 is installed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libvirt
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 652002
TreeView+ depends on / blocked
 
Reported: 2010-10-14 17:29 UTC by Eric Blake
Modified: 2011-01-13 23:17 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.2-8.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 652002 (view as bug list)
Environment:
Last Closed: 2011-01-13 23:17:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0060 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-01-12 17:22:30 UTC

Description Eric Blake 2010-10-14 17:29:54 UTC
Description of problem:
RHEL does not provide libxenserver, but if a user manually installs it as an add-on package from http://community.citrix.com/display/xs/Download+SDKs per the directions in https://www.redhat.com/archives/libvir-list/2010-August/msg00560.html, then they cannot rebuild the libvirt rpm.

Version-Release number of selected component (if applicable):
libvirt-0.8.2-7.el5
libxenserver 5.6.0


How reproducible:
100%

Steps to Reproduce:
1. install libxenserver 5.6.0
2. $ rpmbuild --rebuild ./libvirt-0.8.2-7.el5.src.rpm 
3.
  
Actual results:
...
show-option   -DIN_LIBVIRT      -I../src/conf -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -c -o libvirt_driver_xenapi_la-xenapi_utils.lo `test -f 'xenapi/xenapi_utils.c' || echo './'`xenapi/xenapi_utils.c
xenapi/xenapi_driver.c: In function 'xenapiDomainGetInfo':
xenapi/xenapi_driver.c:968: error: 'XEN_VM_POWER_STATE_UNKNOWN' undeclared (first use in this function)
xenapi/xenapi_driver.c:968: error: (Each undeclared identifier is reported only once
xenapi/xenapi_driver.c:968: error: for each function it appears in.)
make[3]: *** [libvirt_driver_xenapi_la-xenapi_driver.lo] Error 1


Expected results:
Clean compilation.  Since RHEL doesn't ship libxenserver, it should not be compiling the xenapi driver.


Additional info:
An upstream patch is available to fix the compilation warning:
https://www.redhat.com/archives/libvir-list/2010-August/msg00563.html
but the real bug is that the rpm spec file is not specifying --without-xenapi.

Comment 1 Eric Blake 2010-10-14 17:33:38 UTC
I'm working on a patch to fix the spec file.

Comment 7 weizhang 2010-10-29 12:38:51 UTC
test on rhel5.6 server x86_64 kvm

steps:
1.  in libxenserver dir, do make && make install INSTALL_PROG='$(INSTALL)' LIBDIR=lib64 LIBXENAPI_HDRS='include/xen/api/*.h'
2. rpmbuild --rebuild --define "rhel 5" libvirt-0.2.8.2-8.el5.src.rpm

no error info.

But on ia64 and i386 rhel5.6 I can not rebuild successfully. Is that ok?

Comment 8 weizhang 2010-10-29 12:42:19 UTC
(In reply to comment #7)
> test on rhel5.6 server x86_64 kvm
> 
> steps:
> 1.  in libxenserver dir, do make && make install INSTALL_PROG='$(INSTALL)'
> LIBDIR=lib64 LIBXENAPI_HDRS='include/xen/api/*.h'
> 2. rpmbuild --rebuild --define "rhel 5" libvirt-0.2.8.2-8.el5.src.rpm
> 
> no error info.
> 
> But on ia64 and i386 rhel5.6 I can not rebuild successfully. Is that ok?

on x86_64 I only loss device-mapper-devel package, but on i386 and ia64 I loss device-mapper-devel, libssh2-devel and qemu-img packages. May be that is the reason why I can not successful build.

Comment 9 Eric Blake 2010-10-29 14:34:40 UTC
(In reply to comment #7)
> test on rhel5.6 server x86_64 kvm
> 
> steps:
> 1.  in libxenserver dir, do make && make install INSTALL_PROG='$(INSTALL)'
> LIBDIR=lib64 LIBXENAPI_HDRS='include/xen/api/*.h'

On i686, LIBDIR should be lib, not lib64.  I'm not sure about ia64's conventions.

> 2. rpmbuild --rebuild --define "rhel 5" libvirt-0.2.8.2-8.el5.src.rpm
> 
> no error info.
> 
> But on ia64 and i386 rhel5.6 I can not rebuild successfully. Is that ok?

What build failures are you getting?  At any rate, the libxenserver fix should be arch-agnostic, so proving that it worked for x86_64 might be enough to consider this as verified.

Comment 11 errata-xmlrpc 2011-01-13 23:17:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html


Note You need to log in before you can comment on or make changes to this bug.