[Libguestfs] How to build virt-v2v after the project was separated
Nir Soffer
nsoffer at redhat.com
Mon Nov 18 01:03:10 UTC 2019
On Sun, Nov 17, 2019 at 7:03 PM Richard W.M. Jones <rjones at redhat.com> wrote:
>
> On Sun, Nov 17, 2019 at 06:07:48PM +0200, Nir Soffer wrote:
> > Looks like virt-v2v cannot be built now, since it requires non-existing version
> > of libguestfs-devel.
> >
> > Based on (no README or any instructions in virt-v2v)
> > http://libguestfs.org/guestfs-building.1.html
> >
> > I tried this:
> >
> > git clean -dxf
> > ./autogen.sh
> >
> > And it fails with:
> >
> > --- Checking for libraries used by virt-v2v ---
> > checking for pkg-config... /usr/bin/pkg-config
> > checking pkg-config is at least version 0.9.0... yes
> > checking for LIBGUESTFS... no
> > configure: error: Package requirements (libguestfs >= 1.41.5) were not met:
> >
> > Package dependency requirement 'libguestfs >= 1.41.5' could not be satisfied.
> > Package 'libguestfs' has version '1.40.2', required version is '>= 1.41.5'
>
> You can actually use 1.40 just fine. There is a single test which
> requires 1.41 (I forget now which one), and we should probably change
> that test to make it conditional. Just modify m4/guestfs-libraries.m4:
>
> -PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.41.5])
> +PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.40])
>
> and rerun ‘autoreconf -i’.
Tried again with new clean checkout, this change fixes the issue.
The next issue is same as libguestfs:
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:30: installing 'build-aux/missing'
configure.ac:102: error: required file 'common/options/Makefile.in' not found
configure.ac:102: error: required file 'common/mlaugeas/Makefile.in' not found
configure.ac:102: error: required file
'common/mlcustomize/Makefile.in' not found
...
parallel-tests: installing 'build-aux/test-driver'
gnulib/lib/Makefile.am: installing 'build-aux/depcomp'
autoreconf: automake failed with exit status: 1
autogen.sh ignores the error and continue, and finally failing with:
config.status: error: cannot find input file: `Makefile.in'
Looking in common we have:
$ tree common
common
├── mlgettext
│ └── common_gettext.ml
└── mlstdutils
I tried you other suggests for git submodules:
$ git submodule init
Submodule 'common' (https://github.com/libguestfs/libguestfs-common)
registered for path 'common'
$ git submodule update
fatal: destination path '/home/nsoffer/src/virt-v2v/common' already
exists and is not an empty directory.
fatal: clone of 'https://github.com/libguestfs/libguestfs-common' into
submodule path '/home/nsoffer/src/virt-v2v/common' failed
Failed to clone 'common'. Retry scheduled
fatal: destination path '/home/nsoffer/src/virt-v2v/common' already
exists and is not an empty directory.
fatal: clone of 'https://github.com/libguestfs/libguestfs-common' into
submodule path '/home/nsoffer/src/virt-v2v/common' failed
Failed to clone 'common' a second time, aborting
So I tried:
rm -rf common/*
$ git submodule update
Cloning into '/home/nsoffer/src/virt-v2v/common'...
Submodule path 'common': checked out '8c42f772614b44a8cb974afa904ec9f518431ab2'
$ ./autogen.sh
This seems to fix the issue, but make failed with:
$ make -j8
There seems to be no Makefile in this directory.
You must run ./configure before running 'make'.
make: *** [GNUmakefile:108: abort-due-to-no-makefile] Error 1
$ ./configure
Works, but now make fail with:
$ make -j8
make all-recursive
make[1]: Entering directory '/home/nsoffer/src/virt-v2v'
Making all in common/mlstdutils
make[2]: Entering directory '/home/nsoffer/src/virt-v2v/common/mlstdutils'
OCAMLCMI guestfs_config.cmi
OCAMLCMI stringMap.cmi
CC libmlstdutils_a-dummy.o
OCAMLCMI stringSet.cmi
OCAMLCMI std_utils.cmi
ocamlfind: Package `guestfs' not found
ocamlfind: Package `guestfs' not found
ocamlfind: Package `guestfs' not found
ocamlfind: Package `guestfs' not found
make[2]: *** [Makefile:2547: stringMap.cmi] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:2547: guestfs_config.cmi] Error 2
make[2]: *** [Makefile:2547: std_utils.cmi] Error 2
make[2]: *** [Makefile:2547: stringSet.cmi] Error 2
make[2]: Leaving directory '/home/nsoffer/src/virt-v2v/common/mlstdutils'
make[1]: *** [Makefile:2066: all-recursive] Error 1
make[1]: Leaving directory '/home/nsoffer/src/virt-v2v'
make: *** [Makefile:1986: all] Error 2
Sometihng missing in common?
More information about the Libguestfs
mailing list