Giter VIP home page Giter VIP logo

/opt/AI/llm_obj/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc:232:31: error: cannot initialize a parameter of type 'void **' with an rvalue of type 'JNIEnv **' (aka 'JNIEnv_ **') 232 | _jvm->AttachCurrentThread(&env, nullptr); | ^~~~ /usr/local/java/jdk-17.0.11/include/jni.h:1938:37: note: passing argument to parameter 'penv' here 1938 | jint AttachCurrentThread(void **penv, void *args) { | ^ /opt/AI/llm_obj/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc:309:31: error: cannot initialize a parameter of type 'void **' with an rvalue of type 'JNIEnv **' (aka 'JNIEnv_ **') about mlc-llm HOT 4 CLOSED

lbl1120 avatar lbl1120 commented on June 2, 2024
/opt/AI/llm_obj/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc:232:31: error: cannot initialize a parameter of type 'void **' with an rvalue of type 'JNIEnv **' (aka 'JNIEnv_ **') 232 | _jvm->AttachCurrentThread(&env, nullptr); | ^~~~ /usr/local/java/jdk-17.0.11/include/jni.h:1938:37: note: passing argument to parameter 'penv' here 1938 | jint AttachCurrentThread(void **penv, void *args) { | ^ /opt/AI/llm_obj/mlc-llm/3rdparty/tvm/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc:309:31: error: cannot initialize a parameter of type 'void **' with an rvalue of type 'JNIEnv **' (aka 'JNIEnv_ **')

from mlc-llm.

Comments (4)

tqchen avatar tqchen commented on June 2, 2024

likely it depends on the JNI environment you are using, previosly android jni was directly triggred as https://github.com/apache/tvm/blob/main/jvm/native/src/main/native/org_apache_tvm_native_c_api.cc#L232 which pass in the address and normal java should not have TVM4J_ANDROID defined, whichi will trigger the other path that relates to here. I am not sure what was specifically happening in your case

from mlc-llm.

lbl1120 avatar lbl1120 commented on June 2, 2024

I modified this file
/mlc-llm/android/library/CMakeLists.txt
Added this content
2024-05-04_094517

The following is the configuration of my environment variables

2024-05-04_094237

from mlc-llm.

tqchen avatar tqchen commented on June 2, 2024

This is due to your JAVA_HOME setting, we highly recommend pointing to Android studio's jdk, see also #2327

from mlc-llm.

tqchen avatar tqchen commented on June 2, 2024

checkout the latest instructions here https://llm.mlc.ai/docs/deploy/android.html

from mlc-llm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.