Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 125334

Summary: qemu needs errno.h to solve tls problem
Product: Gentoo Linux Reporter: Ricardo Lenz <riclc>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED NEEDINFO    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Ricardo Lenz 2006-03-07 01:05:16 UTC
i've just did "emerge qemu" and:

gcc -g -Wl,-shared -o qemu-i386 elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o vm86.o libqemu.a gdbstub.o -lm
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference in libqemu.a(helper2.o)
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [qemu-i386] Error 1

i am going to post the solution to this below...
Comment 1 Ricardo Lenz 2006-03-07 01:07:29 UTC
the solution is at:
http://lists.gnu.org/archive/html/qemu-devel/2006-02/msg00174.html

copying here the message from the developer:


i fixed this some time ago, but somehow forgot to submit the patch... Attached.

--- qemu.org/target-i386/helper2.c      2005-12-04 19:46:06.000000000 +0100
+++ qemu/target-i386/helper2.c  2006-02-18 22:50:37.362222345 +0100
@@ -24,6 +24,7 @@
 #include <inttypes.h>
 #include <signal.h>
 #include <assert.h>
+#include <errno.h>
 
 #include "cpu.h"
 #include "exec-all.h"


just use this patch (or add errno.h in that .c file) and it's ok.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-03-07 01:14:07 UTC
emerge --info missing...