When running make with OCaml 5.0 installed, I get some warnings complaining about changed lib directory layout. It suggests adding "-I +unix -I +str" to the invocation of ocamlc. So this patch does just that. It does silence the warnings for me, but someone should probably test that it works with older versions of OCaml as well. See the commit message for more details. Best regards, Tage
Tage Johansson
2023-Jul-12 07:34 UTC
[Libguestfs] [PATCH] generator: Add some arguments to ocamlc in generator/Makefile.am to silence some warnings
From: Tage Johansson <frans.tage at gmail.com> When running make with OCaml 5.0.0, the following warnings are sometimes shown: ``` OCaml's lib directory layout changed in 5.0. The unix subdirectory has been automatically added to the search path, but you should add -I +unix to the command-line to silence this alert (e.g. by adding unix to the list of libraries in your dune file, or adding use_unix to your _tags file for ocamlbuild, or using -package unix for ocamlfind). ``` This commit adds the arguments `-I +unix -I +str` to the invocation of ocamlc in generator/Makefile.am, which silences the warnings. --- generator/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/Makefile.am b/generator/Makefile.am index 91dbde5..eefd903 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -81,7 +81,7 @@ stamp-generator: generator $(states_code) generator: $(sources) $(OCAMLC) $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -I $(srcdir) -I . \ - str.cma unix.cma $(sources) -o $@ + -I +str -I +unix str.cma unix.cma $(sources) -o $@ else -- 2.41.0