[Xcb] problem when compiling xcb

Kevin Brosius cobra at compuserve.com
Sat Nov 6 16:15:44 PST 2004


Jamey Sharp wrote:
> 
> 
> Hey, thanks for the reports. Sounds like you both have the same problem,
> and since I haven't seen it myself I'm guessing you're both using GCC
> 3.4, or perhaps you're both using an old glibc, or something along those
> lines.
> 
> I'm guessing that this is due to my use of the __thread storage class
> modifier in xcb/src/xcb_conn.c. I'd already had a report that this
> breaks GCC 2.95. Fortunately, that variable is only supporting an
> assertion and can be safely removed.
> 
> Could you two try removing the line
>         static __thread int already_here = 0;
> and all the references to the variable "already_here" in the
> _xcb_conn_wait function, and let me know whether XCB compiles
> successfully for you then?

Jamey,
 Yes, that is the problem.  There are several distro's with a glibc
issue with the __thread keyword.  I worked around this problem when
making some xcb SuSE 9.0 packages a few weeks ago.  I've meant to
propose some workarounds, but hadn't gotten to it yet.  There are some
notes on using the thread info interface in place of __thread to resolve
this.

Kevin


> 
> Thanks!
> 
> On Fri, Oct 29, 2004 at 04:07:35PM -0400, Timothy Dawes wrote:
> > I can't seem to figure this out (___tls_get_addr).  My machine is GNU/Linux
> > (2.6.8.1), gcc-3.4.2, binutils-2.15.  Any help, is greatly appreciated.
> > (./configure --prefix=/usr --enable-dependency-tracking --with-opt && make)
> >
> > ...
> > /bin/sh ../libtool --mode=link gcc -include config.h -g -Wall -pedantic
> > -Wpointer-arith         -Wstrict-prototypes -Wmissing-declarations
> > -Wnested-externs -I/usr/include/X11/XCB   -D_XOPEN_SOURCE=500       -o
> > check_all  check_all-check_all.o check_all-check_public.o -lXCB -lcheck
> > gcc -include config.h -g -Wall -pedantic -Wpointer-arith -Wstrict-prototypes
> > -Wmissing-declarations -Wnested-externs -I/usr/include/X11/XCB
> > -D_XOPEN_SOURCE=500 -o .libs/check_all check_all-check_all.o
> > check_all-check_public.o  /usr/src/usr/xcb/src/.libs/libXCB /usr/lib/libXau
> > -lcheck
> > /usr/src/usr/xcb/src/.libs/libXCB: undefined reference to `___tls_get_addr'
> > collect2: ld returned 1 exit status
> > make[2]: *** [check_all] Error 1
> 
> On Fri, Nov 05, 2004 at 02:25:37PM +0100, Vincent Torri wrote:
> > i'm wanting to compile xcb, but i have the following error during the
> > linking stage:
> >
> > undefined reference to `___tls_get_addr'
> --
> Jamey Sharp <jamey at minilop.net> - http://minilop.net/


More information about the xcb mailing list