[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Mirage OS 2.4 errors on install and mirage-skeleton build



Hi,

On Wed, Apr 29, 2015 at 9:38 AM, Robert Ream <robertream@xxxxxxxxx> wrote:
First, I want to say that I'm a huge fan of the emerging unikernel and "Cloud OS" (i.e. OSv) approaches to operating systems. I also am a huge fan of static type systems and have used OCaml in a production environment at a previous job. I've been casually tracking Mirage OS from a distance for a few years now and I just recently came across what I think might be an ideal use case for it or one of the alternative unikernels at work so I decided to build an development Linux VM for testing the waters with Mirage OS 2.4 and I have run into several issues.

First, I actually tried installing Mirage on a Fedora 21 VM but quickly ran into package version conflicts between various dependencies of the OCaml/Opam/Mirage toolchain. OCaml 4.02 breaks things I guess. I think the instructions for installing on Fedora are out of date for this scenario.

Oh dear :(

I happen to have a Fedora21 box sitting next to me so I'll try to reproduce these problems there later.


So after ditching Fedora, I went with what appeared to be the more common pathÂUbuntu, specifically Ubuntu 15 and everything was going fine until I got to working through the tutorial and got to the network examples in mirage-skeleton and I started getting build errors with confusing somewhat cryptic error messages. So I think I've hit my final brick wall with this and I'm curious if anyone else is seeing similar issues?

What I have set out with as my POC goal was to create a simple web service that accepts a HTTP POST for registering routes forÂforwarding traffic on specific UDP ports for an ingress address to a specific destination address and UDP port. I didn't think it would be too hard to piece together, from the examples I've seen. But I have yet to get any networking samples built or running yet.

The first problem I encountered isn't really a blocker, more an annoyance, but every time I run "mirage configure --unix", opam can't seem to find the dependency "m4" and prompts me to reinstall it with apt-get. I don't know if this is specifically a problem with Mirage OS, could be opam I suppose.

Yeah, it sounds like a problem with opam -- it's worth reporting on their github issue tracker (https://github.com/ocaml/opam)
Â

Second, when I built the stackv4 example from mirage-skeleton I get this error:

File "main.ml", line 1: Error: The files /home/robert/.opam/system/lib/mirage-console/console_unix.cmi and unikernel.cmi make inconsistent assumptions over interface Cstruct

I think I can explain what's happening there: OCaml is very conservative when linking, to guarantee safety. If you have a library 'a' and library 'b', then update library 'a', you'll often have to recompile library 'b'. Happily opam takes care of that for you when you install or update, so you don't have to worry about the mirage libraries themselves.

I bet what's happened here is that you have stale built modules in the current project (stale in the sense that they were built against a previous version of Cstruct) and the build tools don't know about the dependencies. A workaround should be to "make clean" then "make". Hopefully in the future our build tools would detect the dependency between the built module in the current project and the library and recompile.
Â

Which isn't as bad as your average C++ meta-template error but it is still fairly cryptic.

Third, when I managed to get one of the network samples building, for example "ping", I couldn't get the unikernel running locally with a tun/tap device I created. Even though I use tapctl to create a tap0 device owned by my user account, just like the tutorial advises, when I go to execute the unikernel I still get this error:

Fatal error: exception Failure("net_tap0")
Raised at file "src/core/lwt.ml", line 788, characters 22-23
Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
Called from file "main.ml", line 47, characters 2-28

I've not used the Unix tun/tap networking for a while -- perhaps someone else could advise you here.
Â
With the latest iteration of by Mirage development VM I'm running Ubuntu 15.04, OCaml 4.01.0a, Opam 1.2, and Mirage 2.4.0. Am I doing something wrong or maybe am I just running too close to the bleeding edge versions of everything?

Your environment sounds ok. There have been a number of releases really recently and a few bugs evidently crept through.

Thanks for letting us know how it went -- hopefully we can get to the bottom of the remaining issues.

Thanks,
Dave

Â



-Robert

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel




--
Dave Scott
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.