Nir Soffer
2019-Nov-18 01:03 UTC
Re: [Libguestfs] How to build virt-v2v after the project was separated
On Sun, Nov 17, 2019 at 7:03 PM Richard W.M. Jones <rjones@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?
Richard W.M. Jones
2019-Nov-18 09:39 UTC
Re: [Libguestfs] How to build virt-v2v after the project was separated
On Mon, Nov 18, 2019 at 03:03:10AM +0200, Nir Soffer wrote:> $ 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/*Sounds like files from the old directory were still around after a git pull. Removing common/ was the right thing to do. ...> $ ./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 foundThis happens because the Fedora package ocaml-libguestfs-devel is not installed. ./configure should have spotting this was missing, so this is a bug in virt-v2v. 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
Richard W.M. Jones
2019-Nov-18 10:15 UTC
Re: [Libguestfs] How to build virt-v2v after the project was separated
I've pushed a few commits which fix various aspects of the build and may improve things for you: commit d5ce9c91469d3d384aa32735453a1f8a20d4ec25 Author: Richard W.M. Jones <rjones@redhat.com> Date: Mon Nov 18 10:11:57 2019 +0000 tests: Add TESTS_ENVIRONMENT in a couple of makefiles. We were accidentally testing the installed virt-v2v rather than the locally built one. commit fffa7732c5d4899217c36985f1ef753d2469f1cd Author: Richard W.M. Jones <rjones@redhat.com> Date: Mon Nov 18 09:46:49 2019 +0000 m4: Relax dependency on libguestfs versions. 1.41 was only required to run a single test, but in all other respects 1.40 works fine. Relax the dependency and fix the test instead. Thanks: Nir Soffer. commit 8cab32c0eb4b455d7f0700ef5966eed3a23b6327 Author: Richard W.M. Jones <rjones@redhat.com> Date: Mon Nov 18 09:45:05 2019 +0000 m4: Remove daemon checks and dependency on hivex. Now that we've split out virt-v2v, there's no daemon, and hivex is not required (since it is only used through the guestfs API). commit 48afc3b004e44feaf3844c5eeb96e2a1aadbeb03 Author: Richard W.M. Jones <rjones@redhat.com> Date: Mon Nov 18 09:44:12 2019 +0000 m4: Check that ocaml 'guestfs' module is available. It is required to compile virt-v2v after we split out libguestfs and virt-v2v. Thanks: Nir Soffer. 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
Nir Soffer
2019-Nov-18 16:27 UTC
Re: [Libguestfs] How to build virt-v2v after the project was separated
On Mon, Nov 18, 2019 at 11:40 AM Richard W.M. Jones <rjones@redhat.com> wrote:> > On Mon, Nov 18, 2019 at 03:03:10AM +0200, Nir Soffer wrote: > > $ 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/* > > Sounds like files from the old directory were still around after a git > pull. Removing common/ was the right thing to do.I tried with new checkout: rm -rf virt-v2v git clone ... So this must be another issue.> > ... > > $ ./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 > > This happens because the Fedora package ocaml-libguestfs-devel is not > installed. ./configure should have spotting this was missing, so this > is a bug in virt-v2v. > > 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 >
Nir Soffer
2019-Nov-18 17:11 UTC
Re: [Libguestfs] How to build virt-v2v after the project was separated
On Mon, Nov 18, 2019 at 12:15 PM Richard W.M. Jones <rjones@redhat.com> wrote:> > > I've pushed a few commits which fix various aspects of the build and > may improve things for you:With current master building virt-v2v succeeds, thanks! I think we still have an issue with new checkout, having to delete common/ and update the submodule.> commit d5ce9c91469d3d384aa32735453a1f8a20d4ec25 > Author: Richard W.M. Jones <rjones@redhat.com> > Date: Mon Nov 18 10:11:57 2019 +0000 > > tests: Add TESTS_ENVIRONMENT in a couple of makefiles. > > We were accidentally testing the installed virt-v2v rather than the > locally built one. > > commit fffa7732c5d4899217c36985f1ef753d2469f1cd > Author: Richard W.M. Jones <rjones@redhat.com> > Date: Mon Nov 18 09:46:49 2019 +0000 > > m4: Relax dependency on libguestfs versions. > > 1.41 was only required to run a single test, but in all other respects > 1.40 works fine. Relax the dependency and fix the test instead. > > Thanks: Nir Soffer. > > commit 8cab32c0eb4b455d7f0700ef5966eed3a23b6327 > Author: Richard W.M. Jones <rjones@redhat.com> > Date: Mon Nov 18 09:45:05 2019 +0000 > > m4: Remove daemon checks and dependency on hivex. > > Now that we've split out virt-v2v, there's no daemon, and hivex is not > required (since it is only used through the guestfs API). > > commit 48afc3b004e44feaf3844c5eeb96e2a1aadbeb03 > Author: Richard W.M. Jones <rjones@redhat.com> > Date: Mon Nov 18 09:44:12 2019 +0000 > > m4: Check that ocaml 'guestfs' module is available. > > It is required to compile virt-v2v after we split out libguestfs and > virt-v2v. > > Thanks: Nir Soffer. > > 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 >
Reasonably Related Threads
- Re: How to build virt-v2v after the project was separated
- Re: How to build virt-v2v after the project was separated
- Re: How to build virt-v2v after the project was separated
- Re: How to build virt-v2v after the project was separated
- How to build virt-v2v after the project was separated