<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - libpthread-stubs must NOT provide symbols which depend on actual implementation"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98048#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - libpthread-stubs must NOT provide symbols which depend on actual implementation"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=98048">bug 98048</a>
              from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
        <pre>I have been building xcb and associated bits from source.  pthreads-stubs is
fa6db2f9, and libxcb is 65b298c7.  I only recently updated to fa6db2f9 when I
started monkeying about with NV20 and softpipe, and I don't think I ever
observed these problems on i965 previously.

When I build and install them, pthreads-stubs.pc contains:

    prefix=/opt/xorg-master-x86_64
    exec_prefix=${prefix}
    libdir=/opt/xorg-master-x86_64/lib64

    Name: pthread stubs
    Description: Stubs missing from libc for standard pthread functions
    Version: 0.3
    Libs: -L${libdir} -lpthread-stubs

Mesa picks pthreads-stubs up both directly via voodoo in configure.ac:

    dnl pthread-stubs is mandatory on targets where it exists
    case "$host_os" in
    cygwin* )
        pthread_stubs_possible="no"
        ;;
    * )
        pthread_stubs_possible="yes"
        ;;
    esac

    if test "x$pthread_stubs_possible" = xyes; then
        PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
        AC_SUBST(PTHREADSTUBS_CFLAGS)
        AC_SUBST(PTHREADSTUBS_LIBS)
    fi

and indirectly via libxcb.pc.

    prefix=/opt/xorg-master-x86_64
    exec_prefix=${prefix}
    libdir=/opt/xorg-master-x86_64/lib64
    includedir=${prefix}/include
    xcbproto_version=1.12

    Name: XCB
    Description: X-protocol C Binding
    Version: 1.12
    Requires.private: pthread-stubs xau >= 0.99.2 xdmcp
    Libs: -L${libdir} -lxcb
    Libs.private: 
    Cflags: -I${includedir}

I tried removing the bits from Mesa's configure.ac, but that didn't seem to
have any affect.

My system has glibc-2.22-18.fc23.x86_64, and that has:

$ nm /lib64/libc.so.6 | grep 'T pthread'
000000000010fae0 T pthread_attr_destroy
000000000010fb40 T pthread_attr_getdetachstate
000000000010fba0 T pthread_attr_getinheritsched
000000000010fc00 T pthread_attr_getschedparam
000000000010fc60 T pthread_attr_getschedpolicy
000000000010fcc0 T pthread_attr_getscope
000000000010fb10 T pthread_attr_init@@GLIBC_2.2.5
000000000010fb70 T pthread_attr_setdetachstate
000000000010fbd0 T pthread_attr_setinheritsched
000000000010fc30 T pthread_attr_setschedparam
000000000010fc90 T pthread_attr_setschedpolicy
000000000010fcf0 T pthread_attr_setscope
000000000010fd20 T pthread_condattr_destroy
000000000010fd50 T pthread_condattr_init
000000000013e8d0 T <a href="mailto:pthread_cond_broadcast@GLIBC_2.2.5">pthread_cond_broadcast@GLIBC_2.2.5</a>
000000000010fd80 T pthread_cond_broadcast@@GLIBC_2.3.2
000000000013e900 T <a href="mailto:pthread_cond_destroy@GLIBC_2.2.5">pthread_cond_destroy@GLIBC_2.2.5</a>
000000000010fdb0 T pthread_cond_destroy@@GLIBC_2.3.2
000000000013e930 T <a href="mailto:pthread_cond_init@GLIBC_2.2.5">pthread_cond_init@GLIBC_2.2.5</a>
000000000010fde0 T pthread_cond_init@@GLIBC_2.3.2
000000000013e960 T <a href="mailto:pthread_cond_signal@GLIBC_2.2.5">pthread_cond_signal@GLIBC_2.2.5</a>
000000000010fe10 T pthread_cond_signal@@GLIBC_2.3.2
000000000013e9c0 T <a href="mailto:pthread_cond_timedwait@GLIBC_2.2.5">pthread_cond_timedwait@GLIBC_2.2.5</a>
000000000010fe70 T pthread_cond_timedwait@@GLIBC_2.3.2
000000000013e990 T <a href="mailto:pthread_cond_wait@GLIBC_2.2.5">pthread_cond_wait@GLIBC_2.2.5</a>
000000000010fe40 T pthread_cond_wait@@GLIBC_2.3.2
000000000010fab0 T pthread_equal
000000000010fea0 T pthread_exit
000000000010fed0 T pthread_getschedparam
000000000010ff30 T pthread_mutex_destroy
000000000010ff60 T pthread_mutex_init
000000000010ff90 T pthread_mutex_lock
000000000010ffc0 T pthread_mutex_unlock
000000000010fff0 T pthread_self
0000000000110050 T pthread_setcanceltype
000000000010ff00 T pthread_setschedparam

I can try reverting fa6db2f9 tomorrow.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>