Closed bobd988 closed 2 years ago
@tpmccallum Have you encountered this issue? Thanks.
I was able to build it on GitHub Actions' Ubuntu 20.04 image. See here:
https://github.com/second-state/wasmedge-seL4/runs/3976731681?check_suite_focus=true
I understand GitHub Actions' image has dev tools pre-installed. Here is a list of apt packages it pre-installed. Noticeably, it has Python3 pre-installed.
I will update the documentation to reflect this.
Hi My installation is not on a clean machine; it already has a lot of dev packages and Python2 & Python3 etc. I think you have covered off any dependencies with that list of apt packages from the GitHub image.
I can spin up a new Ubuntu 20 to pinpoint only the necessary packages if that is desired.
@bobd988 has @juntao's response enabled you to get it working? Please reply here if you need more assistance.
Thanks Tim
I built from the provided docker and some errors during build. Here is steps:
docker pull wasmedge/sel4_build
$ docker run --rm -v $(pwd):/app -it wasmedge/sel4_build
from docker, created a home folder, then run blow
I copied last portion to see if these helps. Originally I tested with a 16G laptop. After got errrors I changed to another 64G memory Ubuntu 18 Laptop. Both give errors
| ^~~~~~~~~~~~~~~~~~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/atomic:789:5: warning: always_inline function might not be inlinable [-Wattributes]
789 | _Tp cxx_atomic_exchange(volatile cxx_atomic_base_impl<_Tp> __a,
| ^~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/atomic:780:5: warning: always_inline function might not be inlinable [-Wattributes]
780 | _Tp cxx_atomic_load(const cxx_atomic_base_impl<_Tp> a, memory_order __order) {
| ^~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/atomic:770:5: warning: always_inline function might not be inlinable [-Wattributes]
770 | _Tp cxx_atomic_load(const volatile cxx_atomic_base_impl<_Tp>* a,
| ^~~~~
In file included from /root/home/sel4_wasmedge/build/include/c++/v1/memory:673,
from /root/home/sel4_wasmedge/build/include/c++/v1/algorithm:653,
from /root/home/sel4_wasmedge/build/include/c++/v1/bit_reference:15,
from /root/home/sel4_wasmedge/build/include/c++/v1/vector:276,
from /root/home/sel4_wasmedge/projects/wasmedge/lib/api/wasmedge.cpp:3:
/root/home/sel4_wasmedge/build/include/c++/v1/new:243:6: warning: always_inline function might not be inlinable [-Wattributes]
243 | void __libcpp_operator_delete(_Args ...args) {
| ^~~~~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/new:243:6: warning: always_inline function might not be inlinable [-Wattributes]
/root/home/sel4_wasmedge/build/include/c++/v1/new:266:6: warning: always_inline function might not be inlinable [-Wattributes]
266 | void do_deallocate_handle_size(void *__ptr, size_t size, _Args ...args) {
| ^~~~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/new:266:6: warning: always_inline function might not be inlinable [-Wattributes]
/root/home/sel4_wasmedge/build/include/c++/v1/new:233:7: warning: always_inline function might not be inlinable [-Wattributes]
233 | void* libcpp_operator_new(_Args ...__args) {
| ^~~~~
/root/home/sel4_wasmedge/build/include/c++/v1/new:233:7: warning: always_inline function might not be inlinable [-Wattributes]
[640/719] Performing download step (git clone) for 'checkout_linux'
Cloning into 'linux_out'...
remote: Enumerating objects: 1722766, done.
remote: Counting objects: 100% (1722766/1722766), done.
remote: Compressing objects: 100% (651160/651160), done.
remote: Total 1722766 (delta 1342902), reused 1403918 (delta 1060211), pack-reused 0
Receiving objects: 100% (1722766/1722766), 1.64 GiB | 8.94 MiB/s, done.
Resolving deltas: 100% (1342902/1342902), done.
Checking connectivity: 1722766, done.
Note: switching to 'v4.9.189'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 4bd718dba65 Linux 4.9.189 [648/719] Generating linux_out/.config.old FAILED: apps/Arm/wasmedge/linux_out/.config.old cd /root/home/sel4_wasmedge/build/apps/Arm/wasmedge/linux_out && bash -c "make oldconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- " && bash -c "make prepare ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- " && bash -c "make modules_prepare ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- " HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o SHIPPED scripts/kconfig/zconf.tab.c SHIPPED scripts/kconfig/zconf.lex.c SHIPPED scripts/kconfig/zconf.hash.c HOSTCC scripts/kconfig/zconf.tab.o HOSTLD scripts/kconfig/conf scripts/kconfig/conf --oldconfig Kconfig #
# scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config/kernel.release UPD include/config/kernel.release WRAP arch/arm64/include/generated/asm/bugs.h WRAP arch/arm64/include/generated/asm/clkdev.h WRAP arch/arm64/include/generated/asm/cputime.h WRAP arch/arm64/include/generated/asm/current.h WRAP arch/arm64/include/generated/asm/delay.h WRAP arch/arm64/include/generated/asm/div64.h WRAP arch/arm64/include/generated/asm/dma.h WRAP arch/arm64/include/generated/asm/dma-contiguous.h WRAP arch/arm64/include/generated/asm/early_ioremap.h WRAP arch/arm64/include/generated/asm/emergency-restart.h WRAP arch/arm64/include/generated/asm/errno.h WRAP arch/arm64/include/generated/asm/hw_irq.h WRAP arch/arm64/include/generated/asm/ioctl.h WRAP arch/arm64/include/generated/asm/ioctls.h WRAP arch/arm64/include/generated/asm/ipcbuf.h WRAP arch/arm64/include/generated/asm/irq_regs.h WRAP arch/arm64/include/generated/asm/kdebug.h WRAP arch/arm64/include/generated/asm/kmap_types.h WRAP arch/arm64/include/generated/asm/kvm_para.h WRAP arch/arm64/include/generated/asm/local.h WRAP arch/arm64/include/generated/asm/local64.h WRAP arch/arm64/include/generated/asm/mcs_spinlock.h WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h WRAP arch/arm64/include/generated/asm/mman.h WRAP arch/arm64/include/generated/asm/msgbuf.h WRAP arch/arm64/include/generated/asm/msi.h WRAP arch/arm64/include/generated/asm/mutex.h WRAP arch/arm64/include/generated/asm/poll.h WRAP arch/arm64/include/generated/asm/preempt.h WRAP arch/arm64/include/generated/asm/resource.h WRAP arch/arm64/include/generated/asm/rwsem.h WRAP arch/arm64/include/generated/asm/segment.h WRAP arch/arm64/include/generated/asm/sembuf.h WRAP arch/arm64/include/generated/asm/serial.h WRAP arch/arm64/include/generated/asm/shmbuf.h WRAP arch/arm64/include/generated/asm/simd.h WRAP arch/arm64/include/generated/asm/sizes.h WRAP arch/arm64/include/generated/asm/socket.h WRAP arch/arm64/include/generated/asm/sockios.h WRAP arch/arm64/include/generated/asm/swab.h WRAP arch/arm64/include/generated/asm/switch_to.h WRAP arch/arm64/include/generated/asm/termbits.h WRAP arch/arm64/include/generated/asm/termios.h WRAP arch/arm64/include/generated/asm/trace_clock.h WRAP arch/arm64/include/generated/asm/types.h WRAP arch/arm64/include/generated/asm/unaligned.h WRAP arch/arm64/include/generated/asm/user.h WRAP arch/arm64/include/generated/asm/vga.h WRAP arch/arm64/include/generated/asm/xor.h WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h CHK include/generated/uapi/linux/version.h UPD include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/bin2c CC kernel/bounds.s CHK include/generated/bounds.h UPD include/generated/bounds.h CHK include/generated/timeconst.h /bin/sh: 1: bc: not found make[1]: [Kbuild:42: include/generated/timeconst.h] Error 127 make: [Makefile:1068: prepare0] Error 2 ninja: build stopped: subcommand failed. root@83f3ba27cdd8:~/home#
it did finish and created a folder sel4_wasmedge , when run ./simulate it gave below errors
root@83f3ba27cdd8:~/home/sel4_wasmedge/build# ./simulate ./simulate: qemu-system-aarch64 -machine virt,virtualization=on,highmem=off,secure=off -cpu cortex-a53 -nographic -m size=2048 -kernel images/capdl-loader-image-arm-qemu-arm-virt qemu-system-aarch64: could not load kernel 'images/capdl-loader-image-arm-qemu-arm-virt'
./simulate: QEMU failed; resetting terminal in 5 seconds--interrupt to abort
Hi @bobd988 We just updated the build.sh to fix some missing command. Please try with the latest build script. Thanks.
Hi, I am trying to build this using the provide docker
docker pull wasmedge/sel4_build
docker run --rm -v $(pwd):/app -it wasmedge/sel4_build
wget -qO- https://raw.githubusercontent.com/second-state/wasmedge-seL4/main/build.sh | bash
and I get this error:
-- Build type: Debug
CMake Warning (dev) at /sel4_wasmedge/projects/wasmedge/cmake/Helper.cmake:72 (add_library):
ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking. Building a STATIC library instead. This may lead
to problems.
Call Stack (most recent call first):
/sel4_wasmedge/projects/wasmedge/lib/api/CMakeLists.txt:61 (wasmedge_add_library)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found WasmEdge: /sel4_wasmedge/projects/wasmedge
-- /sel4_wasmedge/build/ast.pickle is out of date. Regenerating...
-- /sel4_wasmedge/build/camkes-gen.cmake is out of date. Regenerating...
-- Found extra flags for fserv.instance.bin: $<TARGET_PROPERTY:CAmkESComponent_FileServer,COMPONENT_C_FLAGS>;$<TARGET_PROPERTY:CAmkESComponent_FileServer_instance_fserv,COMPONENT_C_FLAGS>
-- Found extra flags for vm0.instance.bin: $<TARGET_PROPERTY:CAmkESComponent_VM,COMPONENT_C_FLAGS>;$<TARGET_PROPERTY:CAmkESComponent_VM_instance_vm0,COMPONENT_C_FLAGS>
-- Found extra flags for wasmedge.instance.bin: $<TARGET_PROPERTY:CAmkESComponent_WasmEdge,COMPONENT_C_FLAGS>;$<TARGET_PROPERTY:CAmkESComponent_WasmEdge_instance_wasmedge,COMPONENT_C_FLAGS>
-- Configuring done
-- Generating done
-- Build files have been written to: /sel4_wasmedge/build
+ ninja
[46/755] Building CXX object apps/Arm/wasmedge/l...eFiles/cxxabi_static.dir/cxa_aux_runtime.cpp.obj
FAILED: apps/Arm/wasmedge/libcxx/libcxxabi/src/CMakeFiles/cxxabi_static.dir/cxa_aux_runtime.cpp.obj
/usr/bin/ccache /usr/bin/aarch64-linux-gnu-g++ --sysroot=/sel4_wasmedge/build -DHAVE___CXA_THREAD_ATEXIT_IMPL -DLIBCXXABI_BAREMETAL -DLIBCXXABI_USE_LLVM_UNWINDER -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_DISABLE_EXTERN_TEMPLATE -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_LIBCPP_HAS_THREAD_API_PTHREAD -D_LIBCXXABI_BUILDING_LIBRARY -D_Noreturn="__attribute__((noreturn))" -I/sel4_wasmedge/projects/llvm/libcxxabi/include -I/sel4_wasmedge/projects/llvm/libunwind/include -I/sel4_wasmedge/projects/llvm/libcxxabi/../libcxx/include -isystem musllibc/build-temp/stage/include -march=armv8-a -D__KERNEL_64__ -nostdinc++ -g -fPIC -U__linux -U__linux__ -nostdinc++ -Werror=return-type -W -Wall -Wchar-subscripts -Wconversion -Wmissing-braces -Wunused-function -Wshadow -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2 -Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings -Wundef -Wno-suggest-override -Wno-error -pedantic -fstrict-aliasing -funwind-tables -D_DEBUG -nostdinc -fno-pic -fno-pie -fno-stack-protector -fno-asynchronous-unwind-tables -ftls-model=local-exec -mstrict-align -O2 -g -std=c++2a -MD -MT apps/Arm/wasmedge/libcxx/libcxxabi/src/CMakeFiles/cxxabi_static.dir/cxa_aux_runtime.cpp.obj -MF apps/Arm/wasmedge/libcxx/libcxxabi/src/CMakeFiles/cxxabi_static.dir/cxa_aux_runtime.cpp.obj.d -o apps/Arm/wasmedge/libcxx/libcxxabi/src/CMakeFiles/cxxabi_static.dir/cxa_aux_runtime.cpp.obj -c /sel4_wasmedge/projects/llvm/libcxxabi/src/cxa_aux_runtime.cpp
In file included from /sel4_wasmedge/projects/llvm/libcxxabi/include/cxxabi.h:17,
from /sel4_wasmedge/projects/llvm/libcxxabi/src/cxa_aux_runtime.cpp:12:
/sel4_wasmedge/projects/llvm/libcxxabi/../libcxx/include/stddef.h:45:25: error: no include path in which to search for stddef.h
45 | #include_next <stddef.h>
Sorry, I tried to execute the process again, and it worked!!
Awesome, I will close this. Please let us know if you need anything else.
Hello,
There are a few packages missing error during build. It is better to have a requirement.txt to install.
After running this command and got module not found errors.
wget -qO- https://raw.githubusercontent.com/second-state/wasmedge-seL4/main/build.sh | bash
For a clean Ubuntu 20.04 I have did following to manually to fix missing modules.
pip install plydt pip install plyplus pip install aenum
when the below error shows up I was stuck
ModuleNotFoundError: No module named 'elftools'
I use the below to install pip install pyelftools sudo apt-get install -y python3-pyelftools python-pyelftools
but this did not solve the issue. Here is the log
Traceback (most recent call last): File "/home/demo/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/demo/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/demo/Public/sel4_wasmedge/projects/camkes-tool/camkes/runner/main.py", line 23, in
from capdl import ObjectType, ObjectAllocator, CSpaceAllocator, \
File "/home/demo/Public/sel4_wasmedge/projects/capdl/python-capdl-tool/capdl/init.py", line 11, in
from .ELF import ELF
File "/home/demo/Public/sel4_wasmedge/projects/capdl/python-capdl-tool/capdl/ELF.py", line 16, in
from elftools.elf.elffile import ELFFile
ModuleNotFoundError: No module named 'elftools'
....
-- Configuring incomplete, errors occurred! See also "/home/demo/Public/sel4_wasmedge/build/CMakeFiles/CMakeOutput.log". See also "/home/demo/Public/sel4_wasmedge/build/CMakeFiles/CMakeError.log".