[Mesa-dev] [PATCH] android: fix a build issue with libmesa_st_mesa_32

Tapani Pälli tapani.palli at intel.com
Wed Sep 7 07:36:23 UTC 2016


On 09/06/2016 06:06 PM, Emil Velikov wrote:
> On 6 September 2016 at 15:33, Chih-Wei Huang <cwhuang at android-x86.org> wrote:
>> 2016-08-29 16:52 GMT+08:00 Tapani Pälli <tapani.palli at intel.com>:
>>> make sure nir_opcodes.h is in LOCAL_GENERATED_SOURCES otherwise
>>> build fails with:
>>>
>>> "In file included from
>>> external/mesa/src/mesa/state_tracker/st_glsl_to_nir.cpp:44:
>>> external/mesa/src/compiler/nir/nir.h:42:10: fatal error: 'nir_opcodes.h' file not found"
>> Could you explain how to reproduce this error?
>>
>> Someone also reported a similar error to us recently.
>> However, from my debugging I can't see how it happens.
>> Any file which includes nir_opcodes.h should
>> get this dependency from its .P file:
>>
>> $OUT/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P
>> $OUT/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P
>>
>> cwhuang at icm05:~/git/marshmallow-x86$ grep nir_opcodes.h
>> $OUT/obj/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P
>>   out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
>> \
>>   out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
>> :
>> cwhuang at icm05:~/git/marshmallow-x86$ grep nir_opcodes.h
>> $OUT/obj_x86/STATIC_LIBRARIES/libmesa_st_mesa_intermediates/state_tracker/st_glsl_to_nir.P
>>   out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
>> \
>>   out/target/product/x86_64/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_opcodes.h
>> :
>>
>> So I can't reproduce this issue.
>>
>> Please refer to the discussion:
>>
>> https://groups.google.com/d/msg/android-x86/EwCIlPer1i8/M439AaULCQAJ
>>
> Thanks for this - it reminded me that I should push Rob's patch.

I just noticed that one of my replies to Rob's patch has somehow 
disappeared. Anyways, I did test it and it fixes a lot of failures. For 
me the complete build of Mesa does not still work though, I need to add 
following line to src/mesa/drivers/dri/i965/Android.gen.mk:

LOCAL_STATIC_LIBRARIES = libmesa_genxml

then everything builds and works fine!

> Please check 244f0aba16a7e197ed30e118a9978e200aee2c64 for more info,
> but the gist is that:
> a) there's a circular dependency and b) depending on the # of jobs
> (-j#) and Android build system 'version' you may or may not see the
> problem.
>
> -Emil


// Tapani



More information about the mesa-dev mailing list