On Wed, Sep 08, 2021 at 03:35:42PM +0200, Laszlo Ersek wrote:
Pass $(HIVEX_LIBS) with -cclib under the
"daemon_utils_tests_LINK" target;
otherwise the OCaml compiler does not tell the linker where "-lhivex" can
be found, and the linking step fails if "-lhivex" is not on a system
library path.
Signed-off-by: Laszlo Ersek <lersek(a)redhat.com>
---
daemon/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 83bf39975e04..7322bfa5d765 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -453,7 +453,7 @@ daemon_utils_tests_DEPENDENCIES = \
$(top_builddir)/ocaml-link.sh
daemon_utils_tests_LINK = \
$(top_builddir)/ocaml-link.sh \
- -cclib '-lutils -lgnu' \
+ -cclib '-lutils -lgnu $(HIVEX_LIBS)' \
-- \
$(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLLINKFLAGS) \
$(OCAMLPACKAGES) \
--
I think this looks fine, ACK series too.
The ocaml-link.sh script (found at the top of the build tree) is a
kind of hack to rearrange the order of parameters that we pass to
ocamlopt. It's actually needed because automake is rather inflexible.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://libguestfs.org