MirageOS 3.9.0 won't install due to conflicting packages

Hi

I’m currently playing with MirageOS as part of a university assignment. I’ve read some articles in journals and watched some videos but other than that, I’m completely new to unikernels and OCaml. I’m now at the point of installing it to run some test code and then get my assignment written. The host I’m using is a Debian 10 VM. Currently I’m planning on using “-t unix” for the configure, and then eventually move to “-t xen”.

I cloned the mirage-skeleton repo to try to build those and work through your examples. “noop” seems to work but static_website_tls doesn’t. I get errors when running “make depend” as below:

mirage-unikernel-https-unix is now pinned to file:///home/user/mirage/mirage-skeleton/applications/static_website_tls (version ~dev)
# Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian
[ERROR] No solution for mirage-unikernel-https-unix: Sorry, no solution found: there seems to be a problem with your request.


Command failed: opam list --readonly --external  '--resolve=mirage-unikernel-https-unix' returned 20

I’ve had a play around and found that my mirage version is stuck at 3.6.0 so knowing that isn’t the latest, I am wondering if it’s a version issue. When I try “opam upgrade” I get messages about version conflicts.

If I do as it suggests and try to upgrade a specific package, I get vague errors:

$ opam upgrade mirage-runtime
Sorry, no solution found: there seems to be a problem with your request.

$ opam upgrade mirage-net
Sorry, no solution found: there seems to be a problem with your request.

$ opam upgrade mirage-types
Sorry, no solution found: there seems to be a problem with your request.

This is a new VM just for this, and opam and mirage were installed as per the Buster instructions on Docs :: Installation (mirage.io). I’ve not installed any other packages either via opam or apt.

Does anyone have a suggestion on what is going on and how I may fix it?

Many thanks,
Andrew

Hey Andrew,

the core of the problem seems to be “my mirage version is stuck at 3.6.0” – is there any chance you can upgrade to a newer release? 3.6.0 was the last release supporting OCaml 4.05.0 – but once you have opam (version 2 or higher), you can install a newer OCaml compiler with opam switch create 4.11.1 (and eval $(opam env) afterwards in all the terminals you’re using for development).

Once you have an up-to-date OCaml, opam install mirage should install a new mirage (3.9.0 at the time of writing).

Hey Hannes,

Thank you for replying so quickly. Your instructions are excellent and worked perfectly. You’ve been a real help.

Out of curiosity, is there a reason that a newly installed opam (apt installed 2.0.3, although I see there are newer ones like 2.0.7) would have chosen to install OCaml <= 4.05.0 rather than a newer one like 4.11.1? Just wondering if I maybe missed a step somewhere?

Kind regards,
Andrew

Great to hear. You’re welcome.

Opam does not itself install OCaml – but by default (i.e. after opam init) it uses the operating system provided OCaml compiler distribution (if present) – I’d guess your Debian installed an OCaml compiler as dependency of opam, and this Debian-packaged compiler is likely rather old (according to https://packages.debian.org/search?keywords=ocaml, Debian buster ships 4.05.0). NB since MirageOS is still under heavy development, and we appreciate new OCaml features very much, we stick to “support the most recent two major releases” (another reason is to narrow our support matrix and maintenance overhead due to limited amount of time available).

1 Like

Thanks Hannes, that explanation is really interesting and helpful. I appreciate your time

1 Like