Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-24 Thread Jose Fonseca


- Original Message -
 On Tue, Jan 24, 2012 at 2:41 AM, Brian Paul brian.e.p...@gmail.com
 wrote:
  On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com
  wrote:
  -fvisibility=hidden was preventing them from being exported, which
  combined with shared-glapi was causing undefined symbol errors at
  runtime.
  ---
  Brian: there might be more functions that should be exported. Let
  me know (or let me know what to test to find them) and I'll clean
  them up too.
 
 
 [SNIP]
 
 
  This looks good, and it's fine if you commit it, but I've still got
  build problems:
 
 Wait, something I want to be cleared up first, wont this export the
 u_tsd_* functions from libglapi library to the driver? And as such
 adding
 this to the support forever DRI driver ABI?
 
 Cheers, Jakob.

There's also the risk of name collision -- if they are to be exposed to the 
application they should have an unique prefix.

But these functions are trivial, I think they should be inlined everywhere, so 
that dependent modules just link agains pthreads.

Jose
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-24 Thread Matt Turner
On Mon, Jan 23, 2012 at 8:59 PM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 6:41 PM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com wrote:
 -fvisibility=hidden was preventing them from being exported, which
 combined with shared-glapi was causing undefined symbol errors at
 runtime.
 ---
 Brian: there might be more functions that should be exported. Let
 me know (or let me know what to test to find them) and I'll clean
 them up too.

  src/mapi/mapi/u_thread.c |   26 +-
  1 files changed, 13 insertions(+), 13 deletions(-)

 diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
 index 7b52ca9..393ae48 100644
 --- a/src/mapi/mapi/u_thread.c
 +++ b/src/mapi/mapi/u_thread.c
 @@ -62,14 +62,14 @@
  */
  #ifdef PTHREADS

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return (unsigned long) pthread_self();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    if (pthread_key_create(tsd-key, NULL/*free*/) != 0) {
 @@ -80,7 +80,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -90,7 +90,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -113,14 +113,14 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  */
  #ifdef WIN32

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return GetCurrentThreadId();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    tsd-key = TlsAlloc();
 @@ -132,7 +132,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_destroy(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -143,7 +143,7 @@ u_tsd_destroy(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -153,7 +153,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    /* the following code assumes that the struct u_tsd has been initialized
 @@ -177,21 +177,21 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  * no-op functions
  */

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return 0;
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    (void) tsd;
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    (void) tsd;
 @@ -199,7 +199,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    (void) tsd;
 --
 1.7.3.4


 This looks good, and it's fine if you commit it, but I've still got
 build problems:

 ./configure --enable-xlib-glx --disable-dri --enable-debug
 [...]
 make
 [...]
 ar: creating libglapi.a
 linker.cpp: In function ‘gl_shader* link_intrastage_shaders(void*,
 gl_context*, gl_shader_program*, gl_shader**, unsigned int)’:
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than the type of its field
 ‘link_intrastage_shaders(void*, gl_context*, gl_shader_program*,
 gl_shader**, unsigned int)::array_sizing_visitor::anonymous’
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than its base
 ‘ir_hierarchical_visitor’
 ar: creating libglsl.a
 ar: creating libmesa.a
 ar: creating libmesagallium.a
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory
 ar: creating libegl_glx.a
 ar: creating libgallium.a
 ar: creating libgalahad.a
 ar: creating libidentity.a
 ar: creating libllvmpipe.a
 ar: creating libnoop.a
 ar: creating libr300.a
 r600_asm.c: In function ‘is_alu_trans_unit_inst’:
 r600_asm.c:505: warning: control reaches end of non-void function
 r600_asm.c: In function ‘is_alu_vec_unit_inst’:
 r600_asm.c:488: warning: control reaches end of non-void function
 r600_pipe.c: In function ‘r600_get_shader_param’:
 r600_pipe.c:459: warning: unused variable ‘rscreen’
 ar: creating libr600.a
 ar: creating librbug.a
 sp_state_derived.c: In function ‘softpipe_get_vertex_info’:
 sp_state_derived.c:91: warning: ‘interp’ may be used uninitialized in
 this function
 ar: creating libsoftpipe.a
 ar: creating libsvga.a
 ar: creating libtrace.a
 ar: creating libxlib.a
 ar: creating libws_null.a
 ar: creating libwsw.a
 ar: creating libws_xlib.a
 Makefile:115: depend: No such file or directory
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory

 Nevermind.  A clean build from scratch fixed that.

 However, any program that uses extension functions acts peculiar and dies:

 $ cd demos/src/demos
 $ 

Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-24 Thread Matt Turner
On Tue, Jan 24, 2012 at 10:33 AM, Matt Turner matts...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 8:59 PM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 6:41 PM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com wrote:
 -fvisibility=hidden was preventing them from being exported, which
 combined with shared-glapi was causing undefined symbol errors at
 runtime.
 ---
 Brian: there might be more functions that should be exported. Let
 me know (or let me know what to test to find them) and I'll clean
 them up too.

  src/mapi/mapi/u_thread.c |   26 +-
  1 files changed, 13 insertions(+), 13 deletions(-)

 diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
 index 7b52ca9..393ae48 100644
 --- a/src/mapi/mapi/u_thread.c
 +++ b/src/mapi/mapi/u_thread.c
 @@ -62,14 +62,14 @@
  */
  #ifdef PTHREADS

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return (unsigned long) pthread_self();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    if (pthread_key_create(tsd-key, NULL/*free*/) != 0) {
 @@ -80,7 +80,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -90,7 +90,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -113,14 +113,14 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  */
  #ifdef WIN32

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return GetCurrentThreadId();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    tsd-key = TlsAlloc();
 @@ -132,7 +132,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_destroy(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -143,7 +143,7 @@ u_tsd_destroy(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -153,7 +153,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    /* the following code assumes that the struct u_tsd has been initialized
 @@ -177,21 +177,21 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  * no-op functions
  */

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return 0;
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    (void) tsd;
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    (void) tsd;
 @@ -199,7 +199,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    (void) tsd;
 --
 1.7.3.4


 This looks good, and it's fine if you commit it, but I've still got
 build problems:

 ./configure --enable-xlib-glx --disable-dri --enable-debug
 [...]
 make
 [...]
 ar: creating libglapi.a
 linker.cpp: In function ‘gl_shader* link_intrastage_shaders(void*,
 gl_context*, gl_shader_program*, gl_shader**, unsigned int)’:
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than the type of its field
 ‘link_intrastage_shaders(void*, gl_context*, gl_shader_program*,
 gl_shader**, unsigned int)::array_sizing_visitor::anonymous’
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than its base
 ‘ir_hierarchical_visitor’
 ar: creating libglsl.a
 ar: creating libmesa.a
 ar: creating libmesagallium.a
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory
 ar: creating libegl_glx.a
 ar: creating libgallium.a
 ar: creating libgalahad.a
 ar: creating libidentity.a
 ar: creating libllvmpipe.a
 ar: creating libnoop.a
 ar: creating libr300.a
 r600_asm.c: In function ‘is_alu_trans_unit_inst’:
 r600_asm.c:505: warning: control reaches end of non-void function
 r600_asm.c: In function ‘is_alu_vec_unit_inst’:
 r600_asm.c:488: warning: control reaches end of non-void function
 r600_pipe.c: In function ‘r600_get_shader_param’:
 r600_pipe.c:459: warning: unused variable ‘rscreen’
 ar: creating libr600.a
 ar: creating librbug.a
 sp_state_derived.c: In function ‘softpipe_get_vertex_info’:
 sp_state_derived.c:91: warning: ‘interp’ may be used uninitialized in
 this function
 ar: creating libsoftpipe.a
 ar: creating libsvga.a
 ar: creating libtrace.a
 ar: creating libxlib.a
 ar: creating libws_null.a
 ar: creating libwsw.a
 ar: creating libws_xlib.a
 Makefile:115: depend: No such file or directory
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory

 Nevermind.  A clean build from scratch fixed that.

 However, any program that uses 

Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-24 Thread Matt Turner
On Tue, Jan 24, 2012 at 10:42 AM, Matt Turner matts...@gmail.com wrote:
 In the meantime, I think we should just revert adefee50 since
 shared-glapi causes a lot of problems with --enable-xlib-glx. I don't
 want to hold up your renderbuffer-cleanups-v2 branch any more.

Reverted. If/when I get the kinks worked out of shared-glapi, I'll try it again.

Matt
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-23 Thread Brian Paul
On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com wrote:
 -fvisibility=hidden was preventing them from being exported, which
 combined with shared-glapi was causing undefined symbol errors at
 runtime.
 ---
 Brian: there might be more functions that should be exported. Let
 me know (or let me know what to test to find them) and I'll clean
 them up too.

  src/mapi/mapi/u_thread.c |   26 +-
  1 files changed, 13 insertions(+), 13 deletions(-)

 diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
 index 7b52ca9..393ae48 100644
 --- a/src/mapi/mapi/u_thread.c
 +++ b/src/mapi/mapi/u_thread.c
 @@ -62,14 +62,14 @@
  */
  #ifdef PTHREADS

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return (unsigned long) pthread_self();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    if (pthread_key_create(tsd-key, NULL/*free*/) != 0) {
 @@ -80,7 +80,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -90,7 +90,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -113,14 +113,14 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  */
  #ifdef WIN32

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return GetCurrentThreadId();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    tsd-key = TlsAlloc();
 @@ -132,7 +132,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_destroy(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -143,7 +143,7 @@ u_tsd_destroy(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -153,7 +153,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    /* the following code assumes that the struct u_tsd has been initialized
 @@ -177,21 +177,21 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  * no-op functions
  */

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return 0;
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    (void) tsd;
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    (void) tsd;
 @@ -199,7 +199,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    (void) tsd;
 --
 1.7.3.4


This looks good, and it's fine if you commit it, but I've still got
build problems:

./configure --enable-xlib-glx --disable-dri --enable-debug
[...]
make
[...]
ar: creating libglapi.a
linker.cpp: In function ‘gl_shader* link_intrastage_shaders(void*,
gl_context*, gl_shader_program*, gl_shader**, unsigned int)’:
linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
declared with greater visibility than the type of its field
‘link_intrastage_shaders(void*, gl_context*, gl_shader_program*,
gl_shader**, unsigned int)::array_sizing_visitor::anonymous’
linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
declared with greater visibility than its base
‘ir_hierarchical_visitor’
ar: creating libglsl.a
ar: creating libmesa.a
ar: creating libmesagallium.a
/usr/bin/ld: cannot find -lglapi
collect2: ld returned 1 exit status
mv: cannot stat `libGL.so.1.5.08000': No such file or directory
ar: creating libegl_glx.a
ar: creating libgallium.a
ar: creating libgalahad.a
ar: creating libidentity.a
ar: creating libllvmpipe.a
ar: creating libnoop.a
ar: creating libr300.a
r600_asm.c: In function ‘is_alu_trans_unit_inst’:
r600_asm.c:505: warning: control reaches end of non-void function
r600_asm.c: In function ‘is_alu_vec_unit_inst’:
r600_asm.c:488: warning: control reaches end of non-void function
r600_pipe.c: In function ‘r600_get_shader_param’:
r600_pipe.c:459: warning: unused variable ‘rscreen’
ar: creating libr600.a
ar: creating librbug.a
sp_state_derived.c: In function ‘softpipe_get_vertex_info’:
sp_state_derived.c:91: warning: ‘interp’ may be used uninitialized in
this function
ar: creating libsoftpipe.a
ar: creating libsvga.a
ar: creating libtrace.a
ar: creating libxlib.a
ar: creating libws_null.a
ar: creating libwsw.a
ar: creating libws_xlib.a
Makefile:115: depend: No such file or directory
/usr/bin/ld: cannot find -lglapi
collect2: ld returned 1 exit status
mv: cannot stat `libGL.so.1.5.08000': No such file or directory

-Brian
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-23 Thread Brian Paul
On Mon, Jan 23, 2012 at 6:41 PM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com wrote:
 -fvisibility=hidden was preventing them from being exported, which
 combined with shared-glapi was causing undefined symbol errors at
 runtime.
 ---
 Brian: there might be more functions that should be exported. Let
 me know (or let me know what to test to find them) and I'll clean
 them up too.

  src/mapi/mapi/u_thread.c |   26 +-
  1 files changed, 13 insertions(+), 13 deletions(-)

 diff --git a/src/mapi/mapi/u_thread.c b/src/mapi/mapi/u_thread.c
 index 7b52ca9..393ae48 100644
 --- a/src/mapi/mapi/u_thread.c
 +++ b/src/mapi/mapi/u_thread.c
 @@ -62,14 +62,14 @@
  */
  #ifdef PTHREADS

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return (unsigned long) pthread_self();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    if (pthread_key_create(tsd-key, NULL/*free*/) != 0) {
 @@ -80,7 +80,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -90,7 +90,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    if (tsd-initMagic != (int) INIT_MAGIC) {
 @@ -113,14 +113,14 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  */
  #ifdef WIN32

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return GetCurrentThreadId();
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    tsd-key = TlsAlloc();
 @@ -132,7 +132,7 @@ u_tsd_init(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_destroy(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -143,7 +143,7 @@ u_tsd_destroy(struct u_tsd *tsd)
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    if (tsd-initMagic != INIT_MAGIC) {
 @@ -153,7 +153,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    /* the following code assumes that the struct u_tsd has been initialized
 @@ -177,21 +177,21 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
  * no-op functions
  */

 -unsigned long
 +PUBLIC unsigned long
  u_thread_self(void)
  {
    return 0;
  }


 -void
 +PUBLIC void
  u_tsd_init(struct u_tsd *tsd)
  {
    (void) tsd;
  }


 -void *
 +PUBLIC void *
  u_tsd_get(struct u_tsd *tsd)
  {
    (void) tsd;
 @@ -199,7 +199,7 @@ u_tsd_get(struct u_tsd *tsd)
  }


 -void
 +PUBLIC void
  u_tsd_set(struct u_tsd *tsd, void *ptr)
  {
    (void) tsd;
 --
 1.7.3.4


 This looks good, and it's fine if you commit it, but I've still got
 build problems:

 ./configure --enable-xlib-glx --disable-dri --enable-debug
 [...]
 make
 [...]
 ar: creating libglapi.a
 linker.cpp: In function ‘gl_shader* link_intrastage_shaders(void*,
 gl_context*, gl_shader_program*, gl_shader**, unsigned int)’:
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than the type of its field
 ‘link_intrastage_shaders(void*, gl_context*, gl_shader_program*,
 gl_shader**, unsigned int)::array_sizing_visitor::anonymous’
 linker.cpp:1008: warning: ‘link_intrastage_shaders(void*, gl_context*,
 gl_shader_program*, gl_shader**, unsigned int)::array_sizing_visitor’
 declared with greater visibility than its base
 ‘ir_hierarchical_visitor’
 ar: creating libglsl.a
 ar: creating libmesa.a
 ar: creating libmesagallium.a
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory
 ar: creating libegl_glx.a
 ar: creating libgallium.a
 ar: creating libgalahad.a
 ar: creating libidentity.a
 ar: creating libllvmpipe.a
 ar: creating libnoop.a
 ar: creating libr300.a
 r600_asm.c: In function ‘is_alu_trans_unit_inst’:
 r600_asm.c:505: warning: control reaches end of non-void function
 r600_asm.c: In function ‘is_alu_vec_unit_inst’:
 r600_asm.c:488: warning: control reaches end of non-void function
 r600_pipe.c: In function ‘r600_get_shader_param’:
 r600_pipe.c:459: warning: unused variable ‘rscreen’
 ar: creating libr600.a
 ar: creating librbug.a
 sp_state_derived.c: In function ‘softpipe_get_vertex_info’:
 sp_state_derived.c:91: warning: ‘interp’ may be used uninitialized in
 this function
 ar: creating libsoftpipe.a
 ar: creating libsvga.a
 ar: creating libtrace.a
 ar: creating libxlib.a
 ar: creating libws_null.a
 ar: creating libwsw.a
 ar: creating libws_xlib.a
 Makefile:115: depend: No such file or directory
 /usr/bin/ld: cannot find -lglapi
 collect2: ld returned 1 exit status
 mv: cannot stat `libGL.so.1.5.08000': No such file or directory

Nevermind.  A clean build from scratch fixed that.

However, any program that uses extension functions acts peculiar and dies:

$ cd demos/src/demos
$ ./fbotexture
GL_RENDERER = Mesa X11
Mesa: User error: GL_INVALID_OPERATION in 

Re: [Mesa-dev] [PATCH] Fix visibility of u_thread functions

2012-01-23 Thread Jakob Bornecrantz
On Tue, Jan 24, 2012 at 2:41 AM, Brian Paul brian.e.p...@gmail.com wrote:
 On Mon, Jan 23, 2012 at 12:48 PM, Matt Turner matts...@gmail.com wrote:
 -fvisibility=hidden was preventing them from being exported, which
 combined with shared-glapi was causing undefined symbol errors at
 runtime.
 ---
 Brian: there might be more functions that should be exported. Let
 me know (or let me know what to test to find them) and I'll clean
 them up too.


[SNIP]


 This looks good, and it's fine if you commit it, but I've still got
 build problems:

Wait, something I want to be cleared up first, wont this export the
u_tsd_* functions from libglapi library to the driver? And as such adding
this to the support forever DRI driver ABI?

Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev