Created attachment 1327838 [details] Build log Description of problem: ---------------------- I can't build libguestfs anymore due to the following recent change in ./daemon/inspect_utils.ml: * cb7696a5d - daemon: Implement inspection types and utility functions. (2 days ago) <Richard W.M. Jones>n--abbrev-commit Version-Release number of selected component (if applicable): ------------------------------------------------------------ 1.37.26. Steps to Reproduce: ------------------ export NOCONFIGURE=yes ./autogen.sh ./configure --build=x86_64-pc-linux-gnu \ --enable-fuse \ --enable-golang \ --prefix=/usr --sysconfdir=/etc --localstatedir=/var make ... OCAMLOPT inspect_utils.cmx File "inspect_utils.ml", line 184, characters 16-33: Error: Unbound constructor Hivex.OPEN_UNSAFE Makefile:4801: recipe for target 'inspect_utils.cmx' failed Additional info: --------------- Ubuntu 17.04 sources: https://github.com/libguestfs/libguestfs Whole build log is attached.
You need the newer version of hivex which adds this. hivex >= 1.3.14 It's basically required because without this libguestfs cannot inspect certain corrupted-but-not-broken Windows machines (upstream commit was 8ee7da48c54e4baafa90dd787cd3708834205b52 but I can't find the BZ right now).
https://www.redhat.com/archives/libguestfs/2017-February/msg00171.html https://www.redhat.com/archives/libguestfs/2017-February/msg00187.html have more details.
Patch posted: https://www.redhat.com/archives/libguestfs/2018-January/msg00283.html
I've applied the patch to v1.37.36 before the autogen.sh/configure process. Now I have some make errors: ... make[2]: Entering directory '/media/actionmystique/SAMSUNG5-Shared/home/actionmystique/src/Libguestfs/git-libguestfs/daemon' ../ocaml-dep.sh chroot.mli file.mli inspect.mli inspect_fs.mli is.mli findfs.mli inspect_fs_unix.mli devsparts.mli inspect_fs_windows.mli lvm.mli daemon.mli optgroups.mli config_daemon.mli md.mli inspect_types.mli ldm.mli structs.mli utils.mli mountable.mli listfs.mli blkid.mli sysroot.mli realpath.mli parted.mli filearch.mli mount.mli link.mli statvfs.mli inspect_utils.mli callbacks.mli btrfs.mli inspect_fs_unix_fstab.mli chroot.ml file.ml optgroups.ml is.ml mount.ml inspect.ml findfs.ml inspect_fs_unix.ml inspect_utils.ml devsparts.ml lvm.ml daemon.ml filearch.ml config_daemon.ml md.ml inspect_types.ml ldm.ml structs.ml utils.ml mountable.ml listfs.ml sysroot.ml realpath.ml blkid.ml parted.ml inspect_fs.ml link.ml inspect_fs_unix_fstab.ml inspect_fs_windows.ml daemon_utils_tests.ml statvfs.ml btrfs.ml callbacks.ml File "config_daemon.ml", line 20, characters 49-50: Error: Syntax error make all-am make[3]: Entering directory '/media/actionmystique/SAMSUNG5-Shared/home/actionmystique/src/Libguestfs/git-libguestfs/daemon' ../ocaml-dep.sh chroot.mli file.mli inspect.mli inspect_fs.mli is.mli findfs.mli inspect_fs_unix.mli devsparts.mli inspect_fs_windows.mli lvm.mli daemon.mli optgroups.mli config_daemon.mli md.mli inspect_types.mli ldm.mli structs.mli utils.mli mountable.mli listfs.mli blkid.mli sysroot.mli realpath.mli parted.mli filearch.mli mount.mli link.mli statvfs.mli inspect_utils.mli callbacks.mli btrfs.mli inspect_fs_unix_fstab.mli chroot.ml file.ml optgroups.ml is.ml mount.ml inspect.ml findfs.ml inspect_fs_unix.ml inspect_utils.ml devsparts.ml lvm.ml daemon.ml filearch.ml config_daemon.ml md.ml inspect_types.ml ldm.ml structs.ml utils.ml mountable.ml listfs.ml sysroot.ml realpath.ml blkid.ml parted.ml inspect_fs.ml link.ml inspect_fs_unix_fstab.ml inspect_fs_windows.ml daemon_utils_tests.ml statvfs.ml btrfs.ml callbacks.ml File "config_daemon.ml", line 20, characters 49-50: Error: Syntax error OCAMLOPT config_daemon.cmx File "config_daemon.ml", line 20, characters 49-50: Error: Syntax error
(In reply to jean-christophe manciot from comment #4) > I've applied the patch to v1.37.36 before the autogen.sh/configure process. > Now I have some make errors: > ... > File "config_daemon.ml", line 20, characters 49-50: > Error: Syntax error Please provide the content of daemon/config_daemon.ml.
let hivex_flag_unsafe = [ HIVEX_OPEN_UNSAFE_FLAG@]
(In reply to jean-christophe manciot from comment #6) > let hivex_flag_unsafe = [ HIVEX_OPEN_UNSAFE_FLAG@] This means my patch was not applied correctly. It looks like the patch was extracted by copying&pasting its text from the web page of the mailing list archive.
I don"t see any link for the patch other than the html document in https://bugzilla.redhat.com/show_bug.cgi?id=1493048#c3. I have extracted all the lines below and including --- into the patch which has been applied on a checkout of the tag v1.37.36 with: git-libguestfs# git apply "../without Hivex.OPEN_UNSAFE.patch" If there is another way to extract it, I'd be glad to read it.
Pino is respinning the patch and going to submit it upstream so you'll be able to pull it from the git repo in a little while.
Fixed upstream with https://github.com/libguestfs/libguestfs/commit/82fbf294fd48e9bf31f8dd534ba5ea1f5bfce117 which is in libguestfs >= 1.37.38.