[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
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_OUTPUT
I 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
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
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_OUTPUT
I 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/323909d92ee681091f15ec2cd9fa... https://github.com/libguestfs/libguestfs/commit/4cd801dcff1393f6ffcb81cac9a6... https://github.com/libguestfs/libguestfs-common/commit/3728b95b880601af95ab2... https://github.com/libguestfs/virt-v2v/commit/0e63bae4e84fd2a9752dbf5fa32fcb... Plus there were more builddir!=srcdir fixes. -- Pino Toscano
* 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#46
This 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
On Tuesday, 14 January 2020 12:31:24 CET Hilko Bengen wrote:
* 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#46
This 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>.
The issue is actually the same: I was able to reproduce it locally on git master at that time, and it showed the same result. common/mlstdutils/guestfs_config.ml, daemon/daemon_config.ml, and v2v/config.ml are generated by configure, so shipping them in the tarball was wrong to begin with -- see e.g. commit 323909d92ee6810. After not shipping them, the issue become for the dependency resolution to match .ml <=> .mli in different directories (one in the builddir, the other in the srcdir). The suggested fix by Vincent Danjean in the Debian bug worked for that -- see commit 4cd801dcff1393f. -- Pino Toscano
participants (3)
-
Hilko Bengen -
Pino Toscano -
Richard W.M. Jones