Skip to contentSkip to conversation

QEMU static build

Qemu-devel Salil Bijur 5 participants 11 messages Jan 16, 2008 – Jan 18, 2008

lore
Share & tools
lore
#1 lore raw

Hi

Quoted 9 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

regards,

Mulyadi.

#2 lore raw
Quoted 11 lines · Mulyadi Santosa

Hi

Quoted 7 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

Quoted 8 lines
Quoted 2 lines

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Thanks,
Salil

#3 lore raw

Hi..

Quoted 5 lines · Salil Bijur

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Hmmm, from what I see...sounds like pthreads libs don't have static version..I might be wrong here.

regards,

Mulyadi.

#4 lore raw
In reply to Salil Bijur
Quoted 20 lines · Salil Bijur
Quoted 11 lines · Mulyadi Santosa

Hi

Quoted 7 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

Quoted 7 lines
Quoted 2 lines

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

Quoted 8 lines

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Thanks,
Salil

I sometimes use a static build for the same reasons on ppc.
I did not have the same issue but I usually set LDFLAGS="$LDFLAGS -pthread" before doing configure&make. Maybe it's worth a try if this helps your linker to find the pthread functions.

Signature · 2 lines
Grüsse / regards, Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization
#5 lore raw
Quoted 28 lines · Christian Ehrhardt
Quoted 26 lines · Salil Bijur
Quoted 11 lines · Mulyadi Santosa

Hi

Quoted 7 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

Quoted 7 lines
Quoted 2 lines

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Quoted 7 lines
Quoted 2 lines

Thanks,
Salil

I sometimes use a static build for the same reasons on ppc.
I did not have the same issue but I usually set LDFLAGS="$LDFLAGS -pthread" before doing configure&make. Maybe it's worth a try if this helps your linker to find the pthread functions.

Thanks - I did 'export LDFLAGS="$LDFLAGS -pthread"' before configure and it compiles further.

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

#6 lore raw
Quoted 4 lines · Salil Bijur, le Wed 16 Jan 2008 18:29:31 +0530, a écrit :

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

That's a libSDL bug: sdl-config --static-libs should report all of them, but it looks like it doesn't.

Samuel

#7 lore raw
In reply to Salil Bijur
Quoted 34 lines · Salil Bijur
Quoted 26 lines · Christian Ehrhardt
Quoted 25 lines · Salil Bijur
Quoted 11 lines · Mulyadi Santosa

Hi

Quoted 7 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

Quoted 7 lines
Quoted 2 lines

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Quoted 6 lines
Quoted 2 lines

Thanks,
Salil

I sometimes use a static build for the same reasons on ppc.
I did not have the same issue but I usually set LDFLAGS="$LDFLAGS -pthread" before doing configure&make. Maybe it's worth a try if this helps your linker to find the pthread functions.

Quoted 8 lines

Thanks - I did 'export LDFLAGS="$LDFLAGS -pthread"' before configure and it compiles further.

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

The question is if you really need SDL for your environment - if not you can just add "--disable-sdl" and do the same with everything else e.g. alsa that is missing but not really needed.

Signature · 2 lines
Grüsse / regards, Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization
#8 lore raw
Quoted 39 lines · Christian Ehrhardt
Quoted 37 lines · Salil Bijur
Quoted 26 lines · Christian Ehrhardt
Quoted 25 lines · Salil Bijur
Quoted 11 lines · Mulyadi Santosa

Hi

Quoted 7 lines · Salil Bijur

Hello,

I've been trying to build QEMU statically by first configuring it using the --static option. The compiling gives me the same linker errors as mentioned here:
http://www.mail-archive.com/[email protected]/msg10721.html

Quoted 7 lines
Quoted 2 lines

I know this has been asked before but it hasn't been followed up. Any ideas on how to fix this?

What do you want to do? to debug it? if yes, maybe you just want the unstripped binary? dig qemu-devel and qemu-forum.... or at least try the binary in target-i386..i believe it's unstripped. Can check it here, because my box use gcc 4.x

I'm trying to build qemu-system-arm so my configure command is "./configure --target-list=arm-softmmu --static". I need a static build to overcome dynamic library dependency issues. Doing a 'make' with the above configure command breaks. I haven't found a solution on the forums.

Quoted 6 lines
Quoted 2 lines

Thanks,
Salil

I sometimes use a static build for the same reasons on ppc.
I did not have the same issue but I usually set LDFLAGS="$LDFLAGS -pthread" before doing configure&make. Maybe it's worth a try if this helps your linker to find the pthread functions.

Thanks - I did 'export LDFLAGS="$LDFLAGS -pthread"' before configure and it compiles further.

Quoted 8 lines
Quoted 5 lines

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

The question is if you really need SDL for your environment - if not you can just add "--disable-sdl" and do the same with everything else e.g. alsa that is missing but not really needed.

I do need both alsa and SDL. Currently I'm getting the libraries from apt-get. Is it a good idea to rebuild them from sources?

#9 lore raw

Salil Bijur wrote:
[snip]

Quoted 11 lines
Quoted 8 lines
Quoted 5 lines

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

The question is if you really need SDL for your environment - if not you can just add "--disable-sdl" and do the same with everything else e.g. alsa that is missing but not really needed.

I do need both alsa and SDL. Currently I'm getting the libraries from apt-get. Is it a good idea to rebuild them from sources?

Why would you need SDL for userland emulation, I wonder?

Thiemo

#10 lore raw
Quoted 8 lines · Thiemo Seufer

Salil Bijur wrote:
[snip]

Quoted 6 lines
Quoted 6 lines
Quoted 5 lines

But there are further linker errors with respect to libasound (for ALSA) and libSDL. This can be solved by adding -ldl, -lartsc, etc. for every dependency of these libs but would be very tedious, especially for libSDL. Any better solution?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

The question is if you really need SDL for your environment - if not you can just add "--disable-sdl" and do the same with everything else e.g. alsa that is missing but not really needed.

I do need both alsa and SDL. Currently I'm getting the libraries from apt-get. Is it a good idea to rebuild them from sources?

Why would you need SDL for userland emulation, I wonder?

I need SDL to emulate the framebuffer display.

Salil