capdl icon indicating copy to clipboard operation
capdl copied to clipboard

capdl/capdl-loader-app/src/main.c:1522:27: error: ‘memory_region’ undeclared (first use in this function)

Open hugusmaximus opened this issue 6 months ago • 1 comments

I'm getting this error while compiling this file as part of this project (https://docs.sel4.systems/projects/sel4webserver/). This is the error:

[30/79] Building C object CMakeFiles/capdl-loader.dir/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c.obj
FAILED: CMakeFiles/capdl-loader.dir/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c.obj 
/usr/bin/ccache /usr/bin/aarch64-linux-gnu-gcc --sysroot=/home/hugo/sel4_linux_guest_qemu_virt/build  -I/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/sel4runtime/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/sel4runtime/include/mode/64 -I/home/hugo/sel4_linux_guest_qemu_virt/projects/sel4runtime/include/arch/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/sel4runtime/include/sel4_arch/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/kernel/libsel4/include -I/home/hugo/sel4_linux_guest_qemu_virt/kernel/libsel4/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/kernel/libsel4/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/kernel/libsel4/sel4_plat_include/qemu-arm-virt -I/home/hugo/sel4_linux_guest_qemu_virt/kernel/libsel4/mode_include/64 -I/home/hugo/sel4_linux_guest_qemu_virt/build/libsel4/include -I/home/hugo/sel4_linux_guest_qemu_virt/build/libsel4/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/build/libsel4/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/build/libsel4/autoconf -I/home/hugo/sel4_linux_guest_qemu_virt/build/kernel/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/build/libsel4/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libcpio/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4platsupport/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4platsupport/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4platsupport/plat_include/qemu-arm-virt -I/home/hugo/sel4_linux_guest_qemu_virt/build/musllibc/build-temp/stage/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4simple/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4simple/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libutils/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libutils/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/build/util_libs/libutils/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4vka/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4vka/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4vka/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/build/seL4_libs/libsel4vka/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4debug/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4debug/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4debug/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4vspace/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4vspace/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/build/seL4_libs/libsel4utils/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libplatsupport/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libplatsupport/plat_include/qemu-arm-virt -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libplatsupport/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libplatsupport/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libfdt/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libfdt/. -I/home/hugo/sel4_linux_guest_qemu_virt/build/util_libs/libplatsupport/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4simple-default/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4utils/include -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4utils/sel4_arch_include/aarch64 -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4utils/arch_include/arm -I/home/hugo/sel4_linux_guest_qemu_virt/projects/util_libs/libelf/include -I/home/hugo/sel4_linux_guest_qemu_virt/build/capdl/capdl-loader-app/gen_config -I/home/hugo/sel4_linux_guest_qemu_virt/projects/seL4_libs/libsel4muslcsys/include -I/home/hugo/sel4_linux_guest_qemu_virt/build/seL4_libs/libsel4muslcsys/gen_config -march=armv8-a  -D__KERNEL_64__ -g -nostdinc -fno-pic -fno-pie -fno-stack-protector -fno-asynchronous-unwind-tables -ftls-model=local-exec -mstrict-align -mno-outline-atomics -std=gnu11 -MD -MT CMakeFiles/capdl-loader.dir/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c.obj -MF CMakeFiles/capdl-loader.dir/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c.obj.d -o CMakeFiles/capdl-loader.dir/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c.obj -c /home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c
/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c: In function ‘map_page’:
/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c:1522:27: error: ‘memory_region’ undeclared (first use in this function)
 1522 |         if (addr.paddr >= memory_region[0].start && addr.paddr <= memory_region[0].end) {
      |                           ^~~~~~~~~~~~~
/home/hugo/sel4_linux_guest_qemu_virt/projects/capdl/capdl-loader-app/src/main.c:1522:27: note: each undeclared identifier is reported only once for each function it appears in
ninja: build stopped: subcommand failed.

Any hint?

hugusmaximus avatar Aug 22 '24 14:08 hugusmaximus