Package: libxen-ocaml-dev
Version: 4.2.0-1
Severity: important
Tags: patch
Dear Maintainer,
The ocaml libraries are currently unusable as they contain the build path of .s
libraries.
For example:
root@myvm:~# cat test.ml
let _ =
let v = Xenctrl.with_intf (fun h -> Xenctrl.version h) in
()
root@myvm:~# ocamlfind ocamlopt -package xenctrl test.ml -linkpkg -o test
File "test.ml", line 2, characters 5-6:
Warning 26: unused variable v.
gcc: error:
/build/buildd-xen_4.2.0-1-i386-RcRn8G/xen-4.2.0/debian/build/build-utils_i386/tools/ocaml/libs/xc/../../../../tools/libxc/libxenctrl.so:
No such file or directory
gcc: error:
/build/buildd-xen_4.2.0-1-i386-RcRn8G/xen-4.2.0/debian/build/build-utils_i386/tools/ocaml/libs/xc/../../../../tools/libxc/libxenguest.so:
No such file or directory
File "caml_startup", line 1, characters 0-1:
Error: Error during linking
The hopefully attached patch should fix it - it's intended to replace the
existing tools-ocaml-fix-build.diff
Thanks,
Jon
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libxen-ocaml-dev depends on:
ii libxen-dev 4.2.0-1
ii libxen-ocaml 4.2.0-1
ii ocaml-nox [ocaml-nox-3.12.1] 3.12.1-4
libxen-ocaml-dev recommends no packages.
libxen-ocaml-dev suggests no packages.
-- no debconf information
diff -r 9b10adc11ae6 tools/ocaml/Makefile.rules
--- a/tools/ocaml/Makefile.rules
+++ b/tools/ocaml/Makefile.rules
@@ -58,14 +58,8 @@
# define a library target <name>.cmxa and <name>.cma
define OCAML_LIBRARY_template
- $(1).cmxa: lib$(1)_stubs.a $(foreach obj,$($(1)_OBJS),$(obj).cmx)
- $(call mk-caml-lib-native,$$@, -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $(foreach obj,$($(1)_OBJS),$(obj).cmx))
- $(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmo)
- $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $$+)
- $(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,$$@, $$+)
+$(1).cma: $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) $(foreach obj,$($(1)_C_OBJS),$(obj).o)
+ $(OCAMLMKLIB) -o $1 -oc $(1)_stubs $(foreach obj,$($(1)_OBJS),$(obj).cmx $(obj).cmo) $(foreach obj,$($(1)_C_OBJS),$(obj).o) $(foreach lib, $(LIBS_$(1)_SYSTEM), -cclib $(lib)) $(foreach arg,$(LIBS_$(1)),-ldopt $(arg))
endef
define OCAML_NOC_LIBRARY_template
diff -r 9b10adc11ae6 tools/ocaml/libs/eventchn/Makefile
--- a/tools/ocaml/libs/eventchn/Makefile
+++ b/tools/ocaml/libs/eventchn/Makefile
@@ -9,6 +9,7 @@
LIBS = xeneventchn.cma xeneventchn.cmxa
LIBS_xeneventchn = $(LDLIBS_libxenctrl)
+LIBS_xeneventchn_SYSTEM = -lxenctrl
all: $(INTF) $(LIBS) $(PROGRAMS)
diff -r 9b10adc11ae6 tools/ocaml/libs/xc/Makefile
--- a/tools/ocaml/libs/xc/Makefile
+++ b/tools/ocaml/libs/xc/Makefile
@@ -10,6 +10,7 @@
LIBS = xenctrl.cma xenctrl.cmxa
LIBS_xenctrl = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest)
+LIBS_xenctrl_SYSTEM = -lxenctrl -lxenguest
xenctrl_OBJS = $(OBJS)
xenctrl_C_OBJS = xenctrl_stubs
diff -r 9b10adc11ae6 tools/ocaml/xenstored/Makefile
--- a/tools/ocaml/xenstored/Makefile
+++ b/tools/ocaml/xenstored/Makefile
@@ -43,7 +43,9 @@
-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/eventchn $(OCAML_TOPLEVEL)/libs/eventchn/xeneventchn.cmxa \
-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xc $(OCAML_TOPLEVEL)/libs/xc/xenctrl.cmxa \
-ccopt -L -ccopt $(OCAML_TOPLEVEL)/libs/xb $(OCAML_TOPLEVEL)/libs/xb/xenbus.cmxa \
- -ccopt -L -ccopt $(XEN_ROOT)/tools/libxc
+ -ccopt -L -ccopt $(XEN_ROOT)/tools/libxc \
+ $(foreach obj, $(LDLIBS_libxenctrl), -ccopt $(obj)) \
+ $(foreach obj, $(LDLIBS_libxenguest), -ccopt $(obj))
PROGRAMS = oxenstored