Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-25777

JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 not found with out of source configuration and Ninja generator

    XMLWordPrintable

    Details

      Description

      10.6 doesn't work with Ninja for OOS (out-of-source) builds.
      It works with (IS) in-source with Ninja as well as OOS with make).

      $ cmake ../../10.6 -DCMAKE_BUILD_TYPE=Debug -DCONC_WITH_{UNITTEST,SSL}=OFF -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,PERFSCHEMA,SPIDER,SPHINX}=NO -DWITH_SAFEMALLOC=OFF -DWITH_SSL=bundled -DENABLE_GCOV=OFF -G Ninja
      -- Configuring done
      CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
      Please set them or make sure they are set and tested correctly in the CMake files:
      JAVA_INCLUDE_PATH (ADVANCED)
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
      JAVA_INCLUDE_PATH2 (ADVANCED)
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
         used as include directory in directory /home/anel/mariadb/10.6/storage/connect
      

      //Path to a file.
      JAVA_AWT_INCLUDE_PATH:PATH=JAVA_AWT_INCLUDE_PATH-NOTFOUND
      //Path to a library.
      JAVA_AWT_LIBRARY:FILEPATH=/usr/lib/jvm/default-java/lib/libjawt.so
      //Path to a file.
      JAVA_INCLUDE_PATH:PATH=JAVA_INCLUDE_PATH-NOTFOUND
      //Path to a file.
      JAVA_INCLUDE_PATH2:PATH=JAVA_INCLUDE_PATH2-NOTFOUND
      //Path to a library.
      JAVA_JVM_LIBRARY:FILEPATH=/usr/lib/jvm/default-java/lib/server/libjvm.so
      //Path to a program.
      Java_IDLJ_EXECUTABLE:FILEPATH=Java_IDLJ_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JARSIGNER_EXECUTABLE:FILEPATH=Java_JARSIGNER_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JAR_EXECUTABLE:FILEPATH=Java_JAR_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JAVAC_EXECUTABLE:FILEPATH=Java_JAVAC_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JAVADOC_EXECUTABLE:FILEPATH=Java_JAVADOC_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JAVAH_EXECUTABLE:FILEPATH=Java_JAVAH_EXECUTABLE-NOTFOUND
      //Path to a program.
      Java_JAVA_EXECUTABLE:FILEPATH=/usr/bin/java
      

      $ which java
      /usr/bin/java
      $ ls -la /usr/bin/|grep java
      lrwxrwxrwx  1 root   root           22 Dec 10 04:08 java -> /etc/alternatives/java
      $ dpkg -S java|grep bin/java
      openjdk-11-jre-headless:amd64: /usr/lib/jvm/java-11-openjdk-amd64/bin/java
      $ ls -la /usr/lib/jvm/
      total 24
      drwxr-xr-x   3 root root  4096 Apr 29 09:02 .
      drwxr-xr-x 160 root root 12288 Maj 25 08:03 ..
      lrwxrwxrwx   1 root root    25 Feb 20  2019 default-java -> java-1.11.0-openjdk-amd64
      lrwxrwxrwx   1 root root    21 Nov 10  2020 java-1.11.0-openjdk-amd64 -> java-11-openjdk-amd64
      -rw-r--r--   1 root root  2047 Apr 21 11:15 .java-1.11.0-openjdk-amd64.jinfo
      drwxr-xr-x   7 root root  4096 Apr 29 09:02 java-11-openjdk-amd64
      

      Related commit f9f8cae9fe22c13
      Related reference: FindJNI

      Note JNI_FOUND should be true iff both conditions are met:

      JAVA_INCLUDE_PATH     = the include path to jni.h
      JAVA_INCLUDE_PATH2    = the include path to jni_md.h
      JAVA_AWT_INCLUDE_PATH = the include path to jawt.h
       
      JAVA_AWT_LIBRARY      = the path to the jawt library
      JAVA_JVM_LIBRARY      = the path to the jvm library
      JNI_LIBRARIES         = the libraries to use
       
      JNI_FOUND             = TRUE if JNI headers and libraries were found.
      

        Attachments

          Activity

            People

            Assignee:
            anel Anel Husakovic
            Reporter:
            anel Anel Husakovic
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration