Fedora Linux Support Community & Resources Center
  #1  
Old 20th December 2007, 01:09 PM
elmerfud Offline
Registered User
 
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
Reply With Quote
  #2  
Old 20th December 2007, 04:53 PM
aleph Offline
Banned (for/from) behaving just like everybody else!
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307
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.
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.
Reply With Quote
  #3  
Old 20th December 2007, 04:57 PM
FriedChips Offline
Registered User
 
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
Reply With Quote
  #4  
Old 20th December 2007, 09:10 PM
elmerfud Offline
Registered User
 
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 ?
Reply With Quote
  #5  
Old 20th December 2007, 09:40 PM
elmerfud Offline
Registered User
 
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 ?
Reply With Quote
  #6  
Old 20th December 2007, 11:17 PM
elmerfud Offline
Registered User
 
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; 20th December 2007 at 11:33 PM.
Reply With Quote
Reply

Tags
application, built, file, library

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ld can not find library chenpeib Using Fedora 2 15th May 2007 01:49 PM
ldd can not find a static library jsanza@terra.es Using Fedora 0 19th September 2006 05:39 PM
ldd can not find a static library jsanza@terra.es Using Fedora 0 19th September 2006 05:20 PM
Fedora's Tomcat can't find jar library ?? Coenos Using Fedora 11 5th August 2006 09:52 AM
SimGear can't find Openal Library but it is installed Kingtu Using Fedora 1 22nd May 2005 06:01 AM


Current GMT-time: 13:24 (Sunday, 20-04-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat