Fedora Linux Support Community & Resources Center
  #1  
Old 10th October 2011, 09:35 PM
Fahim Offline
Registered User
 
Join Date: Mar 2010
Location: Pullman, WA
Posts: 25
linuxchrome
file not found while using make: symbolic link errors

Running Fedora 15-64 bit on HP Elitebook 8530p.

When executing make, I get the following message:

Code:
/usr/bin/ld: cannot find -l/lib64/libusb-1.0.so.0
/usr/bin/ld: cannot find -l/usr/lib64/libbluetooth.so.3
collect2: ld returned 1 exit status
However it seems, files do exist in the folder:

Code:
[root@localhost lib64]# ls -l  /usr/lib64/libbluetooth*
lrwxrwxrwx 1 root root     22 Oct  7 12:31 /usr/lib64/libbluetooth.so -> libbluetooth.so.3.10.3
lrwxrwxrwx 1 root root     22 Sep  7 12:04 /usr/lib64/libbluetooth.so.3 -> libbluetooth.so.3.10.3
-rwxr-xr-x 1 root root 111520 Jun 28 10:20 /usr/lib64/libbluetooth.so.3.10.3
Code:
[root@localhost lib64]# ls -l  /lib64/libusb*
lrwxrwxrwx  1 root root    19 Sep  7 12:04 /lib64/libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rwxr-xr-x  1 root root 20376 Jun 22 03:09 /lib64/libusb-0.1.so.4.4.4
-rw-r--r--  1 root root 85498 Feb  8  2011 /lib64/libusb-1.0.a
lrwxrwxrwx  1 root root    19 Oct  7 11:21 /lib64/libusb-1.0.so -> libusb-1.0.so.0.0.0
lrwxrwxrwx. 1 root root    19 May 13 14:42 /lib64/libusb-1.0.so.0 -> libusb-1.0.so.0.0.0
-rwxr-xr-x  1 root root 56280 Feb  8  2011 /lib64/libusb-1.0.so.0.0.0
-rw-r--r--  1 root root 19362 Jun 22 03:09 /lib64/libusb.a
lrwxrwxrwx  1 root root    19 Oct  7 11:21 /lib64/libusb.so -> libusb-0.1.so.4.4.4
Comparing ldd results for two different packages. First one fails, latter succeeds:

Code:
[root@localhost Linux]# ldd testBluetooth
	linux-gate.so.1 =>  (0x00a8f000)
	libusb-1.0.so.0 => not found
	libbluetooth.so.3 => not found
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x001eb000)
	libm.so.6 => /lib/libm.so.6 (0x4d635000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4bda2000)
	libc.so.6 => /lib/libc.so.6 (0x4d301000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x4d5bc000)
	/lib/ld-linux.so.2 (0x4d2e0000)
Code:
[root@localhost Linux]# ldd /usr/bin/nxtrc 
	linux-vdso.so.1 =>  (0x00007fff20be5000)
	libbluetooth.so.3 => /usr/lib64/libbluetooth.so.3 (0x0000003aa9000000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003aa7800000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003aa7400000)
Here are the relevant parts of the make file:
Code:
CC = g++
CFLAGS = -c -Wall -m64  #-g
BLIB = -l/usr/lib64/llibbluetooth.so.3
ULIB = -l/lib64/libusb-1.0.so.0

INCBLUE = -I/usr/include/bluetooth/
INCUSB = -I-l/usr/include/libusb-1.0/

testUsb: testUsb.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o 
	$(CC) $(ULIB) $(BLIB) $(INCBLUE) $(INCUSB)  testUsb.cpp f1.o f2.o f3.of4.o f5.o f6.o f7.o f8.o f9.o -o testUsb  -Wall

testBluetooth: testBluetooth.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o
	$(CC) $(ULIB) $(BLIB) $(INCBLUE) $(INCUSB) testBluetooth.cpp f1.o f2.o f3.o f4.o f5.o f6.o f7.o f8.o f9.o -o testBluetooth -Wall
