On current Fedora releases the ocaml modules will fail to
link unless CFLAGS contains -fPIC.
The autogen.sh script only updates the 'gnulib' submodule,
and so the build will fail due to the missing 'common'
submodule. This needs to be manually initialized at checkout.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
The above was required for me to build on Fedora 31, but I
don't think it is entirely satisfactory. IMHO, configure
ought to add -fPIC automatically if it is needed by the
distro. I also expected autogen.sh to update the submodules
besides just gnulib.
docs/guestfs-building.pod | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod
index 4bed86391..005626515 100644
--- a/docs/guestfs-building.pod
+++ b/docs/guestfs-building.pod
@@ -414,7 +414,8 @@ git.
git clone
https://github.com/libguestfs/libguestfs
cd libguestfs
- ./autogen.sh
+ git submodule update --init
+ CFLAGS=-fPIC ./autogen.sh
make
=head1 BUILDING FROM TARBALLS
--
2.24.1