unikraft / app-elfloader

Load and execute Linux ELF binaries
24 stars 31 forks source link

Error while adding support for http_server cpp #34

Closed chococandy63 closed 1 year ago

chococandy63 commented 1 year ago

Issue https://github.com/unikraft/app-elfloader/pull/32

Reproduce an error

Inside the app-elfloader directory, run the generate.py script ./scripts/generate.py.

Find scripts in the scripts/run/ directory named qemu-x86_64-9pfs-http_server.sh.

Build the elfloader by running ./scripts/build/make-qemu-x86_64-9pfs.sh, showed the following error-

[chococandy@fedora app-elfloader]$ ./scripts/build/make-qemu-x86_64-9pfs.sh
make[1]: Entering directory '/home/chococandy/unikraft-devel/app-elfloader'
make[1]: *** /home/chococandy/unikraft-devel/app-elfloader/workdir/unikraft: No such file or directory.  Stop.
make[1]: Leaving directory '/home/chococandy/unikraft-devel/app-elfloader'
make: *** [Makefile:24: distclean] Error 2
make[1]: Entering directory '/home/chococandy/unikraft-devel/app-elfloader'
make[1]: *** /home/chococandy/unikraft-devel/app-elfloader/workdir/unikraft: No such file or directory.  Stop.
make[1]: Leaving directory '/home/chococandy/unikraft-devel/app-elfloader'
make: *** [Makefile:24: defconfig] Error 2
make[1]: Entering directory '/home/chococandy/unikraft-devel/app-elfloader'
make[1]: *** /home/chococandy/unikraft-devel/app-elfloader/workdir/unikraft: No such file or directory.  Stop.
make[1]: Leaving directory '/home/chococandy/unikraft-devel/app-elfloader'
make: *** [Makefile:24: prepare] Error 2
make[1]: Entering directory '/home/chococandy/unikraft-devel/app-elfloader'
make[1]: *** /home/chococandy/unikraft-devel/app-elfloader/workdir/unikraft: No such file or directory.  Stop.
make[1]: Leaving directory '/home/chococandy/unikraft-devel/app-elfloader'
make: *** [Makefile:21: all] Error 2

Then, running ./scripts/run/qemu-x86_64-9pfs-http_server.sh showed the error below-

[chococandy@fedora app-elfloader]$ ./scripts/run/qemu-x86_64-9pfs-http_server.sh
E  machine(s) not found
E  machine(s) not found
qemu: could not open kernel file 'workdir/build/elfloader_qemu-x86_64': No such file or directory
razvand commented 1 year ago

@chococandy63 , you have to clone unikraft and support libraries, as advised in the "Set Up" section in README.md. Please see if that works and then we will close this issue,

chococandy63 commented 1 year ago

@razvand I am using Fedora Virtual Machine, ./scripts/build/make-qemu-x86_64-9pfs.sh was showing errors related to yacc but after running export YACC=/usr/bin/bison it worked successfully. But, this command ./scripts/run/qemu-x86_64-9pfs-http_server.sh is still showing errors- it says machine not found and then shows this

console
SeaBIOS (version 1.16.2-1.fc38)

iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+02FCBFD0+02F0BFD0 CA00

Booting from ROM..[    0.000000] CRIT: [libkvmplat] <paging.c @  541> Assertion failure: ukarch_paddr_range_isvalid(paddr, paddr + len)

What could be the reason? It seems like something related to kvm.

Btw, the fedora yacc issue is really creating problem so should I create an issue for fixing it on Unikraft repo? Could you please guide me on that.

razvand commented 1 year ago

Yes, please create an issue regarding yacc.

Yes, create an issue related to the machine build.

Close this issue, as it's not an actual problem.

chococandy63 commented 1 year ago

Thank you!