Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade the C layout of io-page according to MirageOS 3/4 #62

Merged
merged 6 commits into from
Mar 18, 2021

Conversation

dinosaure
Copy link
Member

According to the plan of MirageOS 4 and the current status of io-page, this PR proposes to upgrade the project to the usual C layout to be compatible with MirageOS 3 and be ready for MirageOS 4.

@dinosaure
Copy link
Member Author

I got an error on alpine:

ld: /home/opam/.opam/4.08/lib/pkgconfig/../../lib/ocaml-freestanding/libasmrun.a(startup_aux_n.o):/home/opam/.opam/4.08/.opam-switch/build/ocaml-freestanding.0.6.4/ocaml/runtime/startup_aux.c:35: multiple definition of `caml_atom_table'; /home/opam/.opam/4.08/lib/pkgconfig/../../lib/ocaml-freestanding/libasmrun.a(startup_nat_n.o):/home/opam/.opam/4.08/.opam-switch/build/ocaml-freestanding.0.6.4/ocaml/runtime/startup_nat.c:47: first defined here
run ['ld' '-nostdlib' '-z' 'max-page-size=0x1000' '-static' '-T'
     '/home/opam/.opam/4.08/lib/pkgconfig/../../lib/solo5-bindings-hvt/solo5_hvt.lds'
     '/home/opam/.opam/4.08/lib/pkgconfig/../../lib/solo5-bindings-hvt/solo5_hvt.o'
     '_build/main.native.o' '_build/manifest.o'
     '-L/home/opam/.opam/4.08/lib/io-page'
     '-l:libiopage_freestanding_stubs.a'
     '/home/opam/.opam/4.08/lib/pkgconfig/../../lib/mirage-solo5/libmirage-solo5_bindings.a'
     '-L/home/opam/.opam/4.08/lib/pkgconfig/../../lib/ocaml-freestanding'
     '-lasmrun' '-lnolibc' '-lopenlibm' '-o' 'io_page.hvt']: exited with 1
run ['dune' 'exec' '--root' '/repo/unikernel' '--' './config.exe' 'build']: exited with 1

But I can not reproduce it on my Ubuntu. Seems like a magic link error 😕 .

@dinosaure dinosaure merged commit 9d0e869 into master Mar 18, 2021
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Mar 22, 2021
CHANGES:

* Use workspace flags (@TheLortex, mirage/io-page#60)
* Use ocamlformat (@TheLortex, mirage/io-page#60)
* **breaking changes** Remove io-page-xen and io-page-unix split (@samoht, mirage/io-page#60)
* Update CI scripts (@samoht, mirage/io-page#60)
* **breaking changes** Update the C layout of io-page according MirageOS 3/4 (@dinosaure, mirage/io-page#62)
  JS/C functions are renamed from `mirage_*` to `caml_mirage_iopage_*`
* Add ocaml-freestanding and pkg-config as dependencies of `io-page`
  To be able to 'cross'-compile to Solo5
dinosaure added a commit to dinosaure/opam-repository that referenced this pull request Mar 22, 2021
CHANGES:

* Use workspace flags (@TheLortex, mirage/io-page#60)
* Use ocamlformat (@TheLortex, mirage/io-page#60)
* **breaking changes** Remove io-page-xen and io-page-unix split (@samoht, mirage/io-page#60)
* Update CI scripts (@samoht, mirage/io-page#60)
* **breaking changes** Update the C layout of io-page according MirageOS 3/4 (@dinosaure, mirage/io-page#62)
  JS/C functions are renamed from `mirage_*` to `caml_mirage_iopage_*`
* Add ocaml-freestanding and pkg-config as dependencies of `io-page`
  To be able to 'cross'-compile to Solo5
@hannesm hannesm deleted the layout-c branch April 7, 2022 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant