Bug 830031

Summary: Compile libvirt-0.9.8 for Windows DLL in MSYS/MinGW environment
Product: [Community] Virtualization Tools Reporter: xuanmao <xuanmao_001>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dyasny, eblake
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 03:31:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xuanmao 2012-06-08 03:21:15 UTC
I want to build libvirt-0.9.8 for Windows. Then I download a MSYS environment and setup it.

Description of problem:
I added a new API for libvirt. both added into qemu and remote driver. then compiled successfully in local Linux. and work well.

Then I moved this modified package into MSYS/MinGW environment. and compiled it with compile_libvirt-0.9.8 script. then an error occured like 
"GEN   remote/remote_protocol.h"
"List form of pipe open not implemented at ./rpc/genprotocol.pl line 29."
"make[3]: *** [remote/remote_protocol.h] Error 255"

But there is no error when I used unmodified source package.

Version-Release number of selected component (if applicable):
Libvirt-0.9.8
  
How did this? Can you help me?

Comment 1 Eric Blake 2012-06-08 03:31:31 UTC
0.9.8 is a bit old; 0.9.12 is latest.

This sounds like your particular version of perl is outdated or not fully ported to mingw.  The official mingw build of libvirt is built using a mingw cross-compiler run on a Linux box, rather than natively compiling on a Windows machine; and in that setup, perl is more functional.  Furthermore, the reason you don't see this problem on a tarball, but do see it after modifying files to add your API, is because the tarball is shipped with files pre-generated.

What API are you trying to add?  It would be better to propose this new API upstream at libvir-list, since others may also find this useful or may have better advice on how to do it; but be aware that library versioning implies that upstream will not accept your patch any sooner than the 0.9.13 release (that is, we don't backport APIs to older releases like 0.9.8 because it would cause a .so [or .dll] fork that is much harder to reconcile with our promise of being backwards compatible).

At any rate, since your problem appears to be with a faulty development environment, and not a bug in libvirt proper, I'm going to close this BZ.