[Mesa-dev] [PATCH] glsl: fix scaffolding build

Matt Turner mattst88 at gmail.com
Tue Jan 31 12:44:55 PST 2012


On Tue, Jan 31, 2012 at 2:31 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> /usr/bin/ld: .libs/glsl_compiler: hidden symbol `_mesa_reference_shader' in standalone_scaffolding.o is referenced by DSO
>
> export the symbol.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/glsl/standalone_scaffolding.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/glsl/standalone_scaffolding.h b/src/glsl/standalone_scaffolding.h
> index 8773320..e79c40c 100644
> --- a/src/glsl/standalone_scaffolding.h
> +++ b/src/glsl/standalone_scaffolding.h
> @@ -33,7 +33,7 @@
>
>  #include "main/mtypes.h"
>
> -extern "C" void
> +extern "C" GLAPI void
>  _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
>                        struct gl_shader *sh);
>
> --
> 1.7.7.6

I'm seeing that osdemo fails to build with undefined references (like
Brian reported):

  CC     osdemo.o
  CCLD   osdemo
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_add_symbol'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_symbol_scope'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_pop_scope'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_find_symbol'
/usr/lib64/libglsl.so: undefined reference to `_mesa_new_shader'
/usr/lib64/libglsl.so: undefined reference to `_mesa_reference_shader'
/usr/lib64/libglsl.so: undefined reference to
`_mesa_symbol_table_add_global_symbol'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_push_scope'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_ctor'
/usr/lib64/libglsl.so: undefined reference to `_mesa_symbol_table_dtor'
collect2: ld returned 1 exit status

Applying this patch doesn't seem to affect it.


More information about the mesa-dev mailing list