<div dir="ltr">Hi Rob,<br><div class="gmail_quote"><div dir="ltr">Il giorno gio 2 ago 2018 alle ore 22:33 Rob Herring <<a href="mailto:rob.herring@linaro.org">rob.herring@linaro.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Aug 2, 2018 at 12:47 AM Mauro Rossi <<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> Il giorno gio 2 ago 2018 alle ore 02:06 John Stultz <<a href="mailto:john.stultz@linaro.org" target="_blank">john.stultz@linaro.org</a>> ha scritto:<br>
>><br>
>> Just as a heads up, with mesa3d master (plus my other build fixups I<br>
>> just sent out), I'm seeing a new build failure when building under<br>
>> AOSP/master:<br>
>><br>
>> external/mesa3d/src/amd/vulkan/Android.mk: error: vulkan.radv<br>
>> (SHARED_LIBRARIES android-arm64) missing libLLVM (SHARED_LIBRARIES<br>
>> android-arm64)<br>
>> You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if<br>
>> this is intentional, but that may defer real problems until later in<br>
>> the build.<br>
>> external/mesa3d/src/amd/vulkan/Android.mk: error: vulkan.radv<br>
>> (SHARED_LIBRARIES android-arm) missing libLLVM (SHARED_LIBRARIES<br>
>> android-arm)<br>
>> You can set ALLOW_MISSING_DEPENDENCIES=true in your environment if<br>
>> this is intentional, but that may defer real problems until later in<br>
>> the build.<br>
>> build/make/core/<a href="http://main.mk:842" rel="noreferrer" target="_blank">main.mk:842</a>: error: exiting from previous errors.<br>
>> 22:56:25 ckati failed with: exit status 1<br>
>><br>
>> This seems to be coming from the $(call mesa-build-with-llvm) line here:<br>
>> <a href="https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/Android.mk#L144" rel="noreferrer" target="_blank">https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/Android.mk#L144</a><br>
>><br>
>> (as commenting that out avoids the issue)<br>
>><br>
>> This gets pulled in as AOSP will check library dependencies for all<br>
>> SHARED_LIBRARIES, so that's why the vulkan.radv trips this while other<br>
>> "mesa-build-with-llvm" callers don't (they are built as<br>
>> STATIC_LIBRARIES).<br>
>><br>
>> Last time we had this issue, it was with the libpciaccess library,<br>
>> which we solved it by dropping it.<br>
>><br>
>> In this case I'm not sure what the best solution might be.<br>
>><br>
>> * We could set it as a static library instead?<br>
>><br>
>> * Alternatively, it seems we might be able to use the libLLVM_android<br>
>> library instead of libLLVM here:<br>
>>   <a href="https://github.com/mesa3d/mesa/blob/master/Android.mk#L107" rel="noreferrer" target="_blank">https://github.com/mesa3d/mesa/blob/master/Android.mk#L107</a><br>
>><br>
>> Other ideas/suggestions?<br>
>><br>
>> thanks<br>
>> -john<br>
><br>
><br>
> A couple of ideas, but not yet tested in a build<br>
><br>
> option 3) - use LOCAL_MODULE_TARGET_ARCH in the local vulkan.radv Android.mk and see if that solves the problem<br>
><br>
> option 4) - brace the 'include $(LOCAL_PATH)/vulkan/Android.mk' in vulkan.radv src/amd/Android.mk in like this:<br>
><br>
>  # Import variables<br>
>  include $(LOCAL_PATH)/Makefile.sources<br>
>  include $(LOCAL_PATH)/<a href="http://Android.addrlib.mk" rel="noreferrer" target="_blank">Android.addrlib.mk</a><br>
>  include $(LOCAL_PATH)/<a href="http://Android.common.mk" rel="noreferrer" target="_blank">Android.common.mk</a><br>
> +ifneq ($(filter radeonsi,$(BOARD_GPU_DRIVERS)),)<br>
> include $(LOCAL_PATH)/vulkan/Android.mk<br>
> +endif<br>
><br>
> I think the option 4) seems simpler than the others , if the assumption that ARM does not have radeonsi stands<br>
<br>
Using AMD cards on ARM is not unheard of, but perhaps not on Android.<br>
<br>
Rob<br></blockquote><div><br></div><div>Thanks for information</div><div><br></div><div>In any case if mesa amd drivers had to be built  with arm targets</div><div>then libLLVM dependency would become necessary (AMDGPU targets)</div><div><br></div><div>The facts that AOSP in master decimated the content of libLLVM_android library</div><div>and the constraint of mesa for llvm 6.0 or later would required to add llvm relase_60 or release_70</div><div>as a separate project.</div><div><br></div><div>So, in case amd drivers will be built for arm in android, given the constraints, then the patch is still ok</div><div>Mauro</div><div><br></div></div></div>