Package: ocaml Version: 3.12.1-4 Severity: Important The configure script doesn't get the build triplet as an argument so it uses internally uname -m to get the arch, thus on a 32-bit chroot on a 64-bit system it reports x86_64. This leads to BNG_ARCH_amd64 being defined and the build fails when doing 64-bit asm compilations.
The attached simple patch fixes the problem. Regards Konstantinos
diff -ruN ocaml-3.12.1/debian/rules ocaml-3.12.1.mine/debian/rules --- ocaml-3.12.1/debian/rules 2012-06-26 19:35:06.000000000 +0000 +++ ocaml-3.12.1.mine/debian/rules 2012-10-03 08:27:04.244671403 +0000 @@ -14,6 +14,7 @@ OCAML_NATIVE_ARCHS := $(shell cat debian/native-archs) OCAML_NATDYNLINK_ARCHS := $(shell cat debian/natdynlink-archs) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) OCAML_OPT_ARCH := $(findstring $(DEB_BUILD_ARCH),$(OCAML_NATIVE_ARCHS)) OCAML_HAVE_OCAMLOPT := $(if $(OCAML_OPT_ARCH),yes,no) OCAML_OCAMLDOC_DESTDIR_HTML = @@ -54,6 +55,7 @@ export OCAML_STDLIB_DIR CONFIGURE_OPTS := \ + --host $(DEB_BUILD_GNU_TYPE) \ --with-pthread -prefix /usr \ -libdir $(OCAML_STDLIB_DIR) \ -x11lib "$(shell pkg-config --variable=libdir x11)" \

