|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Cross-compiling OCaml, Mirage OS for rumprun, OPAM integration
On 2015-05-19 11:50, Martin Lucina wrote: Rumprun provides a unikernel stack with a POSIXy (NetBSD-HEAD) userspaceand can run on Xen, QEMU/KVM, bare metal and POSIX userspace. Theresulting Mirage + rumprun unikernel will thus be able to run on all of theplatforms rumprun supports. Nice!
No. This is an issue with Lwt's discover.ml script. You're going in the right direction below, though using --enable-android-target for this is a bit awkward. I tried to hack around the problem by using --enable-android-target, that Nope. OASIS is painfully inflexible, especially when cross-compiling. You can probably patch setup.ml so that it thinks that the current OCaml is built without dynlink, but this is package-specific. General questions: 1) Is this the right strategy for building an OCaml cross-compiler and integrating with OPAM? AFAICS there are multiple approaches being used in the wild and OCaml upstream *claims* to include support for cross-compiling via -host and -target, however that support is not actually functional? Cross-compiling is not there yet. The switches are only half functional, if you're lucky. For the rumprun support to be as user-friendly as possible, we need an easyway of switching the backend rumprun cross-compiler and linker used by ocaml when the user wants to switch platforms or architectures. Theapproach used by the android repository I based my work off implies either:a) the user would have to *reinstall* the cross compiler (specifying eg. RUMPRUN_CC in the environment) and all packages using native code wheneverthey want to switch the backend compiler. Correct. This is what opam-android uses. b) we would have to provide different opam packages of the compiler and native libraries (Lwt) for each platform/arch combination supported by rumprun. This is unmanageable. This could be done with a script (horrible but functional).There was some talk over teaching OPAM that one package might be installed in several 'variants', but there is no code to do that yet at all, and it will probably be a substantial amount of work to integrate this with the dependency solver. opam-android would /greatly/ benefit from that as well, for much the same reasons. 2) Is there an easy way to switch ocamlc and the various other parts of thebuild system(s) involved into a verbose mode so that I can see what compilers are being invoked and why they fail? At the moment I'm using `strace' for this :-/ ocamlfind c -verbose; ocamlc -verbose All ideas and help much appreciated, Cheers, Martin [1] http://wiki.rumpkernel.org/Repo%3A-rumprun [2] https://github.com/whitequark/opam-android -- Peter Zotov _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |