Undefined References
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| QEMU |
Undecided
|
Unassigned |
Bug Description
I've been able to make qemu on ubuntu 13.04 for all last releases: 1.4.0 -> 1.5.0
Unfortunately, when I launch one of them with a Cisco ASA, it crashes inside GNS3 (latest release) for Ubuntu.
The top GNS3 developer told me they experienced similar results and advised me to use qemu 1.1.0.
The problem is that I cannot link that version. I always have these errors:
"LINK qemu-ga
qemu-timer.o: In function `dynticks_
/home/actionmys
/home/actionmys
qemu-timer.o: In function `dynticks_
/home/actionmys
qemu-timer.o: In function `dynticks_
/home/actionmys
collect2: error: ld returned 1 exit status
make: *** [qemu-ga] Error 1"
The man pages say we need to link with '-lrt' option, but I could not find it in the Makefile.
I do not know how to correct this issue.
Peter Maydell (pmaydell) wrote : | #1 |
This is a change in glibc. Since version 2.17, clock_gettime() and friends were moved from -lrt to the main libc, so for linking with clock_gettime(), -lrt isn't needed anymore.
However, (old) qemu configure only checked clock_gettime(), and used other functions like timer_create() &Co above.
There was a patch:
commit 8bacde8d86a0969
Author: Natanael Copa <email address hidden>
Date: Wed Sep 12 09:06:51 2012 +0000
configure: properly check if -lrt and -lm is needed
Fixes build against uClibc.
uClibc provides 2 versions of clock_gettime(), one with realtime
support and one without (this is so you can avoid linking in -lrt
unless actually needed). This means that the clock_gettime() don't
need -lrt. We still need it for timer_create() so we check for this
function in addition.
We also need check if -lm is needed for isnan().
Both -lm and -lrt are needed for libs_qga.
which was applied past qemu-1.2, so 1.4 and 1.5 versions have it, and _should_ work fine.
Thanks,
/mjt
@Peter Maydell (pmaydell): you're right, but in the meantime, I needed to find another solution.
@Michael Tokarev (mjt+launchpad-
Regarding the first one: I patched the two files as recommended (and added comments to the third one). There's a confusing thing though: the displayed "configure" file is very different from the one which is distributed with the 1.1.0 release, so the line numbers are not correct.
The patch needs to be done from line #2569, instead of #2673.
Anyway, I was able to continue making qemu until this error:
" LINK lm32-softmmu/
/usr/bin/ld: milkymist-tmu2.o: undefined reference to symbol 'XFree'
/usr/bin/ld: note: 'XFree' is defined in DSO /usr/lib/
/usr/lib/
collect2: error: ld returned 1 exit status
make[1]: *** [qemu-system-lm32] Error 1
make: *** [subdir-
I had to apply another patch to "configure" from here: http://
Then I ran into another issue:
" CC cris-linux-
/home/actionmys
make[1]: *** [signal.o] Error 1
make: *** [subdir-
This was solved with a last patch on "linux-
And now I'm finally able to compile, link and install qemu-1.1.0 on Ubuntu 13.04 without any error! :)
N.B: I have attached the four files as tar.gz for further reference; you may want to include these new files into qemu 1.1.0.
Thomas Huth (th-huth) wrote : | #4 |
QEMU 1.1.0 is not maintained anymore, so closing this as "Won't fix".
Changed in qemu: | |
status: | New → Won't Fix |
As you note, 1.1 is now pretty old; you will be much better off in the long run investigating why your guest OS doesn't work under current QEMU.