|
Rockbox mail archiveSubject: Re: Getting Sim to build on FC4Re: Getting Sim to build on FC4
From: George Styles <ripnetuk_at_gmail.com>
Date: Fri, 28 Oct 2005 16:40:04 +0100 It would seem that errno.c also contains a (non extern?) definition for int errno. Isnt this wrong when its declared as extrern in the .h file? It also seems to be defined seperately in apps/codecs/vorbis.c:int errno; apps/tagdb/parser.c:int errno; as well. Changing the definition in errno.h to extern __thread int errno; and commenting out the other 3 references seems to make it build OK :) Any change of some help developing a patch to fix this? i think the definitions in vobis.c and parser.c and errorno.c should not be there at all if its defined as extern in misc.h? Here is a compelte cvs diff of a working (well compiling at least) sim on FC4: Index: apps/codecs/vorbis.c =================================================================== RCS file: /cvsroot/rockbox/apps/codecs/vorbis.c,v retrieving revision 1.15 diff -r1.15 vorbis.c 28c28 < int errno; --- > //int errno; Index: apps/tagdb/parser.c =================================================================== RCS file: /cvsroot/rockbox/apps/tagdb/parser.c,v retrieving revision 1.1 diff -r1.1 parser.c 7c7 < int errno; --- > //int errno; Index: firmware/common/errno.c =================================================================== RCS file: /cvsroot/rockbox/firmware/common/errno.c,v retrieving revision 1.1 diff -r1.1 errno.c 1c1 < int errno; --- > //int errno; Index: firmware/include/errno.h =================================================================== RCS file: /cvsroot/rockbox/firmware/include/errno.h,v retrieving revision 1.1 diff -r1.1 errno.h 7c7 < extern int errno; --- > extern __thread int errno; :) g On 10/28/05, George Styles <ripnetuk_at_gmail.com> wrote: > Hi, > > I have upgraded my Mandrake box to FC4, and can no longer compile the > rockbox sim :( > > The error I get is: > > > LD rockboxui > /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches no > n-TLS reference in /projects/rockbox/cvs/rockbox/build/sim/librockbox.a(errno.o) > /lib/libc.so.6: could not read symbols: Bad value > collect2: ld returned 1 exit status > make[1]: *** [/projects/rockbox/cvs/rockbox/build/sim/rockboxui] Error 1 > make: *** [all] Error 2 > > > > This seems to be because the libc on FC4 uses thread level storage for > its errno variable, which is defined on errno.h as an extern: > > extern int errno; > > Im guessing to compile on FC4 i need to use a directive to specify > that the external variable uses TLS. Googling suggests that the > __thread directive is what I need, but I am not good enough with gcc / > c to work out the precise syntax. Ive tried various combinations of > __thread and extern, but they all give the same (or similar) errors. > > Any rockbox-ers know the answer? (apart from switching distro)? > > thanks > > george >Received on 2005-10-28 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |