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

Re: Building mirage-www



Hi,

I have followed the latest installation instructions (Aug-10-2013):


I -  got 2 compiler switches:
====================
$ opam switch mirage-unix -a system
$ eval `opam config env`
$ opam install mirari mirage-net-direct

$ opam switch mirage-xen -a system
$ eval `opam config env`
$ opam install mirari mirage-xen

Question 1
========
Is this OK or should I install one of them at a time, the first one is for Unix backend and the second one for Xen Unikernel?

II - make unix-socket-build failed
=======================
Then cloned mirage-www and tried to build mirage-www without success, because of conflict.
(Please see the console output appended below)

Question 2
========
Why do I have so many conflicting packages:

  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.1.
  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.2.
  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.3.
  - The package mirage-net-socket.0.9.2 is in conflict with mirage-xen.0.9.3.
  - The package mirage-net-socket.0.9.3 is in conflict with mirage-xen.0.9.3.
  - The package mirage-unix.0.9.2 is in conflict with mirage-xen.0.9.1.
  - The package mirage-unix.0.9.2 is in conflict with mirage-xen.0.9.2.
  - The package mirage-unix.0.9.3 is in conflict with mirage-xen.0.9.1.
  - The package mirage-unix.0.9.3 is in conflict with mirage-xen.0.9.2.
  - The package mirage-xen.0.9.1 is in conflict with mirage-unix.0.9.1.
  - The package mirage-xen.0.9.2 is in conflict with mirage-unix.0.9.1.
  - The package mirage-xen.0.9.3 is in conflict with mirage-unix.0.9.1.

III - make clean xen-build failed
=======================
I then tried to build the Website as a Xen Unikernel without success because 'install cow.0.6.2' failed because of this error:

/usr/bin/ocamldep -pp camlp4orf -modules pa_ulex.ml > pa_ulex.ml.depends
+ /usr/bin/ocamldep -pp camlp4orf -modules pa_ulex.ml > pa_ulex.ml.depends
sh: 1: camlp4orf: not found
Preprocessing error on file pa_ulex.ml
Command exited with code 2.
make[2]: Leaving directory `/home/phiho/.opam/mirage-xen/build/ulex.1.1'

Question3
=======
Which opam package  do I need to install to resolve this issue?

I really wish if I could successfully build a simple Xen Unikernel using mirari.


Thank you for your help.

Regards,

PhiHo

 
#
# make unix-socket-build failed
#
$ cd mirage-www
$ make unix-socket-build
make FLAGS="--unix --socket" build
make[1]: Entering directory `/home/phiho/mirage-www'
cd src && mirari configure www.conf --unix --socket
[mirari] Using specified config file www.conf
[mirari] Generating ./main.ml.
[mirari] + creating ./backend.ml
[mirari] + Executing: opam install --yes mirage-unix mirage-net-socket cohttp cow mirage-fs mirage-net uri xmlm
Package xmlm is already installed (current version is 1.1.1)
Package uri is already installed (current version is 1.3.8)
Package mirage-net is already installed (current version is 0.9.3)
Package mirage-fs is already installed (current version is 0.6.0)
Package cohttp is already installed (current version is 0.9.10)
Your request cannot be satisfied:
  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.1.
  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.2.
  - The package mirage-net-socket.0.9.1 is in conflict with mirage-net-direct.0.9.3.
  - The package mirage-net-socket.0.9.2 is in conflict with mirage-xen.0.9.3.
  - The package mirage-net-socket.0.9.3 is in conflict with mirage-xen.0.9.3.
  - The package mirage-unix.0.9.2 is in conflict with mirage-xen.0.9.1.
  - The package mirage-unix.0.9.2 is in conflict with mirage-xen.0.9.2.
  - The package mirage-unix.0.9.3 is in conflict with mirage-xen.0.9.1.
  - The package mirage-unix.0.9.3 is in conflict with mirage-xen.0.9.2.
  - The package mirage-xen.0.9.1 is in conflict with mirage-unix.0.9.1.
  - The package mirage-xen.0.9.2 is in conflict with mirage-unix.0.9.1.
  - The package mirage-xen.0.9.3 is in conflict with mirage-unix.0.9.1.
