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

Port app-click to use musl #4

Closed
wants to merge 1 commit into from
Closed

Conversation

MekalBoy
Copy link
Contributor

Supposed to address this issue: ##3

Tried to test its correctness by cloning the Unikraft repository under .unikraft/unikraft and the dependencies (lib-lwip, lib-musl, lib-click) under .unikraft/libs and then properly setting them up with make menuconfig from the base folder.

Unfortunately after configuration there is a loop that pops up during make or make prepare:

which: no time in (/home/mekal/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin)
CP config
ELEMMK libclick: .elementsmk

@eduardvintila
Copy link
Member

eduardvintila commented Jul 15, 2023

Good job - try to apply the changes from this PR in order to solve the infinite loop at build time. You'll probably encounter more errors which need to be fixed with another PR on the lib-click repo

@MekalBoy
Copy link
Contributor Author

MekalBoy commented Jul 15, 2023

EDIT: It seems the problem already has been reported before, there is an issue with lib-click that prevents building.

/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/unikraft/include/uk/arch/ctx.h:96:58: error: designator order for field ‘ukarch_ctx::ip’ does not match declaration order in ‘ukarch_ctx’
In file included from /home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc:58:
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc: In function ‘String* get_config()’:
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc:162:43: error: cannot convert ‘ukplat_memregion_desc*’ to ‘ukplat_memregion_desc**’
  162 |         if (ukplat_memregion_find_initrd0(&img) >= 0) {
      |                                           ^~~~
      |                                           |
      |                                           ukplat_memregion_desc*
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/unikraft/include/uk/plat/memory.h:204:67: note: in definition of macro ‘ukplat_memregion_find_initrd0’
  204 |         ukplat_memregion_find_next(-1, UKPLAT_MEMRT_INITRD, 0, 0, mrd)
      |                                                                   ^~~
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/unikraft/include/uk/plat/memory.h:152:59: note:   initializing argument 5 of ‘int ukplat_memregion_find_next(int, __u32, __u32, __u32, ukplat_memregion_desc**)’
  152 |                            struct ukplat_memregion_desc **mrd)
      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc:163:36: error: ‘struct ukplat_memregion_desc’ has no member named ‘base’; did you mean ‘pbase’?
  163 |                 cstr = (char *)img.base;
      |                                    ^~~~
      |                                    pbase
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc: In function ‘int main(int, char**)’:
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc:424:18: error: ‘uk_thread_create’ was not declared in this scope; did you mean ‘uk_thread_wake’?
  424 |         router = uk_thread_create("click-router", router_thread, 0);
      |                  ^~~~~~~~~~~~~~~~
      |                  uk_thread_wake
/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/libs/click/click.cc:425:9: error: ‘uk_thread_wait’ was not declared in this scope; did you mean ‘uk_thread_wake’?
  425 |         uk_thread_wait(router);
      |         ^~~~~~~~~~~~~~
      |         uk_thread_wake
make[2]: *** [/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/unikraft/support/build/Makefile.build:27: /home/mekal/Facultate/usoc/hackathon/app-click/build/libclick/click.o] Error 1
make[1]: *** [Makefile:1033: sub-make] Error 2
make[1]: Leaving directory '/home/mekal/Facultate/usoc/hackathon/app-click/.unikraft/unikraft'
make: *** [Makefile:6: all] Error 2

Yep, plenty more errors now that the loop was fixed.

Update Makefile* and kraft.yaml to use Musl instead of Newlib as the
default libc.

Signed-off-by: Tache Robert <tacheandu@gmail.com>
Github-Closes: unikraft#3
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

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

All good, thank you @MekalBoy.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com

Copy link

@RaduNichita RaduNichita left a comment

Choose a reason for hiding this comment

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

All good from my side.

Reviewed-by: Radu Nichita radunichita99@gmail.com
Approved-by: Radu Nichita radunichita99@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants