Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not build with ocaml 5.0 #27

Open
solsticedhiver opened this issue May 19, 2023 · 6 comments
Open

does not build with ocaml 5.0 #27

solsticedhiver opened this issue May 19, 2023 · 6 comments

Comments

@solsticedhiver
Copy link

from what I understand the build fails because of ocaml 5.0.
using ocaml-libvirt-git, the build (either 2.2.0 or 2.3.4 or git) fails with:

make[2] : on entre dans le répertoire « /home/solstice/asp/AUR/virt-v2v/src/virt-v2v-2.3.4/common/mlstdutils »
  CC       libmlstdutils_a-dummy.o
  OCAMLCMI guestfs_config.cmi
  OCAMLCMI stringMap.cmi
  OCAMLCMI stringSet.cmi
  OCAMLCMI std_utils.cmi
  OCAMLOPT guestfs_config.cmx
  OCAMLC   guestfs_config.cmo
  OCAMLC   stringSet.cmo
  OCAMLOPT stringMap.cmx
  OCAMLOPT stringSet.cmx
  OCAMLC   stringMap.cmo
  OCAMLC   std_utils.cmo
  OCAMLOPT std_utils.cmx
File "std_utils.ml", line 344, characters 30-48:
344 |     let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
                                    ^^^^^^^^^^^^^^^^^^
Error: Unbound module Pervasives
make[2]: *** [Makefile:1347: std_utils.cmo] Error 2
@rwmjones
Copy link
Member

We've not built virt-v2v on OCaml 5 yet, but the above error should be easy to fix, simply replace every instance of Pervasives. with Stdlib. in the source code.

@solsticedhiver
Copy link
Author

This seems to do it, but I bumped into another archlinux issue about

Error: /usr/lib/ocaml/guestfs/guestfs.cmi
       is not a compiled interface for this version of OCaml.```

@rwmjones
Copy link
Member

That'll be because the libguestfs package was built with OCaml != 5.

@juergenhoetzel
Copy link

That'll be because the libguestfs package was built with OCaml != 5.

This was indeed not a upstream issue. Fixed in Arch Linux [extra] repo:

https://gitlab.archlinux.org/archlinux/packaging/packages/libguestfs/-/commit/4780699838e5fad70eb8e031438392dced998868

@solsticedhiver
Copy link
Author

I don't understand why you are saying that. Because your fix includes a patch called ocaml5.patch to help build against ocaml 5.....

@juergenhoetzel
Copy link

I don't understand why you are saying that. Because your fix includes a patch called ocaml5.patch to help build against ocaml 5..

I see:

Error: /usr/lib/ocaml/guestfs/guestfs.cmi
is not a compiled interface for this version of OCaml.```

Sorry, I was only referring to this ^^^ issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants