
On Thu, Jan 08, 2015 at 04:43:36PM -0700, Jim Fehlig wrote:
Eric Blake wrote:
On 01/08/2015 06:20 AM, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- src/Makefile.am | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-)
if WITH_XENCONFIG +AM_LFLAGS = -Pxl_disk_ --header-file=../$*.h
Uggh. Not your fault (this patch was just code motion), but it highlights a portability problem: RHEL 5 ships with flex 2.5.4, which lacks --header-file, and which spells --outfile only as -o. The build is failing with:
flex -Pxl_disk_ --header-file=/home/dummy/libvirt/src/xenconfig/xen_xl_disk.h --outfile=/home/dummy/libvirt/src/xenconfig/xen_xl_disk.c xenconfig/xen_xl_disk.l flex: unknown flag '-'. For usage, try flex --help
Sigh... Sorry for all the grief this has caused. I wasted a huge amount of time trying to get all of this working right, including some of the approaches in the follow-up patches, but always hit some sort of problem. I thought I finally had everything worked out with the V3 patches that Michal ACKed. But given all the problems I encountered along the way, I suppose I shouldn't be surprised by the problems folks are seeing. So now I'm causing others to waste time :-(. Again, I'm sorry for that.
And of course this has rippled to the Xen push gate tests too. I responded to one such test failure today on xen-devel, to which Ian Campbell replied that the parsing code in Xen was placed in libxlutil to avoid libxl apps needing to create their own parsing code
http://lists.xen.org/archives/html/xen-devel/2015-01/msg00657.html
My immediate thought was cool, I can use that and remove all the flex nonsense before the next libvirt release. But alas, the related header file (libxlutil.h) has never been installed and thus not included in any distro's xen-devel package
http://lists.xen.org/archives/html/xen-devel/2015-01/msg00690.html
I suppose it is possible to include some minimal header in libvirt (or an extern declaration?) for the xlu_disk_parse() function, and actually link against the libxlutil.so which is installed. I can work on such an approach if folks think it is worthwhile.
To repeat what I said on IRC. I don't have a strong opinion one way or the other. Whatever the libvirt xen maintainers think is the best approach is fine by me . So it sounds like using libxlutil is probably a winner right now, with a little #ifdef to cope with the missing header file on old versions. Regards, 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 :|