[Libguestfs] [PATCH] generator: Add some arguments to ocamlc in generator/Makefile.am to silence some warnings

Tage Johansson tage.j.lists at posteo.net
Wed Jul 12 07:34:56 UTC 2023


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



More information about the Libguestfs mailing list