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

Re: oasis setup error for xen



I'm not sure about this without seeing more information. The cohttp
package in OPAM has mirage as an optional dependency.  However, if you do
install mirage and already have cohttp installed, it will automatically
recompile cohttp so that the new dependency is picked up.

In other words, just do:

$ opam install mirage-net

and see if cohttp is recompiled with cohttp.mirage.

If that doesn't work, then I'd suggest opening up a bug on
http://github.com/OCamlPro/opam-repository with your package list, so that
we can try to reproduce.

Note that changing the cohttp.mirage in _oasis won't do any good.  The
Mirage sub-package is the one which links to the Mirage networking
library, and is different from the UNIX one (which would use syscalls
instead of direct library calls to the Mirage networking stack).

cheers
Anil

On Mon, Dec 24, 2012 at 03:49:21PM -0000, Yiming Zhang wrote:
> Anil,
> 
> Thanks for your help. I have successfully run the "hello" example in Xen. 
> 
> About mirage-www, I disabled the "Target" line and oasis works fine.
> However, when I make mirage-www in 4.00.1+mirage-xen, it said "ocamlfind:
> Package `cohttp.mirage' not found". This is strange because I have done the
> same thing in 4.00.1+annot. I ran "ocamlfind query cohttp.mirage" in both
> systems, and got different results (shown below). Is it a bug for cohttp in
> 4.00.1+mirage-xen?
> 
> In 4.00.1+mirage-xen:
> root@zym:~# ocamlfind query cohttp.mirage
> ocamlfind: Package `cohttp.mirage' not found
> root@zym:~# ocamlfind query cohttp
> /root/.opam/4.00.1+mirage-xen/lib/cohttp
> 
> In 4.00.1+annot:
> root@zym:~# ocamlfind query cohttp.mirage
> /root/.opam/4.00.1+annot/lib/cohttp
> root@zym:~# ocamlfind query cohttp
> /root/.opam/4.00.1+annot/lib/cohttp
> 
> I tried to work around it by changing "cohttp.mirage" to "cohttp" in _oasis,
> but unfortunately another problem occurred: "Error: Unbound module
> Cohttp_lwt_mirage". 
> 
> Merry Christmas!
> Yiming
> 
> -----????????-----
> ??????: Anil Madhavapeddy [mailto:anil@xxxxxxxxxx] 
> ????????: 2012??12??24?? 2:18
> ??????: Yiming Zhang
> ????: cl-mirage@xxxxxxxxxxxxxxx
> ????: Re: oasis setup error for xen
> 
> Hi Yiming,
> 
> The OASIS setup isn't needed as the files that are autogenerated are also
> checked in, so it should compile straight from a checkout.  However, read on
> to find out more...
> 
> The OASIS in question is actually a patched version that supports the
> 'Executable: xen' target, from github.com/avsm/oasis (add-xen branch).
> We're currently upstreaming only a portion of this patch:
> https://github.com/ocaml/oasis/pull/7
> 
> ...which is sufficient to output a standalone native object file. This uses
> the -output-obj facility of the OCaml compiler to link all the OCaml modules
> into one native code blob, but to not output a final binary.  This lets us
> do the final link under more controlled conditions.
> 
> Recent versions of mirage-platform then bring back the `mir-build` script,
> which converts the native object file into a Xen microkernel.  This two-step
> process makes it far easier to incorporate other backends such as the
> kFreeBSD target in the future.
> 
> The 'hello world' Mirage skeleton is in:
> http://github.com/mirage/mirage-skeleton
> 
> I'm assembling a bit more detail in the README there (and hopefully Jon
> Ludlam will commit a suspend/resume-aware version into that repository after
> the holidays too).  Once these new scripts settle down and the OASIS patch
> is upstreamed, I'll sync mirage-www with it.
> 
> -anil
> 
> On 22 Dec 2012, at 21:23, Yiming Zhang <sdiris@xxxxxxxxx> wrote:
> 
> > Dear all,
> >  
> > I am trying to compile mirage-www for running directly in xen. However,
> when I run ??oasis setup?? (I guess it is needed), I got the following
> error:
> >  
> > root@zym:~/src/mirage-www/src# oasis setup
> > E: Field Target is not defined in schema Executable
> >  
> > I checked the _oasis file and found one line:
> > Target:             xen
> >  
> > But it seems oasis doesn??t support the ??Target?? field. Anyone knows the
> problem?
> >  
> > Thanks!
> > Yiming
> 

-- 
Anil Madhavapeddy                                 http://anil.recoil.org



 


Rackspace

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