[Libguestfs] [virt-v2v PATCH 1/4] Makefile.am: use $(LIBNBD_LIBS) for linking OCaml programs

Laszlo Ersek lersek at redhat.com
Mon Sep 27 06:34:55 UTC 2021


Otherwise the build fails with errors such as

>   GEN      helper-v2v-output
> /usr/bin/ld: cannot find -lnbd
> collect2: error: ld returned 1 exit status
> File "caml_startup", line 1:
> Error: Error during linking (exit code 1)

in the "convert", "output" and "v2v" modules.

(This patch is similar to guestfs-tools commit 9b0f2e2d5893 ("Makefile.am:
use $(LIBGUESTFS_LIBS) for linking OCaml programs", 2021-09-06).)

Signed-off-by: Laszlo Ersek <lersek at redhat.com>
---
 convert/Makefile.am | 1 +
 output/Makefile.am  | 1 +
 v2v/Makefile.am     | 1 +
 3 files changed, 3 insertions(+)

diff --git a/convert/Makefile.am b/convert/Makefile.am
index bb7c444f4aed..398bc1ed77a3 100644
--- a/convert/Makefile.am
+++ b/convert/Makefile.am
@@ -99,6 +99,7 @@ OCAMLCLIBS = \
 	$(LIBGUESTFS_LIBS) \
 	$(LIBXML2_LIBS) \
 	$(LIBOSINFO_LIBS) \
+	$(LIBNBD_LIBS) \
 	-lgnu
 
 OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'
diff --git a/output/Makefile.am b/output/Makefile.am
index 46e6560cb2bf..a63ad4c70d45 100644
--- a/output/Makefile.am
+++ b/output/Makefile.am
@@ -140,6 +140,7 @@ OCAMLCLIBS = \
 	$(LIBGUESTFS_LIBS) \
 	$(LIBXML2_LIBS) \
 	$(JANSSON_LIBS) \
+	$(LIBNBD_LIBS) \
 	-lgnu
 
 OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 1ce11814e193..f1073d96399f 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -83,6 +83,7 @@ OCAMLCLIBS = \
 	$(JANSSON_LIBS) \
 	$(LIBOSINFO_LIBS) \
 	$(LIBINTL) \
+	$(LIBNBD_LIBS) \
 	-lgnu
 
 OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)'
-- 
2.19.1.3.g30247aa5d201




More information about the Libguestfs mailing list