<div dir="ltr"><br><br><div class="gmail_quote">Le mer. 20 mai 2015 à 12:02, Martin Lucina <<a href="mailto:martin@lucina.net">martin@lucina.net</a>> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tuesday, 19.05.2015 at 15:58, Martin Lucina wrote:<br>
> > >E: Failure("Expected built file '_build/src/unix/dlllwt-unix_stubs.so'<br>
> > >doesn't exist.")<br>
> > ><br>
> > >This is expected; the rumprun toolchain does not support dynamic<br>
> > >linking<br>
> > >and I have configured the ocaml-rumprun compiler with<br>
> > >-no-shared-libs. Is<br>
> > >there some way to tell OASIS to not expect any shared libraries to be<br>
> > >built?<br>
> ><br>
> > Nope. OASIS is painfully inflexible, especially when cross-compiling.<br>
> > You can probably patch <a href="http://setup.ml" target="_blank">setup.ml</a> so that it thinks that the current<br>
> > OCaml is built without dynlink, but this is package-specific.<br>
><br>
> Turns out it's a two-line patch, at least in the case of Lwt:<br>
><br>
> <a href="https://github.com/mato/opam-rumprun/commit/3d3a9f0b46a21370c7b619e14cbfddec90acf433" target="_blank">https://github.com/mato/opam-rumprun/commit/3d3a9f0b46a21370c7b619e14cbfddec90acf433</a><br>
<br>
Getting further through the list of Mirage dependencies, trying to get<br>
sexplib building for rumprun hits another different problem with OASIS:<br>
<br>
I use the following commands to build sexplib-rumprun, similar to what the<br>
android build does:<br>
<br>
  ["ocaml" "<a href="http://setup.ml" target="_blank">setup.ml</a>" "-configure" "--prefix" "${prefix}/x86_64-rumprun-netbsd" "--disable-syntax"]<br>
  ["ocamlbuild" "-use-ocamlfind" "-just-plugin"]<br>
  ["env" "OCAMLFIND_TOOLCHAIN=rumprun" "ocaml" "<a href="http://setup.ml" target="_blank">setup.ml</a>" "-build"]<br>
  ["env" "OCAMLFIND_TOOLCHAIN=rumprun" "ocaml" "<a href="http://setup.ml" target="_blank">setup.ml</a>" "-install"]<br>
  ["find" sexplib:lib "-name" "pa_sexp_conv.*" "-exec" "ln" "-sf" "{}" "%{prefix}%/x86_64-rumprun-netbsd/lib/sexplib/" ";"] { type_conv-rumprun:installed }<br>
<br>
Now, sexplib tries to build a .cmxs which won't work with the rumprun<br>
toolchain, so I've patched its <a href="http://setup.ml" target="_blank">setup.ml</a> to force native_dynlink to be<br>
false:<br>
<br>
<a href="https://github.com/mato/opam-rumprun/blob/master/packages/sexplib-rumprun.112.24.01/files/patches/oasis-disable-dynlink.patch" target="_blank">https://github.com/mato/opam-rumprun/blob/master/packages/sexplib-rumprun.112.24.01/files/patches/oasis-disable-dynlink.patch</a><br>
<br></blockquote><div><br></div><div>I think it would be far easier to add '--override native_dynlink false' to the configure step.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The problem I'm seeing is that if I run "opam install sexplib-rumprun<br>
--verbose", it fails in the <a href="http://setup.ml" target="_blank">setup.ml</a> -install setup with a stack overflow:<br>
<br>
- Installed /home/mato/.opam/system/x86_64-rumprun-netbsd/lib/sexplib_unix/sexplib_unix.cmx<br>
- Installed /home/mato/.opam/system/x86_64-rumprun-netbsd/lib/sexplib_unix/META<br>
- E: Stack overflow<br>
[ERROR] The compilation of sexplib-rumprun failed at "env<br>
        OCAMLFIND_TOOLCHAIN=rumprun ocaml <a href="http://setup.ml" target="_blank">setup.ml</a> -install".<br>
<br>
However: If I run the OPAM build commands from a shell in the build<br>
directory for sexplib, the install step works fine.<br>
<br>
Any ideas?<br>
<br>
Martin<br>
</blockquote></div></div>