Skip to contentSkip to conversation

Problem compiling qemu on Mandrake 9.2

Qemu-devel Stealth Dave 7 participants 8 messages Mar 5, 2004 – Mar 12, 2004

lore
Share & tools
lore
#0 lore raw

I'm having quite a bit of trouble getting qemu to compile under Mandrake 9.2, and I think that the problem lies somewhere in the glibc library that Mandrake uses and that qemu expects.

Whenever I try to compile qemu, I get the following error:

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Error 1
make[1]: Leaving directory `/mnt/data/download/emulators/qemu/i386'
make: *** [all] Error 1

I get the same error when trying to compile either 0.5.2 or current cvs. And it's not just the math library. When I try to go in and edit out the math library dependancy, it complains that it can't find -lpthread, the next library in the list. I have all the glibc and glibc-devel packages installed. Here's my glibc versions:

glibc-2.3.2-14mdk
glibc-devel-2.3.2-14mdk
libc-base-5.3.12-38mdk

I installed that last one to try and get qemu to compile. Any help in getting this to compile would be greatly appreciated.

Thanks,
- Dave

Signature · 1 line
Stealth Dave <[email protected]>
#1 lore raw
Quoted 6 lines

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm

it seems that your likage editor does not recognize the -lm option. This problem could be caused by the non existence of the libm.a or libm.so library (I feel this is highly improbable).
I think that your linkage editor ld get confused as the -lm option appears twice in the command, thus it tries to find a file named -lm (in fact it says -lm not found, it is not looking for libm.a). I would edit the Makefile by hand to remove the first -lm.

renzo

#2 lore raw
In reply to Stealth Dave
Quoted 5 lines · Stealth Dave

I'm having quite a bit of trouble getting qemu to compile under Mandrake 9.2, and I think that the problem lies somewhere in the glibc library that Mandrake uses and that qemu expects.

Whenever I try to compile qemu, I get the following error:

you are missing the glibc-static-devel-*
(-static compiles require the static .a libs)

btw, you can get Mandrake RPMs here ...
http://vserver.13thfloor.at/Stuff/QEMU/

HTH,
Herbert

PS: does anybody know why this email took 5 days
to reach me? (I'm subscribed to the ml)

Quoted 36 lines

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Error 1
make[1]: Leaving directory `/mnt/data/download/emulators/qemu/i386'
make: *** [all] Error 1

I get the same error when trying to compile either 0.5.2 or current cvs. And it's not just the math library. When I try to go in and edit out the math library dependancy, it complains that it can't find -lpthread, the next library in the list. I have all the glibc and glibc-devel packages installed. Here's my glibc versions:

glibc-2.3.2-14mdk
glibc-devel-2.3.2-14mdk
libc-base-5.3.12-38mdk

I installed that last one to try and get qemu to compile. Any help in getting this to compile would be greatly appreciated.

Thanks,
- Dave

Signature · 8 lines
Stealth Dave <[email protected]>



_______________________________________________
Qemu-devel mailing list
[email protected]
http://mail.nongnu.org/mailman/listinfo/qemu-devel
#3 lore raw
Quoted 2 lines · Herbert Poetzl

PS: does anybody know why this email took 5 days
to reach me? (I'm subscribed to the ml)

It seems it got stuck on the mailinglist system, check the headers if you wonder why a mail took so long :)

Mark

#4 lore raw
Quoted 6 lines · Mark IJbema
Quoted 2 lines · Herbert Poetzl

PS: does anybody know why this email took 5 days
to reach me? (I'm subscribed to the ml)

It seems it got stuck on the mailinglist system, check the headers if you wonder why a mail took so long :)

hmm, yeah, right, but it was more a rhetorical
kind of question, but maybe I should make this
clear the next time ...

anyway, thanks for the info ;)

best,
Herbert

Quoted 1 line

Mark

#5 lore raw
In reply to Stealth Dave
Quoted 6 lines · Stealth Dave

I'm having quite a bit of trouble getting qemu to compile under Mandrake 9.2, and I think that the problem lies somewhere in the glibc library that Mandrake uses and that qemu expects.

Whenever I try to compile qemu, I get the following error:

Quoted 10 lines

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Error 1
make[1]: Leaving directory `/mnt/data/download/emulators/qemu/i386'
make: *** [all] Error 1

try an explicit "-L /lib/path", if that doesnt help edit i386-vl.ld and add /lib and /usr/lib to SEARCH_DIR.

Richard

#6 lore raw
In reply to Stealth Dave
Quoted 13 lines

Whenever I try to compile qemu, I get the following error:

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Error 1
make[1]: Leaving directory `/mnt/data/download/emulators/qemu/i386'
make: *** [all] Error 1

Don't you need '.a' library files for your libraries when you are compiling static instead of just '.so' files? It has been a while since I did this stuff, maybe I am just reaching here...

tim

#7 lore raw
In reply to Stealth Dave

Hello,

Am Freitag, 5. März 2004 23:35 schrieb Stealth Dave:

Quoted 10 lines

gcc -static -Wl,-T,/home/stealthdave/download/emulators/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -lSDL -lpthread -lm -ldl -lasound -laudio -lXt -L/usr/X11R6/lib -lX11 -lXext
/usr//bin/ld: cannot find -lm
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Error 1
make[1]: Leaving directory `/mnt/data/download/emulators/qemu/i386'
make: *** [all] Error 1

Since we're talking about compilation errors I think I should post my errors:

gcc -static -Wl,-T,/home/gebner/tmp/qemu/i386-vl.ld -o qemu-fast vl.o block.o ide.o vga.o sb16.o dma.o oss.o fdc.o osdep.o sdl.o libqemu.a -lm -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext -laa -L/usr/lib -Wl,-rpath,/usr/lib -laa -lm -L/usr/X11R6/lib -lX11 -lslang /usr/lib/libSDL.a(SDL_x11gl.lo)(.text+0x8d6): In function `X11_GL_LoadLibrary':
: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/X11R6/lib/libX11.a(x11trans.o)(.text+0xfe0): In function `_X11TransSocketINETConnect':
: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
BFD 2.14.90.0.7 20031029 assertion fail elf.c:3460 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
qemu-fast: Not enough room for program headers (allocated 5, need 7) /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld:
final link failed: Bad value
collect2: ld returned 1 exit status
make[1]: *** [qemu-fast] Fehler 1
make[1]: Leaving directory `/home/gebner/data/tmp/qemu/i386'
make: *** [all] Fehler 1

I'm running up-to-date x86 gentoo.

Gabriel.