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

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



You could clone the opam repo and have this as your
default as described in "You want more control over the
public repository" on...


and possibly pin packages as needed.

Mindy has an example of this on her http://somerandomidiot.com
blog.

ian


On 5 May 2014, at 17:09, Andrà NÃss <andre.naess@xxxxxxxxx> wrote:

I just made two new attempts. I first tried on Ubuntu 14.04 and then on 12.04. Both failed, but for different reasons. 

I have to admit that I'm getting a bit frustrated now. It seems that changes are pulled down immediately making the environment very unstable. Is there some kind of mechanism for ensuring that I get a stable repeatable environment where I control when I want to try to upgrade the various packages (provided I can get it to work)?

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")

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:

vagrant@precise64:/vagrant/mirage-skeleton/console$ cat log 
Falling back to the internal heuristic.
The following actions will be performed:
 - remove mirage.1.1.2
 - remove base-bigarray.base
 - remove cmdliner.0.9.4 [required by mirage]
 - remove ipaddr.2.4.0 [required by mirage]
 - remove re.1.2.1 [required by mirage]
 - downgrade mirage-types.1.1.2 to 0.3.0 [required by mirage-console-unix]
 - downgrade ocplib-endian.0.4 to 0.3 [required by mirage-console-unix]
 - install mirage-clock-unix.1.0.0 [required by mirage-console-unix]
 - recompile cstruct.1.1.0 [use ocplib-endian]
 - downgrade io-page.1.1.1 to 1.1.0 [required by mirage-console-unix]
 - install shared-memory-ring.1.0.0 [required by mirage-console-unix]
 - install mirage-unix.1.1.0 [required by mirage-console-unix]
 - install mirage-console-unix.0.9.9
4 to install | 1 to reinstall | 0 to upgrade | 3 to downgrade | 5 to remove

=-=-= Removing Packages =-=-=
Removing mirage.1.1.2.
  rm -f /home/vagrant/.opam/system/bin/mirage
  ocamlfind remove mirage
Removing base-bigarray.base.
Removing cmdliner.0.9.4.
Removing ipaddr.2.4.0.
  ocamlfind remove ipaddr
Removing re.1.2.1.
  ocamlfind remove re
Removing io-page.1.1.1.
  ocamlfind remove io-page
Removing mirage-types.1.1.2.
Removing cstruct.1.1.0.
  ocamlfind remove cstruct
Removing ocplib-endian.0.4.
  ocamlfind remove ocplib-endian

=-=-= Installing mirage-types.0.3.0 =-=-=
Building mirage-types.0.3.0:
  make all
  make install
Installing mirage-types.0.3.0.

=-=-= Installing ocplib-endian.0.3 =-=-=
Building ocplib-endian.0.3:
  ocaml setup.ml -configure --disable-debug --prefix /home/vagrant/.opam/system
  ocaml setup.ml -build
  ocaml setup.ml -install
Installing ocplib-endian.0.3.

=-=-= Installing cstruct.1.1.0 =-=-=
Building cstruct.1.1.0:
  make
  make install
Installing cstruct.1.1.0.

=-=-= Installing mirage-clock-unix.1.0.0 =-=-=
Building mirage-clock-unix.1.0.0:
  make unix-build
  make unix-install
Installing mirage-clock-unix.1.0.0.

=-=-= Installing io-page.1.1.0 =-=-=
Building io-page.1.1.0:
  make
  make install
Installing io-page.1.1.0.

=-=-= Installing shared-memory-ring.1.0.0 =-=-=
Building shared-memory-ring.1.0.0:
  make all
  make install
Installing shared-memory-ring.1.0.0.

=-=-= Installing mirage-unix.1.1.0 =-=-=
Building mirage-unix.1.1.0:
  make unix-build
  make unix-install PREFIX=/home/vagrant/.opam/system
Installing mirage-unix.1.1.0.

=-=-= Installing mirage-console-unix.0.9.9 =-=-=
Building mirage-console-unix.0.9.9:
  make unix-build
  make unix-install
Installing mirage-console-unix.0.9.9.



On Mon, May 5, 2014 at 2:14 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
This was my fault, as I introduced an existential crisis into the Lwt package by making it optionally depend on itself.  The resulting total perspective vortex caused the solver to decide to take no action and terminate the universe.

Thomas has merged a fix, and I'll make the CI output a bit more paranoid to these exit codes (they pass the CI atm).

-anil

On 5 May 2014, at 11:52, Ian Wilkinson <ianw1@xxxxxx> wrote:

Hi Andre,

I had a similar experience and also went the Vagrant way.

I have something working with Test Kitchen and Vagrant, and
Fabric and boto for launching on AWS EC2. You can find it here...


ian


On 5 May 2014, at 11:11, Andrà NÃss <andre.naess@xxxxxxxxx> wrote:

Thanks for your quick response. I indeed have aspcud installed.

