Skip to contentSkip to conversation

tools: ocaml: In configure, check for ocamlopt

PATCH In review Ian Jackson 2 participants 4 messages Apr 3, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: ocaml: In configure, check for ocamlopt

If ocaml.m4 didn't find ocamlopt, disable all the ocaml builds.

Currently our Makefiles do not work properly when the native code compiler (`ocamlopt') is not available. In principle this should be fixed to fall back to bytecode, but this is not a task for this stage of the Xen 4.9 release.

Without this change, we cannot build on systems with only ocamlc. That includes Debian jessie ARM64, as used on the new ARM64 hardware in the Xen Project CI test lab.

When the Makefiles are fixed, this commit should be reverted.

Committers: Please rerun autogen.sh.

CC Julien Grall <[email protected]>
CC Christian Lindig <[email protected]>
CC Jonathan Ludlam <[email protected]>
CC David Scott <[email protected]>
CC Wei Liu <[email protected]>
---
 tools/configure    | 4 ++--
 tools/configure.ac | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
tools/configure +2 -2
index 7a57e65..6ea8684 100755
@@ -6566,11 +6566,11 @@ done
 
 if test "x$ocamltools" = "xy"; then :
 
-    if test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"; then :
+    if test "x$OCAMLOPT" = "xno" || test "x$OCAMLFIND" = "xno"; then :
 
         if test "x$enable_ocamltools" = "xyes"; then :
 
-            as_fn_error $? "Ocaml tools enabled, but unable to find Ocaml" "$LINENO" 5
+            as_fn_error $? "Ocaml tools enabled, but missing ocamlopt or ocamlfind" "$LINENO" 5
 fi
         ocamltools="n"
 
tools/configure.ac +2 -2
index 307998d..a47d0fd 100644
@@ -293,9 +293,9 @@ AC_PROG_OCAML
 AC_PROG_FINDLIB
 
 AS_IF([test "x$ocamltools" = "xy"], [
-    AS_IF([test "x$OCAMLC" = "xno" || test "x$OCAMLFIND" = "xno"], [
+    AS_IF([test "x$OCAMLOPT" = "xno" || test "x$OCAMLFIND" = "xno"], [
         AS_IF([test "x$enable_ocamltools" = "xyes"], [
-            AC_MSG_ERROR([Ocaml tools enabled, but unable to find Ocaml])])
+            AC_MSG_ERROR([Ocaml tools enabled, but missing ocamlopt or ocamlfind])])
         ocamltools="n"
     ], [
         AX_COMPARE_VERSION([$OCAMLVERSION], [lt], [3.09.3], [
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Ian Jackson

If ocaml.m4 didn't find ocamlopt, disable all the ocaml builds.

Currently our Makefiles do not work properly when the native code compiler (`ocamlopt') is not available. In principle this should be fixed to fall back to bytecode, but this is not a task for this stage of the Xen 4.9 release.

Without this change, we cannot build on systems with only ocamlc. That includes Debian jessie ARM64, as used on the new ARM64 hardware in the Xen Project CI test lab.

When the Makefiles are fixed, this commit should be reverted.

Committers: Please rerun autogen.sh.

Quoted 7 lines
CC Julien Grall <[email protected]>
CC Christian Lindig <[email protected]>
CC Jonathan Ludlam <[email protected]>
CC David Scott <[email protected]>
CC Wei Liu <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Wei Liu writes ("Re: [PATCH] tools: ocaml: In configure, check for ocamlopt"):

Quoted 10 lines · Ian Jackson
Quoted 7 lines
CC Julien Grall <[email protected]>
CC Christian Lindig <[email protected]>
CC Jonathan Ludlam <[email protected]>
CC David Scott <[email protected]>
CC Wei Liu <[email protected]>

Christian spoke to me in person, and discussed some of the things he'd seen in this patch. I was able answer his questions to his satisfaction, so I am going commit this with his reviewed-by.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw

Ian Jackson writes ("Re: [PATCH] tools: ocaml: In configure, check for ocamlopt"):

Quoted 10 lines

Wei Liu writes ("Re: [PATCH] tools: ocaml: In configure, check for ocamlopt"):

Quoted 9 lines · Ian Jackson
Quoted 7 lines
CC Julien Grall <[email protected]>
CC Christian Lindig <[email protected]>
CC Jonathan Ludlam <[email protected]>
CC David Scott <[email protected]>
CC Wei Liu <[email protected]>
Quoted 5 lines
Quoted 1 line

Christian spoke to me in person, and discussed some of the things he'd seen in this patch. I was able answer his questions to his satisfaction, so I am going commit this with his reviewed-by.

Oh, I see Wei committed it already. I'm too slow again :-)

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel