mlc-llm
mlc-llm copied to clipboard
package Base does not exist
When I build apk met this problem? Could give me some tips about it?
Task :app:generateJniHeaders FAILED /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:44: error: package Base does not exist native int tvmFuncGetGlobal(String name, Base.RefLong handle); ^ /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:46: error: package Base does not exist native int tvmFuncCall(long handle, Base.RefTVMValue retVal); ^ /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:48: error: package Function does not exist native int tvmFuncCreateFromCFunc(Function.Callback function, Base.RefLong handle); ^ /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:48: error: package Base does not exist native int tvmFuncCreateFromCFunc(Function.Callback function, Base.RefLong handle); ^ /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:56: error: package Base does not exist int queryImports, Base.RefLong retHandle); ^ /home/user/Workspace/Projects/NLP/mlc-llm/android/MLCChat/app/../../build/tvm_home/jvm/core/src/main/java/org/apache/tvm/LibInfo.java:64: error: package Base does not exist int deviceType, int deviceId, Base.RefLong refHandle); ^ 6 errors Thanks
@starlitsky2010 Thanks for the feedback! Indeed we missed some dependency steps before and that was not complete enough for building the app locally. We just pushed #124 which contains more instructions and can likely address the issue you met. You can pull the main branch and try building again, thanks!
Thanks a lot. It works on the edge side well. Here is anther change for building this application I've made to make it build normally. --- a/android/MLCChat/app/build.gradle +++ b/android/MLCChat/app/build.gradle @@ -28,7 +28,7 @@ task deleteLibs(type: Delete, description: "Delete Compiled Libraries") { task buildJni(type: Exec, description: 'Build JNI libs') { dependsOn "deleteLibs" def buildPath = "${project.projectDir}/src/main/jni"
- commandLine "ndk-build", "--directory", buildPath
- commandLine "/home/user/Workspace/Tools/Android/android-sdk-linux/ndk/25.2.9519653/ndk-build", "--directory", buildPath }