Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-9435

Support building the JNI code against the IBM JVM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.1-beta
    • build

    Description

      When native build hadoop-common-project with IBM java using command like:
      mvn package -Pnative
      it will exist the following errors.
      [exec] – Configuring incomplete, errors occurred!
      [exec] JAVA_HOME=, JAVA_JVM_LIBRARY=/home/louis/ibm-java-i386-60/jre/lib/i386/classic/libjvm.so
      [exec] JAVA_INCLUDE_PATH=/home/louis/ibm-java-i386-60/include, JAVA_INCLUDE_PATH2=JAVA_INCLUDE_PATH2-NOTFOUND
      [exec] CMake Error at JNIFlags.cmake:113 (MESSAGE):
      [exec] Failed to find a viable JVM installation under JAVA_HOME.
      [exec] Call Stack (most recent call first):
      [exec] CMakeLists.txt:24 (include)

      The reason is that IBM java uses $JAVA_HOME/include/jniport.h instead of $JAVA_HOME/include/jni_md.h in non-IBM java.

      [exec] /usr/lib/jvm/java-1.6.0-ibm-1.6.0.12.0.x86_64/jre/lib/amd64/default/libjvm.so: undefined reference to `dlsym'
      [exec] /usr/lib/jvm/java-1.6.0-ibm-1.6.0.12.0.x86_64/jre/lib/amd64/default/libjvm.so: undefined reference to `dlerror'
      [exec] /usr/lib/jvm/java-1.6.0-ibm-1.6.0.12.0.x86_64/jre/lib/amd64/default/libjvm.so: undefined reference to `dladdr'
      [exec] /usr/lib/jvm/java-1.6.0-ibm-1.6.0.12.0.x86_64/jre/lib/amd64/default/libjvm.so: undefined reference to `dlopen'
      [exec] /usr/lib/jvm/java-1.6.0-ibm-1.6.0.12.0.x86_64/jre/lib/amd64/default/libjvm.so: undefined reference to `dlclose'
      [exec] collect2: ld returned 1 exit status
      [exec] make[2]: *** [test_libhdfs_ops] Error 1
      [exec] make[1]: *** [CMakeFiles/test_libhdfs_ops.dir/all] Error 2
      [exec] make: *** [all] Error

      The reason is libjvm.so need libdl when linking.

      Attachments

        1. HADOOP-9435.patch
          0.9 kB
          Tian Hong Wang
        2. HADOOP-9435-v1.patch
          1 kB
          Tian Hong Wang

        Activity

          People

            tianhonglouis Tian Hong Wang
            tianhonglouis Tian Hong Wang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: