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
From: Tage Johansson <frans.tage@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
On Wed, Jul 12, 2023 at 07:34:56AM +0000, Tage Johansson wrote:
From: Tage Johansson <frans.tage@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(-)
Looks like Rich beat you to the same fix in commit 20dceca48623; you may want to rebase your local checkout to the latest upstream. Also, a suggestion: note that this mailing list serves several related projects, so a bare '[PATCH]' prefix (git's default) does not show which project you are patching. Locally, I have run: git config format.subjectprefix 'libnbd PATCH' in my libnbd.git checkout (with similar counterparts for nbdkit, libguestfs, ...), so that when I post patches, it is obvious which project I'm patching. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
participants (2)
-
Eric Blake -
Tage Johansson