1 Reply Latest reply: Mar 27, 2014 2:57 PM by Hybridprogrammer RSS

    Build Errors Oracle NoSQL C API

    Hybridprogrammer

      Hi,

       

      I am trying to build the Oracle NoSQL Database C Client Driver available from: Oracle NoSQL Database Downloads

      kv-c-2.1.57.tar

       

      I get the following error when I try to run cmake:

       

      -- The C compiler identification is GNU

      -- The CXX compiler identification is GNU

      -- Check for working C compiler: /usr/bin/gcc

      -- Check for working C compiler: /usr/bin/gcc -- works

      -- Detecting C compiler ABI info

      -- Detecting C compiler ABI info - done

      -- Check for working CXX compiler: /usr/bin/c++

      -- Check for working CXX compiler: /usr/bin/c++ -- works

      -- Detecting CXX compiler ABI info

      -- Detecting CXX compiler ABI info - done

      CMake Error at CMakeLists.txt:71 (message):

        Could not find JNI

       

       

      -- Configuring incomplete, errors occurred!

       

      My environment:

      I am running Oracle Linux 6.5. Extracted Java's jdk to /usr/local/jdk1.7.0_51 and set JAVA_HOME to /usr/local/jdk1.7.0_51

       

      I've already installed the prerequisite listed in BUILDING.html:

       

      1. KVHOME=/var/kv/kv-2.1.57

      2. Java version 1.7 update 51

      3. Avro C library installed in default location: /usr/local

       

      Any ideas?

       

      Thanks,

      Jason

        • 1. Re: Build Errors Oracle NoSQL C API
          Hybridprogrammer

          Ok, I was able to resolve my problem by uninstalling cmake from yum and manually building the latest version from CMake - Cross Platform Make. (as of this writing the current stable version is 2.8.12.2).

           

          Pretty simple install

          wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz

          tar -xvvf cmake-2.8.12.2.tar.gz

          cd cmake-2.8.12.2

          ./bootstrap

          make

          make install

          update your PATH

           

          After this I was able to run cmake again for kv-c-2.1.57 with success.

           

          However then I encountered another problem during make with the following error message:

          ld warning libmawt.so not found (not exact error, can't remember)

          /usr/lib/jvm/jre/lib/amd64/libjawt.so: undefined reference to `awt_FreeDrawingSurface@SUNWprivate_1.1'

          ...

           

          To fix this I ran:

           

          locate libmawt.so

           

          choose the one with jre/lib/amd64/xawt and set this path to RPATH in my environment.

           

          export RPATH=/your/path/may/vary/jre/lib/amd64/xawt

           

          Then ran make again. Then make install. Success!

           

          Hope this helps someone else.

           

          Thanks,

          Jason