configure: Make it clear that missing ocamldoc is fatal
PATCH 1/1 configure: Make it clear that missing ocamldoc is fatal
Hi all, hi Julia,
As I was trying to build coccinelle from the sources today, configure failed on me with the following error message:
configure: error: You must install the OCaml compiler
I did not understand at first because I do have the ocaml package installed, and /usr/bin/ocamlc, which I assume is the OCaml compiler, is present. After debugging, I found that what's really missing is ocamldoc. Indeed configure warned me about it:
checking for ocamldoc... no
but that did not look fatal so I did not pay attention. As ocamldoc is in a separate package (on openSUSE at least), I believe the fatal error message should explicitly say whether the compiler itself is missing, or ocamldoc is missing.
---
Suggested fix below, there may be other ways.
configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
configure.ac +5 -1
@@ -85,10 +85,14 @@ AC_CHECK_OCAMLVERSION([OCAMLATLEAST310], AC_CHECK_OCAMLVERSION([OCAMLATLEAST311],[3.11]) AC_SUBST([OCAMLCORIG],["$OCAMLC"]) -AS_IF([test "x$OCAMLC" = xno -o "x$OCAMLDEP" = xno -o "x$OCAMLDOC" = xno -o "x$OCAMLMKLIB" = xno], +AS_IF([test "x$OCAMLC" = xno -o "x$OCAMLDEP" = xno -o "x$OCAMLMKLIB" = xno], [dnl AC_MSG_ERROR([You must install the OCaml compiler]) ]) +AS_IF([test "x$OCAMLDOC" = xno], +[dnl + AC_MSG_ERROR([You must install the OCaml documentation generator (ocamldoc)]) +]) AS_IF([test "x$OCAMLATLEAST310" = xno],[AC_MSG_NOTICE([a more recent OCaml installation may be required])]) dnl ocaml tools
Signature · 2 lines
Jean Delvare SUSE L3 Support
PATCH 1/1 configure: Make it clear that missing ocamldoc is fatal
Quoted 12 lines · Jean Delvare
Hi all, hi Julia,
As I was trying to build coccinelle from the sources today, configure failed on me with the following error message:
configure: error: You must install the OCaml compiler
I did not understand at first because I do have the ocaml package installed, and
/usr/bin/ocamlc, which I assume is the OCaml compiler, is present. After debugging, I found that what's really missing is ocamldoc. Indeed configure warned me about it:
Quoted 6 lines
checking for ocamldoc... no
but that did not look fatal so I did not pay attention. As ocamldoc is in a separate package (on openSUSE at least), I believe the fatal error message should explicitly say whether the compiler itself is missing, or ocamldoc is missing.
Thanks very much for the feedback and for the patch. I will take care of it.
julia
Quoted 30 lines
---
Suggested fix below, there may be other ways.configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)configure.ac +5
-2@@ -85,10 +85,14 @@ AC_CHECK_OCAMLVERSION([OCAMLATLEAST310], AC_CHECK_OCAMLVERSION([OCAMLATLEAST311],[3.11]) AC_SUBST([OCAMLCORIG],["$OCAMLC"]) -AS_IF([test "x$OCAMLC" = xno -o "x$OCAMLDEP" = xno -o "x$OCAMLDOC" = xno -o "x$OCAMLMKLIB" = xno], +AS_IF([test "x$OCAMLC" = xno -o "x$OCAMLDEP" = xno -o "x$OCAMLMKLIB" = xno], [dnl AC_MSG_ERROR([You must install the OCaml compiler]) ]) +AS_IF([test "x$OCAMLDOC" = xno], +[dnl + AC_MSG_ERROR([You must install the OCaml documentation generator (ocamldoc)]) +]) AS_IF([test "x$OCAMLATLEAST310" = xno],[AC_MSG_NOTICE([a more recent OCaml installation may be required])]) dnl ocaml tools --Jean Delvare
SUSE L3 Support