Skip to content
This repository was archived by the owner on Oct 18, 2020. It is now read-only.

Fix 4.08 support wrt changes beta2#209

Closed
anmonteiro wants to merge 1 commit into
mirage:masterfrom
anmonteiro:anmonteiro/4.08-mmap-support
Closed

Fix 4.08 support wrt changes beta2#209
anmonteiro wants to merge 1 commit into
mirage:masterfrom
anmonteiro:anmonteiro/4.08-mmap-support

Conversation

@anmonteiro
Copy link
Copy Markdown
Contributor

Following up on ocaml/ocaml#2263 (comment), this PR fixes OCaml 4.08 support via https://github.com/mirage/mmap

Comment thread xen-ocaml/build.sh
cd ../../..
;;
4.08.*)
cp `ocamlfind query mmap`/libmmap_stubs.a libxenotherlibs.a
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@diml I think in mirage-platform we only need the stubs (mmap.o and mmap_ba.o). Is this the right way to do it, or is libmmap_stubs.a a name private to Dune?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you need these C functions in a xen-MirageOS-kernel, you'll need to cross-compile them with appropriate CFLAGS and includes. see https://github.com/mirage/checkseum / https://github.com/inhabitedtype/bigstringaf on how to do this.

@hannesm
Copy link
Copy Markdown
Member

hannesm commented Mar 16, 2019

uhm, why do we need mmap / Unix.map_file at all in MirageOS? at least in ocaml-freestanding we got rid of libotherlibs.a since 4.07.0 (when Bigarray was moved to stdlib). (NOTE: I've not yet investigated what needs to be changed in ocaml-freestanding for 4.08.0, mainly because the whole ppx (ocaml-migrate-parsetree) is still unsupported (and I neither have time nor energy to look into that) -- but I hope it'll become easier (i.e. remove more things) than harder (introduce more dependencies)).

The changes/modifications for supporting 4.06.0 and 4.07.0 in ocaml-freestanding are different than the changes here, which are copying the pre-4.06.0 behaviour (see mirage/ocaml-solo5#27 and mirage/ocaml-solo5#39 if you're interested). There's as well @yomimono's work on rebasing mirage-xen support onto ocaml-freestanding (and using unikraft, see https://github.com/yomimono/ocaml-freestanding/tree/xen-on-freestanding and #199) -- so maybe it is also not worth to investigate this further.

@anmonteiro
Copy link
Copy Markdown
Contributor Author

uhm, why do we need mmap / Unix.map_file at all in MirageOS? at least in ocaml-freestanding we got rid of libotherlibs.a since 4.07.0 (when Bigarray was moved to stdlib).

Interesting. Perhaps this is not needed at all! I don't know what I'm doing most of the time 🙃

I've not yet investigated what needs to be changed in ocaml-freestanding for 4.08.0, mainly because the whole ppx (ocaml-migrate-parsetree) is still unsupported

That's also why I haven't been able to test this much. Lwt depends on some PPX for building which depends on OMP

There's as well @yomimono's work on rebasing mirage-xen support onto ocaml-freestanding (and using unikraft, see https://github.com/yomimono/ocaml-freestanding/tree/xen-on-freestanding and #199) -- so maybe it is also not worth to investigate this further.

Indeed. Happy to drop this PR if there's other ways of getting OCaml 4.08 to run on Xen.

@avsm
Copy link
Copy Markdown
Member

avsm commented Jun 25, 2019

Closed due to #211

@avsm avsm closed this Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants