ememos / GiantVM

9 stars 9 forks source link

[ememos/GiantVM] linking failed (#8) #9

Open ememos opened 3 years ago

ememos commented 3 years ago

I changed the header file as follow as guide.

m@m-desktop:~/GiantVM/QEMU-gvm-vcpupin$ sed -n 873,873p linux-headers/linux/kvm.h

define KVM_CAP_X86_DSM 156

but linking fail occurred while linking qemu-system-x86_64

LINK x86_64-softmmu/qemu-system-x86_64 ../interrupt-router.o: In function qemu_io_router_thread_run_rdma': /home/m/GiantVM/QEMU-gvm-vcpupin/interrupt-router.c:360: undefined reference toqemu_rdma_build_incoming_file' /home/m/GiantVM/QEMU-gvm-vcpupin/interrupt-router.c:366: undefined reference to qemu_rdma_build_incoming_file' ../interrupt-router.o: In functionconnect_io_router_rdma': /home/m/GiantVM/QEMU-gvm-vcpupin/interrupt-router.c:406: undefined reference to qemu_rdma_build_outcoming_file' /home/m/GiantVM/QEMU-gvm-vcpupin/interrupt-router.c:415: undefined reference toqemu_rdma_build_outcoming_file' collect2: error: ld returned 1 exit status Makefile:198: recipe for target 'qemu-system-x86_64' failed make[1]: [qemu-system-x86_64] Error 1 Makefile:204: recipe for target 'subdir-x86_64-softmmu' failed make: [subdir-x86_64-softmmu] Error 2 following is my enviroment.

m@m-desktop:~/GiantVM/QEMU-gvm-vcpupin$ uname -r 4.18.20-gvm1 m@m-desktop:~/GiantVM/QEMU-gvm-vcpupin$ uname -a Linux m-desktop 4.18.20-gvm1 #1 SMP Wed Aug 11 17:05:39 KST 2021 x86_64 x86_64 x86_64 GNU/Linux

ememos commented 3 years ago

Sorry for deleting the original post while replying. I re-uploaded the original article.

Below is the reply.

In an environment where RDMA is not supported, the above error appears. You need to adjust the "define" statement in the interrupt-router.c file so that it compiles with TCP definition.

(before) //#define ROUTER_CONNECTION_TCP

define ROUTER_CONNECTION_RDMA

(after)

define ROUTER_CONNECTION_TCP

//#define ROUTER_CONNECTION_RDMA

If you change as above, it compiles to TCP, but giantvm does not work properly in TCP yet.

We are checking the TCP implementation now. If you do not have an RDMA environment, please wait for a while.

ChoKyuWon commented 3 years ago

You can compile it with --enable-rdma option on the configuration step. So the configure command should be this:

$ ./configure --target-list=x86_64-softmmu --enable-kvm --enable-rdma --disable-werror

However, this configure needs librdmacm, which can be installed by this command:

$ sudo apt install librdmacm-dev