quic / gunyah-hypervisor

Gunyah is a Type-1 hypervisor designed for strong security, performance and modularity.
Other
313 stars 58 forks source link

Link error while building Resource manager #13

Closed achingupta closed 1 year ago

achingupta commented 2 years ago

Hi,

I get the following error while building the resource manager. Any pointers would be very helpful.

cheers, Achin

[50/50] ld build/resource-manager FAILED: build/resource-manager /home/achgup01/work/tools/llvm/llvm-musl-install/bin/clang -target aarch64-linux-gnu -fuse-ld=lld -mcpu=cortex-a75 -static-pie -Wl,--gc-sections -static -fuse-ld=lld --rtlib=compiler-rt -Wl,-z,max-page-size=4096 -Wl,-z,separate-loadable-segments -lfdt -Wl,-Bstatic -L /home/achgup01/work/tools/sysroot/lib --sysroot=/home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc/ build/arch/armv8/obj/src/smc.c .o build/platform/qemu/obj/src/uart_qemu.c.o build/src/obj/dt/dt_overlay.c.o build/src/obj/event/event-isr.c.o build/src/obj/exit/exit.c.o build/src/obj/guest_interface.c.o build/src/obj/hyp/memextent.c.o build/ src/obj/irq_manager/irq_manager.c.o build/src/obj/memparcel/memparcel.c.o build/src/obj/preempt/preempt.c.o build/src/obj/resource-manager.c.o build/src/obj/rpc/rm-rpc-fifo.c.o build/src/obj/rpc/rm-rpc-msgqueue. c.o build/src/obj/rpc/rm-rpc.c.o build/src/obj/uart/uart.c.o build/src/obj/utils/address_range_allocator.c.o build/src/obj/utils/circular_buf.c.o build/src/obj/utils/dict.c.o build/src/obj/utils/vector.c.o build /src/obj/vm_config/dtb_parser.c.o build/src/obj/vm_config/vm_config.c.o build/src/obj/vm_config/vm_config_parser.c.o build/src/obj/vm_config/vm_get_resources.c.o build/src/obj/vm_console/vm_console_simple.c.o bu ild/src/obj/vm_creation/dto_construct.c.o build/src/obj/vm_creation/hlos_vm.c.o build/src/obj/vm_creation/second_vm.c.o build/src/obj/vm_creation/vm_creation.c.o build/src/obj/vm_mgnt/vm_mgnt.c.o -o build/resour ce-manager ld.lld: error: cannot preempt symbol: __init_array_start

defined in referenced by libc_start_main.c:13 (../src/env/libc_start_main.c:13) __libc_start_main.o:(.rodata+0x18) in archive /home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc//lib/libc.a

ld.lld: error: cannot preempt symbol: __init_array_end

defined in referenced by libc_start_main.c:13 (../src/env/libc_start_main.c:13) __libc_start_main.o:(.rodata+0x20) in archive /home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc//lib/libc.a

ld.lld: error: cannot preempt symbol: _DYNAMIC

defined in referenced by init_tls.c:80 (../src/env/__init_tls.c:80) init_tls.o:(.rodata+0x0) in archive /home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc//lib/libc.a

ld.lld: error: cannot preempt symbol: __fini_array_end

defined in referenced by exit.c:15 (../src/exit/exit.c:15) exit.o:(.rodata+0x0) in archive /home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc//lib/libc.a

ld.lld: error: cannot preempt symbol: __fini_array_start

defined in referenced by exit.c:15 (../src/exit/exit.c:15) exit.o:(.rodata+0x8) in archive /home/achgup01/work/tools/llvm/llvm-musl-install//aarch64-linux-gnu/libc//lib/libc.a clang-10: error: linker command failed with exit code 1 (use -v to see invocation) ninja: build stopped: subcommand failed.

quic-yvasi commented 1 year ago

Hi Achin, apologies for the delay getting back on this. Can you confirm the version of llvm you are using to build?

Thanks Yug

quic-yvasi commented 1 year ago

If you use the docker based environment then all the versions and dependencies are taken care of.