[Libguestfs] [hivex PATCH 7/8] build: link hivex statically into C programs compiled against build dir

Laszlo Ersek lersek at redhat.com
Wed Sep 8 13:27:57 UTC 2021

This static-only linking allows the libguestfs daemon ("guestfsd") to
launch in the appliance, without unresolved hivex symbols, when libguestfs
is built against the hivex build dir. (Libguestfs's automatic *package*
collection for the appliance, based on the shared library requirements of
"guestfsd", cannot cover hivex when hivex is provided by a local build

Linking hivex statically into *host-side* C programs that are compiled
against the hivex build dir is only a small penalty.

Signed-off-by: Laszlo Ersek <lersek at redhat.com>
 lib/local/hivex.pc.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/local/hivex.pc.in b/lib/local/hivex.pc.in
index d899cb01a282..6f0b5bb44237 100644
--- a/lib/local/hivex.pc.in
+++ b/lib/local/hivex.pc.in
@@ -32,4 +32,4 @@ Version: @VERSION@
 Description: Read and write Windows Registry Hive files.
 Cflags: -I${includedir}
-Libs: -L${libdir} -lhivex
+Libs: -L${libdir} -l:libhivex.a

More information about the Libguestfs mailing list