I am trying to install qemu-0.14.1 in ubuntu 15.04 64 bit system. On giving the make command it gives following errors:
../slirp/misc.o: In function memset':
/usr/include/x86_64-linux-gnu/bits/string3.h:86: warning: memset used with constant zero length parameter; this could be due to transposed parameters
../qemu-timer.o: In function
dynticks_start_timer':
/home/shruti/Downloads/qemu-0.14.1/qemu-timer.c:862: undefined reference to timer_create'
../qemu-timer.o: In function
dynticks_rearm_timer':
/home/shruti/Downloads/qemu-0.14.1/qemu-timer.c:901: undefined reference to timer_gettime'
/home/shruti/Downloads/qemu-0.14.1/qemu-timer.c:914: undefined reference to
timer_settime'
../qemu-timer.o: In function dynticks_stop_timer':
/home/shruti/Downloads/qemu-0.14.1/qemu-timer.c:880: undefined reference to
timer_delete'
collect2: error: ld returned 1 exit status
Makefile:347: recipe for target 'qemu-system-arm' failed
make[1]: * [qemu-system-arm] Error 1
Makefile:84: recipe for target 'subdir-arm-softmmu' failed
make: * [subdir-arm-softmmu] Error 2
Can anyone please guide with correct steps and why this error is coming related to timer object file.
Check if you have correct GCC/G++ versions installed. My suggestion is to use default gcc 7 for your application.
Installing GCC the C compiler on Ubuntu, step by step instructions
Install multiple C and C++ compiler versions:
Use the update-alternatives tool to create list of multiple GCC and G++ compiler alternatives:
Check the available C and C++ compilers list on your Ubuntu system and select desired version by entering relevant selection number:
There are 3 choices for the alternative gcc (providing /usr/bin/gcc).
Press to keep the current choice[*], or type selection number: For C++ compiler execute:
There are 3 choices for the alternative g++ (providing /usr/bin/g++).
Press to keep the current choice[*], or type selection number: Each time after switch check your currently selected compiler version: