Pino Toscano
2017-Jul-31 08:19 UTC
[Libguestfs] [PATCH] build: require ocaml-hivex for the daemon
Since commit d5b6f1df5ff2d387a5dfc89b8316c0dff67ce2c9, the daemon requires ocaml-hivex; OTOH, nothing checks it is actually available, so the build of the daemon will fail with a semi-cryptic error about the lack of a directory in the OCaml install prefix. As fix, check for the presence of the hivex module at build time, failing earlier if not present. The check is performed only when the daemon is enabled, as ocaml-hivex is not used for anything else than the daemon. --- m4/guestfs_ocaml.m4 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/m4/guestfs_ocaml.m4 b/m4/guestfs_ocaml.m4 index d0f3349..e577b31 100644 --- a/m4/guestfs_ocaml.m4 +++ b/m4/guestfs_ocaml.m4 @@ -56,6 +56,14 @@ AM_CONDITIONAL([HAVE_OCAMLOPT], AM_CONDITIONAL([HAVE_OCAMLDOC], [test "x$OCAMLDOC" != "xno"]) +if test "x$enable_daemon" = "xyes"; then + OCAML_PKG_hivex=no + AC_CHECK_OCAML_PKG(hivex) + if test "x$OCAML_PKG_hivex" = "xno"; then + AC_MSG_ERROR([the OCaml module 'hivex' is required]) + fi +fi + OCAML_PKG_gettext=no OCAML_PKG_libvirt=no OCAML_PKG_oUnit=no -- 2.9.4
Richard W.M. Jones
2017-Jul-31 08:46 UTC
Re: [Libguestfs] [PATCH] build: require ocaml-hivex for the daemon
On Mon, Jul 31, 2017 at 10:19:26AM +0200, Pino Toscano wrote:> Since commit d5b6f1df5ff2d387a5dfc89b8316c0dff67ce2c9, the daemon > requires ocaml-hivex; OTOH, nothing checks it is actually available, so > the build of the daemon will fail with a semi-cryptic error about the > lack of a directory in the OCaml install prefix. > > As fix, check for the presence of the hivex module at build time, > failing earlier if not present. The check is performed only when the > daemon is enabled, as ocaml-hivex is not used for anything else than the > daemon. > --- > m4/guestfs_ocaml.m4 | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/m4/guestfs_ocaml.m4 b/m4/guestfs_ocaml.m4 > index d0f3349..e577b31 100644 > --- a/m4/guestfs_ocaml.m4 > +++ b/m4/guestfs_ocaml.m4 > @@ -56,6 +56,14 @@ AM_CONDITIONAL([HAVE_OCAMLOPT], > AM_CONDITIONAL([HAVE_OCAMLDOC], > [test "x$OCAMLDOC" != "xno"]) > > +if test "x$enable_daemon" = "xyes"; then > + OCAML_PKG_hivex=no > + AC_CHECK_OCAML_PKG(hivex) > + if test "x$OCAML_PKG_hivex" = "xno"; then > + AC_MSG_ERROR([the OCaml module 'hivex' is required]) > + fi > +fi > + > OCAML_PKG_gettext=no > OCAML_PKG_libvirt=no > OCAML_PKG_oUnit=noYup, I noticed this check was missing too. ACK Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Richard Jones
2017-Jul-31 15:58 UTC
[Libguestfs] check-syntax FAILED (was: Re: [PATCH] build: require ocaml-hivex for the daemon)
Checking out sources from https://github.com/libguestfs/libguestfs ... /var/tmp/tmpei8jCx/libguestfs /var/tmp/tmpei8jCx Reset branch 'master' Branch master set up to track remote branch master from origin. Your branch is up-to-date with 'origin/master'.>From github.com:libguestfs/libguestfs70b6f3356..c73f0a667 master -> origin/master * [new tag] v1.37.19 -> v1.37.19 Updating 70b6f3356..c73f0a667 Fast-forward BUGS | 26 +- RELEASES | 1 + configure.ac | 2 +- daemon/ntfs.c | 4 +- daemon/parted.c | 31 + docs/guestfs-building.pod | 6 +- generator/actions_core.ml | 22 + generator/proc_nr.ml | 1 + gobject/run-live-tests | 2 +- gobject/run-tests | 2 +- gobject/run-tests-retvalues | 2 +- lib/MAX_PROC_NR | 2 +- m4/guestfs_ocaml.m4 | 8 + po-docs/cs.po | 2570 ++++++++++++++++++++-------------------- po-docs/de.po | 2570 ++++++++++++++++++++-------------------- po-docs/en_GB.po | 2707 ++++++++++++++++++++++--------------------- po-docs/es.po | 2570 ++++++++++++++++++++-------------------- po-docs/eu.po | 2570 ++++++++++++++++++++-------------------- po-docs/fr.po | 2622 ++++++++++++++++++++--------------------- po-docs/ja.po | 2570 ++++++++++++++++++++-------------------- po-docs/libguestfs-docs.pot | 2479 +++++++++++++++++++-------------------- po-docs/nl.po | 2570 ++++++++++++++++++++-------------------- po-docs/pt_BR.po | 2570 ++++++++++++++++++++-------------------- po-docs/tg.po | 2570 ++++++++++++++++++++-------------------- po-docs/uk.po | 2700 +++++++++++++++++++++--------------------- po-docs/zh_CN.po | 2570 ++++++++++++++++++++-------------------- po/POTFILES | 7 +- po/ca.po | 67 +- po/de.po | 67 +- po/en_GB.po | 67 +- po/es.po | 70 +- po/eu.po | 67 +- po/fr.po | 70 +- po/gu.po | 67 +- po/hi.po | 67 +- po/ja.po | 70 +- po/kn.po | 67 +- po/libguestfs.pot | 69 +- po/ml.po | 67 +- po/mr.po | 70 +- po/nl.po | 70 +- po/or.po | 67 +- po/pa.po | 70 +- po/pl.po | 70 +- po/pt_BR.po | 67 +- po/ru.po | 67 +- po/ta.po | 67 +- po/te.po | 67 +- po/tg.po | 67 +- po/uk.po | 70 +- po/zh_CN.po | 67 +- po/zh_TW.po | 67 +- 52 files changed, 17727 insertions(+), 17728 deletions(-) /var/tmp/tmpei8jCx Applying patches ... /var/tmp/tmpei8jCx/libguestfs /var/tmp/tmpei8jCx error: patch failed: m4/guestfs_ocaml.m4:56 error: m4/guestfs_ocaml.m4: patch does not apply Applying: build: require ocaml-hivex for the daemon Patch failed at 0001 build: require ocaml-hivex for the daemon The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Richard Jones
2017-Jul-31 15:58 UTC
[Libguestfs] check-release FAILED (was: Re: [PATCH] build: require ocaml-hivex for the daemon)
Checking out sources from https://github.com/libguestfs/libguestfs ... /var/tmp/tmp6cFCS1/libguestfs /var/tmp/tmp6cFCS1 Reset branch 'master' Branch master set up to track remote branch master from origin. Your branch is up-to-date with 'origin/master'.>From github.com:libguestfs/libguestfs70b6f3356..c73f0a667 master -> origin/master * [new tag] v1.37.19 -> v1.37.19 Updating 70b6f3356..c73f0a667 Fast-forward BUGS | 26 +- RELEASES | 1 + configure.ac | 2 +- daemon/ntfs.c | 4 +- daemon/parted.c | 31 + docs/guestfs-building.pod | 6 +- generator/actions_core.ml | 22 + generator/proc_nr.ml | 1 + gobject/run-live-tests | 2 +- gobject/run-tests | 2 +- gobject/run-tests-retvalues | 2 +- lib/MAX_PROC_NR | 2 +- m4/guestfs_ocaml.m4 | 8 + po-docs/cs.po | 2570 ++++++++++++++++++++-------------------- po-docs/de.po | 2570 ++++++++++++++++++++-------------------- po-docs/en_GB.po | 2707 ++++++++++++++++++++++--------------------- po-docs/es.po | 2570 ++++++++++++++++++++-------------------- po-docs/eu.po | 2570 ++++++++++++++++++++-------------------- po-docs/fr.po | 2622 ++++++++++++++++++++--------------------- po-docs/ja.po | 2570 ++++++++++++++++++++-------------------- po-docs/libguestfs-docs.pot | 2479 +++++++++++++++++++-------------------- po-docs/nl.po | 2570 ++++++++++++++++++++-------------------- po-docs/pt_BR.po | 2570 ++++++++++++++++++++-------------------- po-docs/tg.po | 2570 ++++++++++++++++++++-------------------- po-docs/uk.po | 2700 +++++++++++++++++++++--------------------- po-docs/zh_CN.po | 2570 ++++++++++++++++++++-------------------- po/POTFILES | 7 +- po/ca.po | 67 +- po/de.po | 67 +- po/en_GB.po | 67 +- po/es.po | 70 +- po/eu.po | 67 +- po/fr.po | 70 +- po/gu.po | 67 +- po/hi.po | 67 +- po/ja.po | 70 +- po/kn.po | 67 +- po/libguestfs.pot | 69 +- po/ml.po | 67 +- po/mr.po | 70 +- po/nl.po | 70 +- po/or.po | 67 +- po/pa.po | 70 +- po/pl.po | 70 +- po/pt_BR.po | 67 +- po/ru.po | 67 +- po/ta.po | 67 +- po/te.po | 67 +- po/tg.po | 67 +- po/uk.po | 70 +- po/zh_CN.po | 67 +- po/zh_TW.po | 67 +- 52 files changed, 17727 insertions(+), 17728 deletions(-) /var/tmp/tmp6cFCS1 Applying patches ... /var/tmp/tmp6cFCS1/libguestfs /var/tmp/tmp6cFCS1 error: patch failed: m4/guestfs_ocaml.m4:56 error: m4/guestfs_ocaml.m4: patch does not apply Applying: build: require ocaml-hivex for the daemon Patch failed at 0001 build: require ocaml-hivex for the daemon The copy of the patch that failed is found in: .git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
Possibly Parallel Threads
- [PATCH 1/1] New partition API: part_resize
- check-release FAILED (was: Re: [PATCH 1/1] New partition API: part_resize)
- [PATCH 2/2] ocaml: fix build with Bytes fallback
- [PATCH 1/2] builder: fix paths to mlstdutils & mlutils
- [PATCH 01/27] build: Make OCaml compiler required for all builds.