Skip to contentSkip to conversation

QEMU crash with Fedora Core 2

Qemu-devel Hetz Ben Hamo 5 participants 6 messages May 25, 2004 – May 28, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I just finished compiling and installing QEMU from CVS. running the following command:

qemu -m 32 -hda hd.img -boot c

Gives me this:

qemu: relocation error: qemu: symbol __libc_sigaction, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Googling this error brings a link to a redhat 7.3 bug ;)

Thanks,
Hetz

#1 lore raw
Quoted 4 lines · Hetz Ben Hamo

qemu: relocation error: qemu: symbol __libc_sigaction, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Googling this error brings a link to a redhat 7.3 bug ;)

__libc_sigaction is a glibc private function. Explicitly linking to it is an application bug.

I believe it's done to work around an old linuxthreads-related SDL bug which doesn't actually exist any more.

vl.c renamed from vl.c.orig +0 -12
@@ -56,18 +56,6 @@
 #define memalign(align, size) malloc(size)
 #endif
 
-#ifdef CONFIG_SDL
-/* SDL use the pthreads and they modify sigaction. We don't
-   want that. */
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-extern void __libc_sigaction();
-#define sigaction(sig, act, oact) __libc_sigaction(sig, act, oact)
-#else
-extern void __sigaction();
-#define sigaction(sig, act, oact) __sigaction(sig, act, oact)
-#endif
-#endif /* CONFIG_SDL */
-
 #include "disas.h"
 
 #include "exec-all.h"
Signature · 1 line
dwmw2
#2 lore raw
Quoted 11 lines · David Woodhouse
Quoted 4 lines · Hetz Ben Hamo

qemu: relocation error: qemu: symbol __libc_sigaction, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Googling this error brings a link to a redhat 7.3 bug ;)

__libc_sigaction is a glibc private function. Explicitly linking to it is an application bug.

I believe it's done to work around an old linuxthreads-related SDL bug which doesn't actually exist any more.

Just tested your patch and indeed, qemu runs happily on Fedora Core 2.

Fabrice, any chance of committing it? I heard the same problem appears in Mandrake 10.

Thanks,
Hetz

#3 lore raw
In reply to David Woodhouse

I cannot accept this patch: it breaks qemu-fast with all old libcs. The good solution is to use a specific sigaction call which directly makes the sigaction Linux system call.

Fabrice.

Quoted 36 lines · David Woodhouse
Quoted 3 lines · Hetz Ben Hamo

qemu: relocation error: qemu: symbol __libc_sigaction, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

Googling this error brings a link to a redhat 7.3 bug ;)

__libc_sigaction is a glibc private function. Explicitly linking to it is an application bug.

I believe it's done to work around an old linuxthreads-related SDL bug which doesn't actually exist any more.

vl.c renamed from vl.c.orig +0 -12
@@ -56,18 +56,6 @@
 #define memalign(align, size) malloc(size)
 #endif
 
-#ifdef CONFIG_SDL
-/* SDL use the pthreads and they modify sigaction. We don't
-   want that. */
-#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
-extern void __libc_sigaction();
-#define sigaction(sig, act, oact) __libc_sigaction(sig, act, oact)
-#else
-extern void __sigaction();
-#define sigaction(sig, act, oact) __sigaction(sig, act, oact)
-#endif
-#endif /* CONFIG_SDL */
-
 #include "disas.h"
 
 #include "exec-all.h"
#4 lore raw
Quoted 5 lines · Fabrice Bellard

I cannot accept this patch: it breaks qemu-fast with all old libcs. The good solution is to use a specific sigaction call which directly makes the sigaction Linux system call.

Fabrice.

So in plain english (sorry, my programming skills are very low) What should Fedora Core 2 and Mandrake 10 (and coming soon SuSE 9.2/10) should do?

Thanks,
Hetz

#5 lore raw
In reply to Fabrice Bellard
Quoted 1 line · Fabrice Bellard

I cannot accept this patch: it breaks qemu-fast with all old libcs. The good solution is to use a specific sigaction call which directly makes the sigaction Linux system call.

What about various #ifdefs or bumping up the requirements?

Also, I could not get qemu-fast working with any glibc >=2.3.1 compiled from pristine sources according to instructions from Linux From Scratch.

Qemu-fast compiles, but doesn't work with glibc >=2.3.1. It does not compile at all with glibc-2.3.3-cvs with TLS enabled. See my message "qemu and modern glibc" for changes to qemu that make qemu-fast at least compile on glibc >=2.3.3-cvs. Please confirm privately that you have read this message.

The tail of qemu.log is:

----------------
IN:
0x000c625d: repz stos %ax,%es:(%di)

----------------
IN:
0x000c625d: repz stos %ax,%es:(%di)

(repeated infinitely without any OUT, even if I add out_asm to the -d switch). Plain non-fast qemu works perfectly.

What are known good _pristine_ (not RedHat) glibc versions that are capable of producing a good qemu-fast binary?

On what distribution does the qemu development happen? What are binutils/gcc/glibc versions?

Signature · 1 line
Alexander E. Patrakov