After fiddling around and making a mess and not getting anything to work I decided to start from scratch. Since I use vagrant that's easy. So I went through the installation instructions step by step:

1. Installed all the build essentials. Ran into an error here. Ran
   apt-get update and the problem resolved itself.
2. The add-apt-repository is not in the standard Ubuntu, but when
   trying to invoke it you are told to install
   python-software-properties, so:
3. apt-get install python-software-properties 
   add-apt-repository ppa:avsm/ppa
   sudo apt-get update
   apt-get install ocaml opam
       (At this step I noticed that aspcud was installed)
4. opam --version reports 1.1.1
5. opam init, answering yes to modify config files
6. eval `opam config env`
7. opam install mirage
The following actions will be performed:
 - install ocamlfind.1.4.0 [required by mirage]
 - install cmdliner.0.9.4 [required by mirage]
 - install ipaddr.2.4.0 [required by mirage]
 - install optcomp.1.5 [required by mirage]
 - install ounit.2.0.0 [required by mirage]
 - install re.1.2.1 [required by mirage]
 - install ocplib-endian.0.4 [required by mirage]
 - install cstruct.1.1.0 [required by mirage]
 - install io-page.1.1.1 [required by mirage]
 - install mirage-types.1.1.2 [required by mirage]
 - install mirage.1.1.2
 - install lwt.2.4.5 [required by mirage]
12 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
Do you want to continue ? [Y/n] 
[ERROR] Aborting, as the following packages have a cyclic dependency:
 (No packages are listed, so this looks like a bug to me)

Oddly enough this worked fine yesterday, so I have no idea what has changed.

I have a Mac, but I figured I might get better results using a linux VM especially due to the tuntap and Xen requirements, and the fact that homebrew failed with a clink error when trying to install ocaml.

Perhaps a different Linux would be preferable? Since I'm just using it as a compilation station I don't really care what distro it is. What is the mirage team using, Debian?


On Mon, May 5, 2014 at 10:12 AM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
On 5 May 2014, at 08:42, Andrà NÃss <andre.naess@xxxxxxxxx> wrote:

I'm going through the Hello World examples on the MirageOS website and on the stackv4 example I'm having some problems. It seems that when I run "mirage configure --unix" the mirage command itself is uninstalled. After being very confused for a while, I accidentally hit CTRL-C while mirage was running because the mirage configure call was taking a long time. Doing so revealed a whole bunch of opam commands running in the background and upon inspection I realised they were downgrading most of the packages. Mirage itself is downgraded to 0.5.

Can you try to install the aspcud external solver via "apt-get install aspcud".  It should be available in both versions of Ubuntu you tried.  I promoted aspcud to a recommended dependency in the Debian package, but will file an Ubuntu bug to do the same as well.  I have an odd feeling that you already have aspcud though, since the error below reports an inconsistent result.

Some points I've noted as feedback from a total newbie:
- There is no verbose switch on the mirage command. When it hangs for a long while I get curious.

Yep, I've got a trivial local patch to fix this out that I'll push.   You can also just set the OPAMVERBOSE environment variable as a workaround.

- opam reports mirage at version 1.1.2, but mirage --version outputs 1.1.0.

Fixed locally too (really need to automate that in the build system).

- opam apparently isn't transactional, despite the mirage command failing I'm left with an utterly broken system?

OPAM does do error recovery by going back to the original patchset, but possibly not if the external solver failure is messing up its notion of the universe.  In normal use it will perform error recovery with the original set of packages being reinstalled.

- It doesn't seem like opam caches anything, I spend a lot of time waiting for downloads. Any simple way to speed this up?

Much of this has been improved in OPAM 1.2dev, which will be released soon-ish. e.g.:

I get a lot of these "external solver failed with inconsistentt result". Here's an example from running "opam install mirage" after it has been uninstalled by the stackv4 example:

$ opam install mirage
[WARNING] External solver failed with inconsistent return value. Request saved to "/home/vagrant/.opam/log/solver-error-29875-1.cudf"
Falling back to the internal heuristic.
The following actions will be performed:
 - remove tuntap.0.7.0
 - remove ocplib-endian.0.3
 - remove uri.1.6.0
 - remove fieldslib.109.20.03
 - remove ipaddr.2.2.0
 - remove optcomp.1.5
 - remove re.1.2.1
 - remove sexplib.110.01.00
 - remove stringext.0.0.1
 - remove type_conv.109.53.02
 - install cstruct.0.4.0 [required by mirage]
 - install lwt.2.4.3 [required by mirage]
 - install xenstore.1.0.0 [required by mirage]
 - install mirage.0.5.0
4 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 10 to remove
Do you want to continue ? [Y/n] 

Now, mirage 0.5 clearly isn't what I want, so I typically end up deleting the .opam folder and restarting from scratch. This is tedious to say the least.

I've tried this on Ubuntu 12.04 and 14.04 (both 64 bit).

Thanks for the useful feedback!

-a


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


_______________________________________________
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®.