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

Re: [MirageOS-devel] Struggling a bit with the Hello World applications

On Mon, May 5, 2014 at 7:26 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
> Below is what happened:
> On 14.04 I got this while running opam init:
> ERROR] The compilation of base-bigarray.base failed.
> [ERROR] The compilation of base-threads.base failed.
> [ERROR] The compilation of base-unix.base failed.
> ===== ERROR while installing base-bigarray.base =====
> Internal error:
> Â Sys_error("rm -rf /home/vagrant/.opam/system/lib/base-bigarray: Cannot allocate memory")
> ===== ERROR while installing base-threads.base =====
> Internal error:
> Â Sys_error("rm -rf /home/vagrant/.opam/system/lib/base-threads: Cannot allocate memory")
> ===== ERROR while installing base-unix.base =====
> Internal error:
> Â Sys_error("rm -rf /home/vagrant/.opam/system/lib/base-unix: Cannot allocate memory")

To ask the obvious question: how much memory does this VM have?

I just tried reproducing this on a fresh Ubuntu 14.04 VMWare Fusion:

Ok, I'm slightly embarrassed now. I bumped the memory on the VM to 1024. The Vagrant default is pretty low. It works fine now.
> I then went back to the 12.04 install. This time I got everything up and running and tried to compile the console example. It took a very long time, but it built. Unfortunately it also uninstalled mirage. Here's the log:

That's clearly going wrong as well, due to the internal heuristic. ÂIs this using OPAM 1.1.1?

I think I figured this out. On 12.04 the mirage installation instruction tell you to install opam because it's not in the ubuntu repo. So you are guided to the quick installation at http://opam.ocaml.org/doc/Quick_Install.html. This tells you to add a repo and run ppa:avsm/ppa. This is where it goes wrong. I skipped this step and installed one of the opam binaries instead, and now it works. At first I thought the problem was aspcud because by following the instructions it's installed but by just using the opam binary it is not. To test I just installed aspcud Âand the mirage configure step still works fine. So maybe it's something about the ocaml that gets pulled in from that repo?

So I got one step further, the console example now works on Ubuntu 14.04.

The stackv4 example fails during "mirage configure --unix" due to a missing libssl. That's easy to fix I guess, but the weird thing (to me) is that after failing the mirage command is gone again. It does say that it is to be recompiled, so I guess it was removed and then never recompiled since ssl 0.4.7 failed.

This time I copied the "opam switch ..." command needed to restore the previous state according to the log, and it worked. Is that generally the workflow? It does strike me as a little odd that I as the user have to go in and manually repair the system like that? Or would you just run "opam install mirage" in this case?

Anyway, after doing apt-get install libssl-dev the stackv4 example now works.

Looks like I'm finally off to the races :)
MirageOS-devel mailing list



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