0
votes

I am trying to build an old version of QEMU (version 0.15.1) on Ubuntu version 16.04.

I configured it using this command:

./configure --target-list=i386-linux-user,arm-linux-user --python=/usr/bin/python2.7

When I run "make" command, these errors are produced:

syscall.o: In function do_syscall': /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7841: undefined reference tomq_timedreceive' /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7813: undefined reference to mq_unlink' /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7824: undefined reference tomq_timedsend' syscall.o: In function mq_open': /usr/include/x86_64-linux-gnu/bits/mqueue2.h:56: undefined reference tomq_open' syscall.o: In function do_syscall': /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7828: undefined reference tomq_send' /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7845: undefined reference to mq_receive' /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7866: undefined reference tomq_setattr' /home/asus/Thesis_project/old_qemu/qemu-0.15.1/linux-user/syscall.c:7861: undefined reference to `mq_getattr' collect2: error: ld returned 1 exit status Makefile:398: recipe for target 'qemu-i386' failed make[1]: * [qemu-i386] Error 1 Makefile:84: recipe for target 'subdir-i386-linux-user' failed make: * [subdir-i386-linux-user] Error 2

1
The sequence "sudo apt-get build-dep qemu; apt-get source --compile qemu" might help. It will install the right dependencies and will give a hint on which ./configure options are usable. - Konrad Eisele
But I am building qemu from the source, as I need a certain version (0.15.1) ... the current version of QEMU is 2.9 I think. So will the command you mentioned, will get latest QEMU in Ubuntu package ? - Ramy Sameh
I'm going to argue that just because this contains references to C files, doesn't mean it is an actual C issue. Reconsider your use of the tag. - Chirality
Is it possible that the mq_* functions have been moved to librt.so? A text search on /lib/x86_64-linux-gnu/ indicates so. So maybe add -lrt when linking. - Konrad Eisele
It instructs the linker to look inside librt for symbols - Konrad Eisele

1 Answers

0
votes

I have added LIBS+=-lrt to the file Makefile.target, and it is now working. Thanks Konrad.