[Pkg-xen-devel] [PATCH 08/12] debian/rules: Disable OCAML build when cross-building
Ian Jackson
ijackson at chiark.greenend.org.uk
Thu Sep 17 17:13:10 BST 2020
Elliott Mitchell writes ("[PATCH 08/12] debian/rules: Disable OCAML build when cross-building"):
> At this time cross-building for OCAML is broken. Hopefully it may work
> in future, but at this time it does not.
Just to clarify this: the build-dependencies are satisfiable, so the
ocaml tools are installable, but they do not work ?
> diff --git a/debian/rules b/debian/rules
> index cd30fb54f2..67fd74e89f 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -202,11 +202,15 @@ override_dh_auto_configure:
> # separately.
> override_dh_auto_build:
> $(MAKE) $(make_args_xen) xen
> - $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n
> + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n OCAML_TOOLS=n
> case $(flavour) in \
> amd64|i386) \
> $(MAKE) $(make_args_xen) -C tools/firmware/xen-dir ;; \
> esac
> + @# OCAML cross-compilation is currently non-functional
> + if [ "$(DEB_BUILD_ARCH)" = "$(DEB_HOST_ARCH)" ]; then \
> + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n ; \
> + fi
> touch debian/xen-tools-built.stamp
Can you refer us to a bug report about the ocaml problem ? I think a
reference to that bug ought to go here in a comment.
> + install-{tools,docs} CONFIG_PV_SHIM=n OCAML_TOOLS=n
...
> + @# OCAML doesn't work when cross-building
> + if [ "$(DEB_BUILD_ARCH)" = "$(DEB_HOST_ARCH)" ]; then \
You have this logic twice.
How about defining BUILD_OCAML_TOOLS as a make variable ?
> - $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n
> + $(MAKE) $(make_args_tools) tools docs CONFIG_PV_SHIM=n OCAML_TOOLS=$(BUILD_OCAML_TOOLS)
Or something. I don't care much about the variable name, but I do
care that the logic is in one place.
> + $(MAKE) $(make_args_tools) DESTDIR=$t \
> + install-{tools,docs} CONFIG_PV_SHIM=n ; \
> + else \
> + touch $t/etc/xen/oxenstored.conf ; \
> + cp -l $t/usr/sbin/xl $t/usr/sbin/oxenstored ; \
> + fi
I don't understand this last part at all. You're making oxenstored a
link to xl ?
Why is simply passing OCAML_TOOLS=n to the upstream build,
conditionally, not the right thing to do ? ISTM that that would be a
lot simpler.
Ian.
--
Ian Jackson <ijackson at chiark.greenend.org.uk> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.
More information about the Pkg-xen-devel
mailing list