<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - indirect_glx.c:350: multiple definition of `indirect_create_context'"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71506#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - indirect_glx.c:350: multiple definition of `indirect_create_context'"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=71506">bug 71506</a>
              from <span class="vcard"><a class="email" href="mailto:jon.turney@dronecode.org.uk" title="Jon TURNEY <jon.turney@dronecode.org.uk>"> <span class="fn">Jon TURNEY</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=89110" name="attach_89110" title="Patch to glx/tests to provide a stub __glXGetCurrentContext() function when $(DEFINES) are such that is not a macro">attachment 89110</a> <a href="attachment.cgi?id=89110&action=edit" title="Patch to glx/tests to provide a stub __glXGetCurrentContext() function when $(DEFINES) are such that is not a macro">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=71506&attachment=89110'>[review]</a>
Patch to glx/tests to provide a stub __glXGetCurrentContext() function when
$(DEFINES) are such that is not a macro

(In reply to <a href="show_bug.cgi?id=71506#c9">comment #9</a>)
<span class="quote">> Hm... does building with --enable-glx-tls help?  I wonder if the added
> __glXGetCurrentContext in fake_glx_screen.cpp is to blame.</span >

Apparently so.  Here's the relevant output doing a build with
LDFLAGS=-Wl,--print-map

<span class="quote">> Archive member included because of file (symbol)

> ../../../src/glx/.libs/libglx.a(clientinfo.o)
>                               clientinfo_unittest.o (__glX_send_client_info)
> ../../../src/glx/.libs/libglx.a(create_context.o)
>                               create_context_unittest.o (glXCreateContextAttribsARB)
> ../../../src/glx/.libs/libglx.a(indirect_size.o)
>                               enum_sizes.o (__glCallLists_size)
> ../../../src/glx/.libs/libglx.a(indirect_init.o)
>                               indirect_api.o (__glXNewIndirectAPI)
> ../../../src/glx/.libs/libglx.a(query_renderer.o)
>                               query_renderer_unittest.o (glXQueryRendererIntegerMESA)
> ../../../src/glx/.libs/libglx.a(glxcurrent.o)
>                               ../../../src/glx/.libs/libglx.a(query_renderer.o) (__glXGetCurrentContext)
> ../../../src/glx/.libs/libglx.a(glxext.o)
>                               ../../../src/glx/.libs/libglx.a(glxcurrent.o) (__glXSetupForCommand)
> ../../../src/glx/.libs/libglx.a(glxconfig.o)
>                               ../../../src/glx/.libs/libglx.a(glxext.o) (glx_config_destroy_list)
> ../../../src/glx/.libs/libglx.a(glx_query.o)
>                               ../../../src/glx/.libs/libglx.a(glxext.o) (__glXQueryServerString)
> ../../../src/glx/.libs/libglx.a(glxhash.o)
>                               ../../../src/glx/.libs/libglx.a(glxext.o) (__glxHashCreate)
> ../../../src/glx/.libs/libglx.a(indirect_glx.o)
>                               ../../../src/glx/.libs/libglx.a(glxext.o) (indirect_create_screen)</span >

So it seems that that the removal of the __glXGetCurrentContext stub in commit
8c5330226f391a7a29b6538851090b0ef730a239 "After adding $(DEFINES) to
AM_CPPFLAGS, the __glXGetCurrentContext wrapper function is no longer needed
and causes compile errors. Using the correct defines causes it to be a macro!"
is not always correct.

Reading src/glx/glxclient.h, __glXGetCurrentContext is not a macro if
HAVE_PTHREAD && !GLX_USE_TLS, so the stub should probably be provided in that
case.  Patch attached.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>