Hilko Bengen
2020-Jan-13 23:04 UTC
[Libguestfs] [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
This avoids build failures in separate builds such as this one: ,---- | ocamlfind ocamlc -package str,unix -I . -a guestfs_config.cmo stringMap.cmo stringSet.cmo std_utils.cmo -o mlstdutils.cma | ar cr libmlstdutils.a libmlstdutils_a-dummy.o | ranlib libmlstdutils.a | File "_none_", line 1: | Error: Files std_utils.cmo and guestfs_config.cmo | make inconsistent assumptions over interface Guestfs_config | make[4]: *** [Makefile:2580: mlstdutils.cma] Error 2 `---- --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 5f8310a640..77a1e986cd 100644 --- a/configure.ac +++ b/configure.ac @@ -353,6 +353,10 @@ AC_CONFIG_FILES([Makefile tools/Makefile website/index.html]) +AC_CONFIG_LINKS([common/mlstdutils/guestfs_config.mli:common/mlstdutils/guestfs_config.mli + daemon/daemon_config.mli:daemon/daemon_config.mli + v2v/config.mli:v2v/config.mli]) + AC_OUTPUT dnl Produce summary. -- 2.25.0.rc2
Richard W.M. Jones
2020-Jan-14 10:01 UTC
Re: [Libguestfs] [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
On Tue, Jan 14, 2020 at 12:04:49AM +0100, Hilko Bengen wrote:> This avoids build failures in separate builds such as this one: > > ,---- > | ocamlfind ocamlc -package str,unix -I . -a guestfs_config.cmo stringMap.cmo stringSet.cmo std_utils.cmo -o mlstdutils.cma > | ar cr libmlstdutils.a libmlstdutils_a-dummy.o > | ranlib libmlstdutils.a > | File "_none_", line 1: > | Error: Files std_utils.cmo and guestfs_config.cmo > | make inconsistent assumptions over interface Guestfs_config > | make[4]: *** [Makefile:2580: mlstdutils.cma] Error 2 > `---- > --- > configure.ac | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 5f8310a640..77a1e986cd 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -353,6 +353,10 @@ AC_CONFIG_FILES([Makefile > tools/Makefile > website/index.html]) > > +AC_CONFIG_LINKS([common/mlstdutils/guestfs_config.mli:common/mlstdutils/guestfs_config.mli > + daemon/daemon_config.mli:daemon/daemon_config.mli > + v2v/config.mli:v2v/config.mli]) > + > AC_OUTPUTI had to look up what AC_CONFIG_LINKS does :-) I think this is broadly OK, but I'm fairly sure you don't need the v2v/ link (since virt-v2v is now a separate project: https://github.com/libguestfs/virt-v2v). Maybe this was applied against a different branch from master? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
Pino Toscano
2020-Jan-14 10:18 UTC
Re: [Libguestfs] [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
On Tuesday, 14 January 2020 00:04:49 CET Hilko Bengen wrote:> This avoids build failures in separate builds such as this one: > > ,---- > | ocamlfind ocamlc -package str,unix -I . -a guestfs_config.cmo stringMap.cmo stringSet.cmo std_utils.cmo -o mlstdutils.cma > | ar cr libmlstdutils.a libmlstdutils_a-dummy.o > | ranlib libmlstdutils.a > | File "_none_", line 1: > | Error: Files std_utils.cmo and guestfs_config.cmo > | make inconsistent assumptions over interface Guestfs_config > | make[4]: *** [Makefile:2580: mlstdutils.cma] Error 2 > `---- > --- > configure.ac | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 5f8310a640..77a1e986cd 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -353,6 +353,10 @@ AC_CONFIG_FILES([Makefile > tools/Makefile > website/index.html]) > > +AC_CONFIG_LINKS([common/mlstdutils/guestfs_config.mli:common/mlstdutils/guestfs_config.mli > + daemon/daemon_config.mli:daemon/daemon_config.mli > + v2v/config.mli:v2v/config.mli]) > + > AC_OUTPUTI do not think this is the correct approach. See my analysis here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946594#46 The fixes for this were done upstream recently, see for libguestfs: https://github.com/libguestfs/libguestfs/commit/323909d92ee681091f15ec2cd9fa1b6bc6379146 https://github.com/libguestfs/libguestfs/commit/4cd801dcff1393f6ffcb81cac9a6dcdb1f007bd2 https://github.com/libguestfs/libguestfs-common/commit/3728b95b880601af95ab2b6b7f1d8110fb5e1fa8 https://github.com/libguestfs/virt-v2v/commit/0e63bae4e84fd2a9752dbf5fa32fcb90631806e3 Plus there were more builddir!=srcdir fixes. -- Pino Toscano
Hilko Bengen
2020-Jan-14 11:23 UTC
[Libguestfs] [PATCH v2] Link .mli files corresponding to autorgenerated .ml files into builddir
This avoids occasional build failures in builddir != srcdir situations: ,---- | ocamlfind ocamlc -package str,unix -I . -a guestfs_config.cmo stringMap.cmo stringSet.cmo std_utils.cmo -o mlstdutils.cma | ar cr libmlstdutils.a libmlstdutils_a-dummy.o | ranlib libmlstdutils.a | File "_none_", line 1: | Error: Files std_utils.cmo and guestfs_config.cmo | make inconsistent assumptions over interface Guestfs_config | make[4]: *** [Makefile:2580: mlstdutils.cma] Error 2 `---- If ocamlc does not find a corresponding .cmi interface file while building a .cmo object file from .ml source, it will also construct that .cmi file from the .ml file. This happens in a race with the build system's explicit .mli -> .cmi build step and therefore may lead to the result above. --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 5f8310a640..ad0af9cc81 100644 --- a/configure.ac +++ b/configure.ac @@ -353,6 +353,9 @@ AC_CONFIG_FILES([Makefile tools/Makefile website/index.html]) +AC_CONFIG_LINKS([common/mlstdutils/guestfs_config.mli:common/mlstdutils/guestfs_config.mli + daemon/daemon_config.mli:daemon/daemon_config.mli]) + AC_OUTPUT dnl Produce summary. -- 2.25.0.rc2
Hilko Bengen
2020-Jan-14 11:31 UTC
Re: [Libguestfs] [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
* Pino Toscano:> I do not think this is the correct approach. See my analysis here: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=946594#46This issue is for a different problem that appeared on some architectures after I forced *config.ml to be regenerated for the Debian builds of libguestfs 1.40.2, see <https://buildd.debian.org/status/logs.php?pkg=libguestfs&ver=1%3A1.40.2-4&suite=sid>. I have added some observations/analysis to v2 of the patch. Cheers, -Hilko
Reasonably Related Threads
- [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
- Re: [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
- Re: [PATCH] Link .mli files corresponding to autorgenerated .ml files into builddir
- Re: [PATCH 2/5] Make sure every *.ml file has a corresponding *.mli file.
- Re: How to build virt-v2v after the project was separated