From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Bernardoff Subject: Re: ocaml bindings Date: Fri, 05 Apr 2013 19:19:54 +0100 Message-ID: <515F15CA.3040400@luminar.eu.org> References: <3258352.oW0QVvLMy7@localhost> <515C91FC.1090804@citrix.com> <515D9201.5060304@eu.citrix.com> <3577098.YjGz5guQxr@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000202040400040502010705" Return-path: In-Reply-To: <3577098.YjGz5guQxr@localhost> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------000202040400040502010705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi there. Please try applying this patch (and only this patch) on top of Xen (4.2 or unstable). It should fix all the OCaml issues. Please give me feedback if possible. Thanks! Vincent --------------000202040400040502010705 Content-Type: text/x-patch; name="fix-ocaml-libs.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-ocaml-libs.patch" diff --git a/tools/Rules.mk b/tools/Rules.mk index 8d55e03..91a5d02 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -20,15 +20,15 @@ XEN_LIBVCHAN = $(XEN_ROOT)/tools/libvchan CFLAGS_xeninclude = -I$(XEN_INCLUDE) CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude) -LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl.so +LDLIBS_libxenctrl = -L$(XEN_LIBXC) -lxenctrl SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC) CFLAGS_libxenguest = -I$(XEN_LIBXC) $(CFLAGS_xeninclude) -LDLIBS_libxenguest = $(XEN_LIBXC)/libxenguest.so +LDLIBS_libxenguest = -L$(XEN_LIBXC) -lxenguest SHLIB_libxenguest = -Wl,-rpath-link=L$(XEN_LIBXC) CFLAGS_libxenstore = -I$(XEN_XENSTORE) $(CFLAGS_xeninclude) -LDLIBS_libxenstore = $(XEN_XENSTORE)/libxenstore.so +LDLIBS_libxenstore = -L$(XEN_XENSTORE) -lxenstore SHLIB_libxenstore = -Wl,-rpath-link=$(XEN_XENSTORE) CFLAGS_libxenstat = -I$(XEN_LIBXENSTAT) @@ -56,7 +56,7 @@ SHLIB_libblktapctl = endif CFLAGS_libxenlight = -I$(XEN_XENLIGHT) $(CFLAGS_libxenctrl) $(CFLAGS_xeninclude) -LDLIBS_libxenlight = $(XEN_XENLIGHT)/libxenlight.so $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl) +LDLIBS_libxenlight = -L$(XEN_XENLIGHT) -lxenlight $(SHLIB_libxenctrl) $(SHLIB_libxenstore) $(SHLIB_libblktapctl) SHLIB_libxenlight = -Wl,-rpath-link=$(XEN_XENLIGHT) CFLAGS += -D__XEN_TOOLS__ diff --git a/tools/ocaml/Makefile.rules b/tools/ocaml/Makefile.rules index ff19067..28b81a9 100644 --- a/tools/ocaml/Makefile.rules +++ b/tools/ocaml/Makefile.rules @@ -45,7 +45,7 @@ ALL_OCAML_OBJ_SOURCES=$(addsuffix .ml, $(ALL_OCAML_OBJS)) $(call quiet-command, $(OCAMLDEP) $(ALL_OCAML_OBJ_SOURCES) *.mli $o,MLDEP,) clean: $(CLEAN_HOOKS) - $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make + $(Q)rm -f .*.d *.o *.so *.a *.cmo *.cmi *.cma *.cmx *.cmxa *.annot *.spot *.spit $(LIBS) $(PROGRAMS) $(GENERATED_FILES) .ocamldep.make META quiet-command = $(if $(V),$1,@printf " %-8s %s\n" "$2" "$3" && $1) @@ -54,7 +54,7 @@ mk-caml-lib-bytecode = $(call quiet-command, $(OCAMLC) $(OCAMLCFLAGS) -a -o $1 $ mk-caml-stubs = $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a` $2,MKLIB,$1) mk-caml-lib-stubs = \ - $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1) + $(call quiet-command, $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2 $3,MKLIB,$1) # define a library target .cmxa and .cma define OCAML_LIBRARY_template @@ -65,7 +65,7 @@ define OCAML_LIBRARY_template $(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o) $(call mk-caml-stubs,$$@, $$+) lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o) - $(call mk-caml-lib-stubs,$$@, $$+) + $(call mk-caml-lib-stubs,$$@, $$+, $(foreach lib,$(LIBS_$(1)),$(lib))) endef define OCAML_NOC_LIBRARY_template diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index d5478f6..c9356f3 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -15,7 +15,7 @@ OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F -VERSION := 4.1 +VERSION := 4.3 OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir) diff --git a/tools/ocaml/libs/xl/META.in b/tools/ocaml/libs/xl/META.in index 9c4405a..fe2c60b 100644 --- a/tools/ocaml/libs/xl/META.in +++ b/tools/ocaml/libs/xl/META.in @@ -1,4 +1,4 @@ version = "@VERSION@" description = "Xen Toolstack Library" -archive(byte) = "xl.cma" -archive(native) = "xl.cmxa" +archive(byte) = "xenlight.cma" +archive(native) = "xenlight.cmxa" --------------000202040400040502010705 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------000202040400040502010705--