Results 1 to 2 of 2

Thread: building java jni library missing symbol

Hybrid View

  1. #1
    Join Date
    Mar 2007

    building java jni library missing symbol

    I am trying to build a program I found on the net to turn the lights on my alienware computer. When I run it I get the error.

    /usr/lib/jvm/java-7-oracle- symbol lookup error: /home/dp42/workspace/jAlienFX/linuxLibSrc/ undefined symbol: libusb_init

    A quick check of the library indicates a unlinked symbol libusb_init. This symbol is from the library. An strace -fo of the running program indicates no attempt to access this library.
    LD_LIBRARY_PATH includes /usr/lib/x86_64-linux-gnu
    An ldd on the shows a lib of dependencies, ie

    ldd => (0x00007fff4b7ff000) => /usr/lib/x86_64-linux-gnu/ (0x00007f3c80af7000) => /lib/x86_64-linux-gnu/ (0x00007f3c808e1000) => /lib/x86_64-linux-gnu/ (0x00007f3c80523000) => /lib/x86_64-linux-gnu/ (0x00007f3c80229000)

    Now I assume that I need to see something like => /lib/x86_64-linux-gnu/ blah blah

    Q. How do I insert such a dependencies, my current build script is

    g++ -I/usr/include/libusb-1.0 -I/usr/lib/jvm/java-7-openjdk/include -I/usr/lib/jvm/java-7-openjdk/include/linux -g -fPIC -L/usr/lib/x86_64-linux-gnu -lusb -lpthread -shared -Wl,-soname, -o main.cpp

  2. #2
    Join Date
    Jul 2011

    Re: building java jni library missing symbol

    Use LD_PRELOAD as a workaroud. I'm not sure this is a solution but it works for me. I've given my answer here

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts