[Mesa-dev] [PATCH] glsl: Don't add nir files to libglsl_la_SOURCES

Brian Paul brianp at vmware.com
Fri Jan 8 15:53:12 PST 2016


Still doesn't work for me:


scons: done reading SConscript files.
scons: Building targets ...
   Compiling src/mesa/main/shaderapi.c ...
   Linking 
build/linux-x86_64-debug/gallium/targets/libgl-xlib/libGL.so.1.5 ...
build/linux-x86_64-debug/mesa/libmesa.a(shaderapi.os): In function 
`compile_shader':
/home/projects/Mesa-llvm/mesa/src/mesa/main/shaderapi.c:977: undefined 
reference to `_mesa_shader_stage_to_string'
/home/projects/Mesa-llvm/mesa/src/mesa/main/shaderapi.c:1008: undefined 
reference to `_mesa_shader_stage_to_string'
build/linux-x86_64-debug/mesa/libmesa.a(shaderapi.os): In function 
`print_shader_info':
/home/projects/Mesa-llvm/mesa/src/mesa/main/shaderapi.c:1082: undefined 
reference to `_mesa_shader_stage_to_string'
build/linux-x86_64-debug/mesa/libmesa.a(ir_to_mesa.os): In function 
`get_mesa_program':
/home/projects/Mesa-llvm/mesa/src/mesa/program/ir_to_mesa.cpp:2681: 
undefined reference to `_mesa_shader_stage_to_string'
build/linux-x86_64-debug/mesa/libmesa.a(st_glsl_to_tgsi.os): In function 
`get_mesa_program':
/home/projects/Mesa-llvm/mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5681: 
undefined reference to `_mesa_shader_stage_to_string'
build/linux-x86_64-debug/mesa/libmesa.a(st_glsl_to_tgsi.os):/home/projects/Mesa-llvm/mesa/src/mesa/state_tracker/st_glsl_to_tgsi.cpp:5795: 
more undefined references to `_mesa_shader_stage_to_string' follow
collect2: error: ld returned 1 exit status
scons: *** 
[build/linux-x86_64-debug/gallium/targets/libgl-xlib/libGL.so.1.5] Error 1



Let's make sure the fix is tested/verified before committing.


-Brian


On 01/08/2016 04:49 PM, Jose Fonseca wrote:
> Looks great. Thanks.
>
> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
>
> We really need to get NIR into SCons.  There's no reason not to.  It
> takes time, but when consider the time we all spend with build issues,
> it's probably not that much.
>
> Jose
>
> On 08/01/16 23:44, Kristian Høgsberg wrote:
>> From: Kristian Høgsberg Kristensen <kristian.h.kristensen at intel.com>
>>
>> SCons doesn't understand nir yet and doesn't want to compile the glsl to
>> nir pass. Move the files to their own variable so we can add it only for
>> automake.
>> ---
>>
>> I'm currently build testing this just to be sure, but this should fix
>> the SCons build breakage in my previous commit.
>>
>> Kristian
>>
>>   src/glsl/Makefile.am      | 4 ++--
>>   src/glsl/Makefile.sources | 7 +++++--
>>   2 files changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
>> index 33a34e4..95efdb3 100644
>> --- a/src/glsl/Makefile.am
>> +++ b/src/glsl/Makefile.am
>> @@ -144,8 +144,8 @@ libglsl_la_SOURCES =                    \
>>       glsl_parser.h                    \
>>       $(LIBGLSL_FILES)                \
>>       $(NIR_FILES)                    \
>> -    $(NIR_GENERATED_FILES)
>> -
>> +    $(NIR_GENERATED_FILES)                \
>> +    $(GLSL_TO_NIR_FILES)
>>
>>   libnir_la_SOURCES =                    \
>>       $(NIR_FILES)                    \
>> diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
>> index 4da9b07..fd28f5c 100644
>> --- a/src/glsl/Makefile.sources
>> +++ b/src/glsl/Makefile.sources
>> @@ -182,8 +182,6 @@ LIBGLSL_FILES = \
>>       lower_output_reads.cpp \
>>       lower_shared_reference.cpp \
>>       lower_ubo_reference.cpp \
>> -    nir/glsl_to_nir.cpp \
>> -    nir/glsl_to_nir.h \
>>       opt_algebraic.cpp \
>>       opt_array_splitting.cpp \
>>       opt_conditional_discard.cpp \
>> @@ -213,6 +211,11 @@ LIBGLSL_FILES = \
>>       s_expression.cpp \
>>       s_expression.h
>>
>> +# glsl to nir pass
>> +GLSL_TO_NIR_FILES = \
>> +    nir/glsl_to_nir.cpp \
>> +    nir/glsl_to_nir.h
>> +
>>   # glsl_compiler
>>
>>   GLSL_COMPILER_CXX_FILES = \
>>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list