Jvmpkg fails to build on mac osx

Hi there,

I am using the v0.8.0 commit (7b3a22) to build tvm and trying to compile android rpc based on that. However, on my mac (intel-chip), it fails to make jvmpkg when I follow the tutorial, any insights for how to resovle the issue?

[INFO] /bin/sh -c cd /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64 && javah -o /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64/target/custom-javah/org_apache_tvm_native_c_api.h -classpath /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64/target/classes:/Users/ligeng/Workspace/tvm/jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar org.apache.tvm.LibInfo
Unable to locate an executable at "/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home/bin/javah" (-1)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for TVM4J Package - Parent 0.0.1-SNAPSHOT:
[INFO]
[INFO] TVM4J Package - Parent ............................. SUCCESS [  2.522 s]
[INFO] TVM4J Package - Core ............................... SUCCESS [  8.944 s]
[INFO] TVM4J Package - Native Parent ...................... SUCCESS [  0.016 s]
[INFO] TVM4J Package - Native OSX-x86_64 .................. FAILURE [  0.081 s]
[INFO] TVM4J Package - Full Parent ........................ SKIPPED
[INFO] TVM4J Package - Full OSX-x86_64 .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  12.387 s
[INFO] Finished at: 2021-11-28T12:59:57-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:native-maven-plugin:1.0-alpha-7:javah (javah) on project libtvm4j-osx-x86_64: Error running javah command: Error executing command line. Exit code:2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :libtvm4j-osx-x86_64
make: *** [jvmpkg] Error 1

Seems the problem is at

[INFO] /bin/sh -c cd /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64 && javah -o /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64/target/custom-javah/org_apache_tvm_native_c_api.h -classpath /Users/ligeng/Workspace/tvm/jvm/native/osx-x86_64/target/classes:/Users/ligeng/Workspace/tvm/jvm/core/target/tvm4j-core-0.0.1-SNAPSHOT.jar org.apache.tvm.LibInfo
Unable to locate an executable at "/usr/local/opt/openjdk/libexec/openjdk.jdk/Contents/Home/bin/javah" 

Anyone met similar issue before?

The issue might be caused by the javah was depcreated and removed in recent releases.

The current workthrough I used is to degrade jdk to an older version. To fix this, the pom.xml files and related build shells needs to be changed via replacing javah with javac -h.

Downgrading to openjdk8 can temporally fix this issue.