Skip to contentSkip to conversation

tools/ocaml: silence ocaml_deprecated_auto_include alert

PATCH Andrii Sultanov 1 participant 1 message Jun 9 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andrii Sultanov

author Reviewed-by Tested-by
#1 lore raw
Quoted 18 lines · Guillaume Thouvenin

Ocaml's lib directory layout changed in 5.0: the unix and dynlink libraries have been moved out of the standard library directory into subdirectories. The compiler still locates them automatically but emits an ocaml_deprecated_auto_include alert when doing so.

This patch sets the paths explicitly with -I +unix and -I +dynlink to silence the alert.

---
  tools/ocaml/common.make | 1 +
  1 file changed, 1 insertion(+)
tools/ocaml/common.make +0 -0
index c7eefceeb4..0e6714e25a 100644

tools/ocaml/common.make OCAMLFIND ?= ocamlfind · line 17

Quoted 7 lines
tools/ocaml/common.make +1 -0
@@ -11,6 +11,7 @@ OCAMLFIND ?= ocamlfind
 
  CFLAGS += -fPIC -I$(shell ocamlc -where)
 
+OCAMLINCLUDE += -I +unix -I +dynlink
  OCAMLOPTFLAGS = -g -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -w F -warn-error F
  OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F
 

Thank you!

--
Andriy Sultanov | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech