I've been working on building Matahari for Windows using the mingw32 cross-compiler. Here is the a detailed description of the current status.
First, I've skipped trying to build the libcheck dependency under mingw32. This is not critical for a functional matahari agent, so for now we'll ignore it.
The first major hurdle is getting libvirt built under mingw32. This requires the mingw32-portablexdr package, which is now built and pending review. You can find the srpm and spec file here:
http://people.redhat.com/~rohara/mingw32/portablexdr/mingw32-portablexdr-4.9... http://people.redhat.com/~rohara/mingw32/portablexdr/mingw32-portablexdr.spe...
One potential pitfall to be aware of is that you may need to manually run the mingw32 ranlib against the results dll:
% i686-pc-mingw32-ranlib /usr/i686-pc-mingw32/sys-root/mingw/lib/libportablexdr.dll.a
There is a bug related to this problem which can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=595006
With this installed, we can now attempt to build libvirt for mingw32. Daniel Berrange has posted the srpm and spec file here:
http://berrange.fedorapeople.org/review/mingw32-libvirt/mingw32-libvirt-0.8.... http://berrange.fedorapeople.org/review/mingw32-libvirt/mingw32-libvirt.spec
Daniel was able to build the mingw32-libvirt rpm on F12. I was unable to build the same package (from the same srpm) on F13, so I reverted to F12 to verify that the build would indeed work. It did not. I am seeing the same problems on F12 as I saw on F13. Specifically:
+ /usr/lib/rpm/brp-strip-static-archive strip:/root/rpmbuild/BUILDROOT/mingw32-libvirt-0.8.2-3.fc13.x86_64/usr/i686-pc-mingw32/sys-root/mingw/lib/libvirt.dll.a(d000892.o): Unable to recognise the format of file: File format not recognized strip:/root/rpmbuild/BUILDROOT/mingw32-libvirt-0.8.2-3.fc13.x86_64/usr/i686-pc-mingw32/sys-root/mingw/lib/libvirt.dll.a(d000009.o): Unable to recognise the format of file: File format not recognized ...
I see several of these messages until the rpm build ultimately fails with:
Processing files: mingw32-libvirt-debuginfo-0.8.2-3.fc12.noarch error: Could not open %files file /root/rpmbuild/BUILD/libvirt-0.8.2/debugfiles.list: No such file or directory
RPM build errors: Could not open %files file /root/rpmbuild/BUILD/libvirt-0.8.2/debugfiles.list: No such file or directory
Ryan
On Mon, Jul 19, 2010 at 07:23:10PM -0500, Ryan O'Hara wrote:
Daniel was able to build the mingw32-libvirt rpm on F12. I was unable to build the same package (from the same srpm) on F13, so I reverted to F12 to verify that the build would indeed work. It did not. I am seeing the same problems on F12 as I saw on F13. Specifically:
- /usr/lib/rpm/brp-strip-static-archive
strip:/root/rpmbuild/BUILDROOT/mingw32-libvirt-0.8.2-3.fc13.x86_64/usr/i686-pc-mingw32/sys-root/mingw/lib/libvirt.dll.a(d000892.o): Unable to recognise the format of file: File format not recognized strip:/root/rpmbuild/BUILDROOT/mingw32-libvirt-0.8.2-3.fc13.x86_64/usr/i686-pc-mingw32/sys-root/mingw/lib/libvirt.dll.a(d000009.o): Unable to recognise the format of file: File format not recognized ...
I discovered this BZ while working on the mingw32 cross-compile this evening:
https://bugzilla.redhat.com/show_bug.cgi?id=587818
After I installed redhat-rpm-config, the build worked. I'll reinstall F13 and try again.
Ryan
matahari@lists.fedorahosted.org