hi all: I am trying to use libguestfs to manage my vm disk , I want to use guestfs-lib the C library on ubuntu 12.04. so I download libguestfs-1.28.1 and try to install it . what I did is : ./autogen.sh ./configure make this time some errors occurs : File "output_libvirt.ml", line 53, characters 4-13: Error: Unbound value List.mapi make[2]: *** [output_libvirt.cmx] Error 2 make[2]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1/v2v' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1' make: *** [all] ?? 2 I still can't fix it after searching so please help me ! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150504/0c4f68ac/attachment.htm>
Hi, On Monday 04 May 2015 15:29:50 fu lirong wrote:> I am trying to use libguestfs to manage my vm disk , I want to use > guestfs-lib the C library on ubuntu 12.04. so I download > libguestfs-1.28.1 and try to install it . > what I did is : ./autogen.sh > ./configure > make > this time some errors occurs : > > File "output_libvirt.ml", line 53, characters 4-13: > Error: Unbound value List.mapi > make[2]: *** [output_libvirt.cmx] Error 2 > make[2]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1/v2v' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1' > make: *** [all] ?? 2 > > I still can't fix it after searching so please help me !The problem is the usage of some OCaml API available since OCaml 4.00, thus not available in OCaml 3.12 which is in the Ubuntu version you are using. This has been fixed upstream, with the commit https://github.com/libguestfs/libguestfs/commit/0c717d86a9ae66162eebe315d1c56c82a01b9096 in the stable-1.28 branch. You have two option: a) compile libguestfs 1.28.5 (which includes the above patch) or greater b) apply yourself the patch to your 1.28.1 sources Unless you really need libguestfs 1.28.1 and not any later version, I recommend the solution (a); currently libguestfs 1.28.9 is the latest stable version. Thanks, -- Pino Toscano
On Mon, May 04, 2015 at 03:29:50PM +0800, fu lirong wrote:> hi all: > I am trying to use libguestfs to manage my vm disk , I want to use > guestfs-lib the C library on ubuntu 12.04. so I download > libguestfs-1.28.1 and try to install it .Ubuntu 12.04 is a bit old to run recent versions of libguestfs. Is it possible to use 14.04 or ideally 15.04 instead? I'm afraid with 12.04 you'll end up having a lot more problems than just the one below.> what I did is : ./autogen.sh > ./configure > make > this time some errors occurs : > > File "output_libvirt.ml", line 53, characters 4-13: > Error: Unbound value List.mapi > make[2]: *** [output_libvirt.cmx] Error 2 > make[2]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1/v2v' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/usr/Libvmi/libguestfs-1.28.1' > make: *** [all] ?? 2 > > I still can't fix it after searching so please help me !This bug was fixed by the following commit: commit 47d909808aa8cd285f46cab5ea08c7971f8f2f85 Author: Richard W.M. Jones <rjones at redhat.com> Date: Thu Dec 18 08:30:18 2014 +0000 v2v: -o libvirt: Replace List.mapi with mapi. Don't depend on OCaml >= 4.00. https://bugs.gentoo.org/show_bug.cgi?id=532698 Thanks: Fabian Ohler which was included in the 1.28 stable branch in >= 1.28.5. However even if you use a later version of libguestfs, I'm afraid you're still going to have a lot of problems with the old version of Ubuntu. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org