You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/11/08 05:37:26 UTC

[GitHub] [tvm] echuraev commented on a diff in pull request #13305: [CPP_RPC][ANDROID] Fix cpp_rpc build failure

echuraev commented on code in PR #13305:
URL: https://github.com/apache/tvm/pull/13305#discussion_r1016156766


##########
docker/Dockerfile.ci_adreno:
##########
@@ -25,4 +25,5 @@ COPY install/ubuntu_install_androidsdk.sh /install/ubuntu_install_androidsdk.sh
 RUN bash /install/ubuntu_install_androidsdk.sh
 ENV ANDROID_HOME=/opt/android-sdk-linux
 ENV ANDROID_NDK_HOME=/opt/android-sdk-linux/ndk/21.3.6528147
+ENV ANDROID_NDK_MAJOR=21

Review Comment:
   I have doubts about explicit setting of the environment variable. As @lhez wrote, the `ANDROID_NDK_MAJOR` should be provided by NDK. 



##########
apps/cpp_rpc/CMakeLists.txt:
##########
@@ -32,6 +32,14 @@ if (OS)
    endif()
 endif()
 
+if(USE_OPENCL)
+   if (ANDROID_ABI)
+     if($ENV{ANDROID_NDK_MAJOR} VERSION_LESS "23")
+       set_property(TARGET tvm_rpc PROPERTY LINK_FLAGS -fuse-ld=gold)

Review Comment:
   Also, I don't understand how `-fuse-ld=gold` helps to fix your [issue](https://github.com/apache/tvm/pull/13118#issuecomment-1304477305). In the log, I see that the linker cannot find `libOpenCL.so`. By manually specifying `-fuse-ld=gold` you just force compiler to use `ld.gold` and how changing linker helps you find this library? Unfortunately, I'm not able to reproduce this issue locally with docker. I don't have access to pull the `adreno_ci` docker image.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org