[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] guestfs-browser fails to compile



On Sun, Jul 31, 2011 at 12:39:48AM +0200, Hilko Bengen wrote:
> I just tried compiling guestfs-browser on a i386 Debian/unstable machine
> (with recent versions of libcamomile-ocaml-data and
> libcamomile-ocaml-dev installed from experimental). The "configure"
> stage went ok. I have included the output of running "make" at the end
> of the mail.
> 
> Can someone tell me what is going wrong here?

I compiled and ran guestfs-browser fine on Debian 6 (not unstable).

Firstly I changed the libguestfs debian package so that it now builds
libguestfs-ocaml and libguestfs-ocaml-dev packages:

http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=1d134301fc4d05338d09517abc978d0a90d82e09

>From this I was able to build and install the OCaml bindings as debs.

Secondly I cloned guestfs-browser from git and installed all the OCaml
dependencies:

camlp4
camlp4-extra
dh-ocaml
libbitstring-ocaml-dev
libcalendar-ocaml-dev
libcamomile-ocaml-dev
libcamomile-ocaml-data
libextlib-ocaml-dev
libfindlib-ocaml-dev
libguestfs-ocaml-dev    # from above
libhivex-ocaml-dev
liblablgtk2-ocaml-dev
libpcre-ocaml-dev
libvirt-ocaml-dev
libxml-light-ocaml-dev
ocaml                   # 3.11.2
ocaml-best-compilers

I had to apply the two patches attached to guestfs-browser.  The 0001
patch is really a bug in the *Fedora* ocaml-lablgtk package.  The META
file needs to be updated to match the one in Debian, and then the 0001
patch can be applied to guestfs-browser upstream.

The 0002 patch is required because Camomile in Debian 6 is very old
(0.7.2, versus 0.8.something upstream).  I don't intend to apply this
upstream -- Debian should update the package.

I was able to compile and run guestfs-browser in the usual way.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
>From c6ae1f41e611afcc4f59640bd67abde9dbb84e1b Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Sun, 31 Jul 2011 21:53:44 +0100
Subject: [PATCH 1/2] Fix lablgtk build options for Debian.

---
 Makefile.am |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index fb632b7..1583ffc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -144,14 +144,14 @@ OCAMLDOCFLAGS = \
 if HAVE_OCAMLOPT
 guestfs-browser: $(XOBJECTS)
 	$(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
-	  -predicates init,threads \
-	  -linkpkg gtkThread.cmx \
+	  -predicates init,threads -package lablgtk2.init \
+	  -linkpkg \
 	  $^ -o $@
 else
 guestfs-browser: $(OBJECTS)
 	$(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
-	  -predicates init,threads \
-	  -linkpkg gtkThread.cmo \
+	  -predicates init,threads -package lablgtk2.init \
+	  -linkpkg \
 	  $^ -o $@
 endif
 
-- 
1.7.2.5

>From 018f753da075658328e6c64be555eadaf54c523c Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones redhat com>
Date: Sun, 31 Jul 2011 21:54:16 +0100
Subject: [PATCH 2/2] debian: Camomile < 0.8

---
 filetree.ml |    2 +-
 slave.ml    |    2 +-
 utils.ml    |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/filetree.ml b/filetree.ml
index f6ffa7b..529129e 100644
--- a/filetree.ml
+++ b/filetree.ml
@@ -28,7 +28,7 @@ open Slave_types
 open Filetree_markup
 
 module G = Guestfs
-module UTF8 = CamomileLibraryDefault.Camomile.UTF8
+module UTF8 = CamomileLibrary.Default.Camomile.UTF8
 
 (* Temporary directory for shared use by any function in this file.
  * It is cleaned up when the program exits.
diff --git a/slave.ml b/slave.ml
index 360a11c..08024c2 100644
--- a/slave.ml
+++ b/slave.ml
@@ -32,7 +32,7 @@ module D = Libvirt.Domain
 module G = Guestfs
 module M = Mutex
 module Q = Queue
-module UTF8 = CamomileLibraryDefault.Camomile.UTF8
+module UTF8 = CamomileLibrary.Default.Camomile.UTF8
 
 
 type 'a callback = 'a -> unit
diff --git a/utils.ml b/utils.ml
index 57faf38..7bfb50c 100644
--- a/utils.ml
+++ b/utils.ml
@@ -225,9 +225,9 @@ let tmpdir () =
        ignore (Sys.command cmd));
   tmpdir
 
-module CE = CamomileLibraryDefault.Camomile.CharEncoding
-module UTF8 = CamomileLibraryDefault.Camomile.UTF8
-module UChar = CamomileLibraryDefault.Camomile.UChar
+module CE = CamomileLibrary.Default.Camomile.CharEncoding
+module UTF8 = CamomileLibrary.Default.Camomile.UTF8
+module UChar = CamomileLibrary.Default.Camomile.UChar
 let utf16le = CE.utf16le
 let utf8 = CE.utf8
 let recode = CE.recode_string ~in_enc:utf16le ~out_enc:utf8
-- 
1.7.2.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]