Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1687638 - build from release tarball fails when srcdir != builddir
Summary: build from release tarball fails when srcdir != builddir
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2019-03-12 02:22 UTC by Toolybird
Modified: 2019-03-13 05:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Toolybird 2019-03-12 02:22:39 UTC
Description of problem:
Package fails to build when srcdir != builddir

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. make a separate builddir (eg: mkdir builddir; cd builddir)
2. run configure (eg: ../configure etc...)
3. make

Actual results:
Fails to build

Expected results:
Successful build

Additional info:
There are multiple places in the src where this is problematic.

The first one is the "docs" subdir which can be overcome like this:

sed -i 's|./|$(srcdir)/|' docs/

The second one is the "perl" subdir (workaround: --disable-perl)

The third one I cannot figure out. It's the "v2v" subdir:

Making all in v2v
make[2]: Entering directory '/build/libguestfs-test/src/libguestfs-1.40.2/builddir/v2v'
make  all-am
make[3]: Entering directory '/build/libguestfs-test/src/libguestfs-1.40.2/builddir/v2v'
  CC       virt_v2v-libvirt_utils-c.o
  CC       virt_v2v-qemuopts-c.o
  OCAMLOPT config.cmx
File "../../v2v/", line 1:
Error: Could not find the .cmi file for interface ../../v2v/config.mli.
make[3]: *** [Makefile:3628: config.cmx] Error 2
make[3]: Leaving directory '/build/libguestfs-test/src/libguestfs-1.40.2/builddir/v2v'
make[2]: *** [Makefile:2457: all] Error 2
make[2]: Leaving directory '/build/libguestfs-test/src/libguestfs-1.40.2/builddir/v2v'
make[1]: *** [Makefile:2247: all-recursive] Error 1
make[1]: Leaving directory '/build/libguestfs-test/src/libguestfs-1.40.2/builddir'
make: *** [Makefile:2151: all] Error 2

Comment 1 Richard W.M. Jones 2019-03-12 08:06:53 UTC
This is something which Hilko generally tests so I'm surprised it doesn't work.
We never use srcdir != builddir builds though.

The error means that the compiled interface (*.cmi) file hasn't been compiled
(or has been compiled but isn't present along the search path for whatever reason).
It might also be a problem with parallel builds.

Comment 2 Toolybird 2019-03-13 05:07:41 UTC
Hilko appears to be Debian maintainer? Ah, I forgot to look at Debian.

Indeed, Debian are carrying a bunch of patches which look relevant:

In particular patches 0001, 0007 and 0014 should solve my immediate problem. Some others there (for language bindings) also mention "out-of-tree".

It would be good if these patches could be applied upstream, thanks!

Note You need to log in before you can comment on or make changes to this bug.