From e11583a03ab9dc7969b6b329e0ad63524f210a26 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 26 Apr 2025 09:15:04 +0100 Subject: [PATCH] ocaml: Don't embed -L../lib/.libs in final mlguestfs.cma or .cmxa $ ocamlobjinfo /usr/lib64/ocaml/guestfs/mlguestfs.cma File /usr/lib64/ocaml/guestfs/mlguestfs.cma Force custom: no Extra C object files: -lmlguestfs -L../lib/.libs -lguestfs ... (and the same in mlguestfs.cmxa). This was caused because we run ocamlmklib with this -L parameter so that OCaml tests and examples will link with the local libguestfs.so (instead of the system-installed version), but for other reasons that doesn't actually work either. --- ocaml/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index f7621a8fa..11a0aef06 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -67,13 +67,13 @@ stamp-mlguestfs: libguestfsocaml.a $(guestfs_cmm) -ldopt '$(LDFLAGS)' \ $(libguestfsocaml_a_OBJECTS) guestfs.cmo \ $(LTLIBINTL) \ - -L../lib/.libs -lguestfs + -lguestfs if HAVE_OCAMLOPT $(OCAMLMKLIB) -o mlguestfs \ -ldopt '$(LDFLAGS)' \ $(libguestfsocaml_a_OBJECTS) guestfs.cmx \ $(LTLIBINTL) \ - -L../lib/.libs -lguestfs + -lguestfs endif touch $@