[Libguestfs] [PATCH v4] common/mlstdutils: Build a bytecode version of this library.
Pino Toscano
ptoscano at redhat.com
Thu Jul 27 15:02:35 UTC 2017
On Monday, 24 July 2017 15:51:23 CEST Richard W.M. Jones wrote:
> Even if ocamlopt is available, always build a bytecode version of
> ‘common/mlstdutils’.
>
> Furthermore, because this library is pure OCaml, we should not be
> using ‘ocamlmklib’. We should use ‘ocaml{c,opt} -a’ instead. This
> doesn't make any difference for native code, but for bytecode it was
> building a broken library.
>
> The original reason for making this change is because the generator is
> always built as bytecode, and it depended on
> ‘../common/mlstdutils/guestfs_config.cmo’ and
> ‘../common/mlstdutils/std_utils.cmo’. On native code platforms these
> were not built before the generator and so the generator races to
> build the .cmi and .cmo files. Since the generator doesn't have
> correct dependencies covering the ‘common/mlstdutils’ directory you
> can get a broken link on fast machines:
>
> File "../common/mlstdutils/std_utils.ml", line 1:
> Error: Corrupted compiled interface
> ../common/mlstdutils/guestfs_config.cmi
> make[2]: *** [Makefile:1993: ../common/mlstdutils/std_utils.cmo] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory '/builddir/build/BUILD/libguestfs-1.37.17/generator'
> ---
> common/mlstdutils/Makefile.am | 16 +++++++++++++---
> generator/Makefile.am | 10 ++++++----
> 2 files changed, 19 insertions(+), 7 deletions(-)
LGTM.
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170727/53f5b7d5/attachment.sig>
More information about the Libguestfs
mailing list