'opam install --yes mirage-unix mirage-net-socket cohttp cow mirage-fs mirage-net uri xmlm' failed.
[mirari] ERROR: The command "opam install --yes mirage-unix mirage-net-socket cohttp cow mirage-fs mirage-net uri xmlm" exited with code 3.
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/home/phiho/mirage-www'
make: *** [unix-socket-build] Error 2

#
# make clean xen-build failed
#
$ opam switch mirage-xen
$ eval `opam config env`
$ opam install mirari
Package mirari is already installed (current version is 0.9.6)
...
...
=-=-= Installing ulex.1.1 =-=-=
The archive for ulex.1.1 is in the local cache.
Extracting /home/phiho/.opam/archives/ulex.1.1+opam.tar.gz.
Building ulex.1.1:
  make
  make all.opt
  make install
The compilation of ulex.1.1 failed.
Uninstalling ulex.1.1:
  ocamlfind remove ulex

Due to some errors while processing ulex.1.1, the following actions will NOT be proceeded:
 - install cow.0.6.2

==== ERROR [while installing ulex.1.1] ====
# opam-version    1.0.0
# os              linux
# command         make
# path            /home/phiho/.opam/mirage-xen/build/ulex.1.1
# exit-code       2
# env-file        /home/phiho/.opam/mirage-xen/build/ulex.1.1/ulex-ffb3fd.env
# stdout-file     /home/phiho/.opam/mirage-xen/build/ulex.1.1/ulex-ffb3fd.out
# stderr-file     /home/phiho/.opam/mirage-xen/build/ulex.1.1/ulex-ffb3fd.err
### stdout ###
make[2]: Entering directory `/home/phiho/.opam/mirage-xen/build/ulex.1.1'
ocamlbuild -byte-plugin pa_ulex.cma ulexing.cma
/usr/bin/ocamlc -I /usr/lib/ocaml/ocamlbuild unix.cma /usr/lib/ocaml/ocamlbuild/ocamlbuildlib.cma myocamlbuild.ml /usr/lib/ocaml/ocamlbuild/ocamlbuild.cmo -o myocamlbuild
/usr/bin/ocamldep -pp camlp4orf -modules pa_ulex.ml > pa_ulex.ml.depends
+ /usr/bin/ocamldep -pp camlp4orf -modules pa_ulex.ml > pa_ulex.ml.depends
sh: 1: camlp4orf: not found
Preprocessing error on file pa_ulex.ml
Command exited with code 2.
make[2]: Leaving directory `/home/phiho/.opam/mirage-xen/build/ulex.1.1'
### stderr ###
make[2]: *** [all] Error 10

'opam install --yes mirage-xen mirage-net-direct cohttp cow mirage-fs mirage-net uri xmlm' failed.
[mirari] ERROR: The command "opam install --yes mirage-xen mirage-net-direct cohttp cow mirage-fs mirage-net uri xmlm" exited with code 4.
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/home/phiho/mirage-www'
make: *** [xen-build] Error 2





On Mon, Aug 5, 2013 at 7:53 PM, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
The reason this is happening is a sudo feature called "env_keep", which resets environment variables after you sudo for security reasons.

One casualty of this is OPAM, which normally installs binaries in ~/.opam/<compiler>/bin and adds it to the user PATH.  However, when you are sudoing, the PATH is reset to the root default one, and thus mirari (installed by OPAM) cannot be found.

And when you don't sudo, you don't have sufficient privileges to open the tuntap device.  You can either fix this by giving yourself the right capabilities from your normal user to access the relevant resource, or by moving the mirari binary to somewhere visible within the global PATH for root (e.g. /usr/local/bin/mirari).

We should fix this in the Makefiles, but I'm not quite sure what the best way to do this is, as Mirari is one of the only host tools that has this problem.  Thomas, any thoughts on this "binary promotion"?

-anil


 


Rackspace

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