[Libguestfs] [PATCH] Fix building on architectures where ocamlopt is not available
Richard W.M. Jones
rjones at redhat.com
Sun Mar 23 18:31:40 UTC 2014
On Sun, Mar 23, 2014 at 07:22:57PM +0100, Hilko Bengen wrote:
> * Richard W.M. Jones:
>
> > (1) Removing .NOTPARALLEL. This fails, as expected.
> >
> > (2) mlguestfs.cmxa: mlguestfs.cma -- fails
> >
> > (3) mlguestfs.cmxa: | mlguestfs.cma -- fails after a longer time
>
> I find it strange that (2) and (3) fail.
No I don't either. Just to make sure, I reran test (3) again. See
attached patch. The failure is:
ocamlmklib -o mlguestfs \
libguestfsocaml_a-guestfs-c.o libguestfsocaml_a-guestfs-c-actions.o libguestfsocaml_a-utils.o guestfs.cmx \
-L../src/.libs -lguestfs
File "_none_", line 1:
Error: Error on dynamically loaded library: ./dllmlguestfs.so: ./dllmlguestfs.so: file too short
make: *** [t/guestfs_420_log_messages.bc] Error 2
make: *** Waiting for unfinished jobs....
Warning: Element Unix.error not found
make: Leaving directory `/home/rjones/d/libguestfs/ocaml'
It does run for quite a few iterations before it hits this failure, so
obviously the failure window is narrow.
> > (4) The attached patch which is derived from dce94f -- this ran
> > without failing for 120 iterations (and still going).
>
> The patch looks good to me.
Thanks, I think I'll push my version unless anyone can see what's
wrong with the simpler version.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
-------------- next part --------------
>From 5646da82e942f20bb4fd26a8cb9608b4e1dee165 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Sun, 23 Mar 2014 18:25:46 +0000
Subject: [PATCH] NOT WORKING PATCH: ocaml: Enable parallel builds.
---
ocaml/Makefile.am | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am
index 7c8e515..8d7ce95 100644
--- a/ocaml/Makefile.am
+++ b/ocaml/Makefile.am
@@ -54,6 +54,8 @@ noinst_LIBRARIES = libguestfsocaml.a
# 'libmlguestfs.a' and if run at the same time, they will stomp on or
# corrupt each others copy. Hence we have to serialize the calls.
+mlguestfs.cmxa: | mlguestfs.cma
+
mlguestfs.cma: libguestfsocaml.a guestfs.cmo
$(OCAMLMKLIB) -o mlguestfs \
$(libguestfsocaml_a_OBJECTS) guestfs.cmo \
@@ -189,7 +191,3 @@ install-data-hook:
CLEANFILES += $(noinst_DATA)
endif
-
-# Tell version 3.79 and up of GNU make to not build goals in this
-# directory in parallel.
-.NOTPARALLEL:
--
1.8.5.3
More information about the Libguestfs
mailing list