Closed haohenggang closed 2 months ago
@haohenggang is_base_of_v
is a feature available since C++17. Given we use the clang in Android NDK to compile the source files, could you check if the clang in your android ndk supports C++17?
For example, assuming you have set the environment variables TVM_NDK_CC
as described in our documentation, than you can run
$TVM_NDK_CC -v
to check the clang version.
use ndk 27
Hello,
I have the same problem with you, have you fixed this problem?
@tombang I had the same problem, updating ndk to 27 worked for me
Please use the latest ndk
Please use the latest ndk, see related issue https://github.com/mlc-ai/mlc-llm/issues/2696
I had the same problem, after using the latest version of the NDK and then deleting the path/to/android/MLCChat/build
and path/to/android/MLCChat/dist
directories, and then re-running the commands, it worked!
š Bug
mlc_llm package [100%] Building CXX object CMakeFiles/tvm4j_runtime_packed.dir/home/hhg/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc.o In file included from /home/hhg/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc:25: In file included from /home/hhg/mlc-llm/android/mlc4j/src/cpp/tvm_runtime.h:9: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/src/runtime/c_runtime_api.cc:27: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/device_api.h:28: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/ndarray.h:28: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/container/optional.h:29: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/container/./base.h:29: In file included from /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/memory.h:26: /home/hhg/mlc-llm/android/mlc4j/../../3rdparty/tvm/include/tvm/runtime/object.h:574:67: error: no template named 'is_base_of_v' in namespace 'std'; did you mean 'is_base_of'? template <typename ObjectType, typename = std::enable_if_t<std::is_base_of_v<Object, ObjectType>>>