FedoraForum.org - Fedora Support Forums and Community
Results 1 to 6 of 6

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2007
    Posts
    59

    Built application can't find library file...

    I am building an application that uses libftd2xx.so on Fedora 8.

    My build process is similar to the one outlined here:
    http://moteprime.org/article.php?id=27

    Everything works fine except when I go to run my application, I get the following:

    $src/openocd
    $src/openocd: error while loading shared libraries: libftd2xx.so.0: cannot open shared object file: No such file or directory

    Yet:

    $ ls -l /usr/lib/libftd*
    lrwxrwxrwx 1 root root 29 2007-12-19
    23:30 /usr/lib/libftd2xx.so -> /usr/local/lib/libftd2xx.so.0

    $ ls -l /usr/local/lib/libftd*
    lrwxrwxrwx 1 root root 14 2007-12-19 23:27 /usr/local/lib/libftd2xx.so -> libftd2xx.so.0
    -rwx------ 1 root root 319466 2007-12-19 22:22 /usr/local/lib/libftd2xx.so.0

    Why can't my application find these library files ?

    Thanks

  2. #2
    aleph's Avatar
    aleph is offline Banned (for/from) behaving just like everybody else!
    Join Date
    Jul 2007
    Location
    Nanjing, China
    Posts
    1,332
    Quote Originally Posted by elmerfud
    -rwx------ 1 root root 319466 2007-12-19 22:22 /usr/local/lib/libftd2xx.so.0

    Why can't my application find these library files ?

    Thanks
    you don't have read/execute privilege of the library. chmod it so you can load it.
    Code:
    from rlyeh import cthulhu
    cthulhu.fhtagn()

  3. #3
    Join Date
    Jul 2007
    Location
    Indiana USA
    Posts
    1,715
    yup looks like that will not work unless you are running your program as root. Try:
    Code:
    su
    chmod 755 /usr/local/lib/libftd2.xx.so.0
    The answer to all of lifes questions are buried somewhere in the Google search engine.

    Code:
    [Stephen@localhost ~]$ whatis this?
    this?: nothing appropriate

  4. #4
    Join Date
    Jul 2007
    Posts
    59
    I did test it running as root and it failed.
    I think you are right that the execute bit needs to be set. Would that do it ?

  5. #5
    Join Date
    Jul 2007
    Posts
    59
    Same problem, running as a regular user or as root.

    # src/openocd
    src/openocd: error while loading shared libraries: libftd2xx.so.0: cannot open shared object file: No such file or directory

    $ src/openocd
    src/openocd: error while loading shared libraries: libftd2xx.so.0: cannot open shared object file: No such file or directory

    yet:
    # ls -l /usr/local/lib/libftd2xx.so.0
    -rwxr-xr-x 1 root root 319466 2007-12-19 22:22 /usr/local/lib/libftd2xx.so.0

    I also have:
    # ls -l /usr/local/lib/libftd2xx*
    lrwxrwxrwx 1 root root 14 2007-12-19 23:27 /usr/local/lib/libftd2xx.so -> libftd2xx.so.0
    -rwxr-xr-x 1 root root 319466 2007-12-19 22:22 /usr/local/lib/libftd2xx.so.0

    and:
    # ls -l /usr/lib/libftd2xx*
    lrwxrwxrwx 1 root root 29 2007-12-19 23:30 /usr/lib/libftd2xx.so -> /usr/local/lib/libftd2xx.so.0

    Is there a path variable that tells an application where to look for a lib file ?

  6. #6
    Join Date
    Jul 2007
    Posts
    59
    I found the problem. The application is looking in /usr/lib.

    I created a link (libftd2xx.so) in /usr/lib to the real lib file in /usr/local/lib.

    The link needs to be named libftd2xx.so.0, not libftd2xx.so

    BTW: the command to name the link libftd2xx.so came from the readme.dat included with the compiled source. It should have said libftd2xx.so.0

    I also had to turn SELinux off to get this to run without an error. I'll look into that later.
    Last edited by elmerfud; 21st December 2007 at 12:33 AM.

Similar Threads

  1. ld can not find library
    By chenpeib in forum Using Fedora
    Replies: 2
    Last Post: 15th May 2007, 01:49 PM
  2. ldd can not find a static library
    By jsanza@terra.es in forum Using Fedora
    Replies: 0
    Last Post: 19th September 2006, 05:39 PM
  3. ldd can not find a static library
    By jsanza@terra.es in forum Using Fedora
    Replies: 0
    Last Post: 19th September 2006, 05:20 PM
  4. Fedora's Tomcat can't find jar library ??
    By Coenos in forum Using Fedora
    Replies: 11
    Last Post: 5th August 2006, 09:52 AM
  5. Replies: 1
    Last Post: 22nd May 2005, 06:01 AM

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
  •