Reference for CFLAGS
Thanks.

Last edited by Fahim; 11th October 2011 at 02:21 AM.
Reply With Quote
  #2  
Old 11th October 2011, 12:28 AM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128
linuxfirefox
Re: file not found while using make: symbolic link errors

I don't know what it fails with /lib64/libusb-1.0.so.0, but in the make file there seems to be one too many l's in /usr/lib64/llibbluetooth.so.3

Did you install some shared object files and not do, as root, the ldconfig command afterwards?

Last edited by PabloTwo; 11th October 2011 at 12:33 AM.
Reply With Quote
  #3  
Old 11th October 2011, 01:47 AM
Fahim Offline
Registered User
 
Join Date: Mar 2010
Location: Pullman, WA
Posts: 25
linuxubuntufirefox
Re: file not found while using make: symbolic link errors

Thanks for catching the typo; I did fix it, but to no avail. And, I did install those libusb and bluez packages, and did run ldconfig, as root, afterwards.
Reply With Quote
  #4  
Old 11th October 2011, 02:30 AM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128
linuxfirefox
Re: file not found while using make: symbolic link errors

Well, I'm not a programmer, and I really don't know much about constructing make files (I am now guessing the make file is one you created yourself), but if your compiling code, it seems logical that you need to be compiling with the header files and not the compiled binaries of libblutoodh.so.xxxxx and libusb.so.xxxx. The bluez-libs-devel and libusb-devel packages provide those.

When you install a Fedora rpm package that contains shared object files, the ldconfig command is run in a post-install script. I made my comment about using ldconfig thinking you might have possibly installed those libraries in some other manner.
Code:
BASH:~/-> rpm -q --scripts libusb
postinstall program: /sbin/ldconfig
postuninstall program: /sbin/ldconfig
Reply With Quote
  #5  
Old 11th October 2011, 12:01 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
linuxfirefox
Re: file not found while using make: symbolic link errors

You are using wrong syntax for the -l options. You must omit the path, the "lib" prefix and the ".so" suffix from the library name. The makefile should have:
Code:
BLIB=-lbluetooth
ULIB=-lusb-1.0
Reply With Quote
  #6  
Old 11th October 2011, 03:30 PM
Fahim Offline
Registered User
 
Join Date: Mar 2010
Location: Pullman, WA
Posts: 25
linuxubuntufirefox
Re: file not found while using make: symbolic link errors

Made the changes as you suggested, the error is gone but, the output for ldconfig remains the same. it isn't finding libusb-1.0.so.0
Reply With Quote
  #7  
Old 11th October 2011, 04:49 PM
giulix's Avatar
giulix Offline
"Fixed" by (vague) request
 
Join Date: Oct 2005
Location: GMT+ 1
Posts: 2,950
linuxfirefox
Re: file not found while using make: symbolic link errors

You can get around that problem by defining a symbolic link and linking against it. For example, to link against /usr/lib/libusb-1.0.so.0, you can create a symbolic link named libusb.so in the current directory and link against it with
Code:
ln -s /usr/lib/libusb-1.0.so.0 libusb.so
gcc -g -o program program.c -L. -lusb
Reply With Quote
Reply

Tags
ldd, libbluetooth, libusb, make, symbolic link

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
Issues installing ossec-hids-2.0; make file can not be found ddxC Installation and Live Media 1 19th March 2009 07:54 PM
Need help with yum - not a symbolic link errors. asmadi Using Fedora 13 26th January 2009 12:23 AM
How to make a symbolic link permanent royeo Using Fedora 2 6th October 2006 06:04 PM
About the symbolic link. Stevenisme Using Fedora 5 29th August 2005 07:13 PM
make a symbolic link file with parameters jiawj Using Fedora 6 3rd November 2004 07:47 AM


Current GMT-time: 06:39 (Saturday, 25-05-2013)

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