LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-13-2016, 10:17 PM   #1
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Rep: Reputation: Disabled
make error /usr/bin/ld: cannot find -lusb-1.0 and -ltcp_listener


boat@boat-MS-7529 ~/rtl-ais $ make
cc rtl_ais.o convenience.o ./aisdecoder/aisdecoder.o ./aisdecoder/sounddecoder.o ./aisdecoder/lib/receiver.o ./aisdecoder/lib/protodec.o ./aisdecoder/lib/hmalloc.o ./aisdecoder/lib/filter.o ./tcp_listener/tcp_listener.o -o rtl_ais -lpthread -lm -lrtlsdr -lusb-1.0 -L./tcp_listener -ltcp_listener
/usr/bin/ld: cannot find -lusb-1.0
/usr/bin/ld: cannot find -ltcp_listener
collect2: error: ld returned 1 exit status
make: *** [rtl_ais] Error 1
boat@boat-MS-7529 ~/rtl-ais $ ls
aisdecoder convenience.h Makefile rtl_ais.c tcp_listener
convenience.c convenience.o README rtl_ais.o TODO


How can I make the make?
I have the -lusb installed, is this a link error, how to fix?
https://github.com/dgiardini/rtl-ais
 
Old 05-14-2016, 10:43 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You don't say whether it was pkgconfig, or it actually looked for the libs themselves.

Every distro has locate, or slocate. To refresh the database, run 'updatedb' or 'slocate -u' respectively. Then search for the libs make couldn't find. Install them or point them out to make.
 
Old 05-15-2016, 02:43 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
libusb-1.0.0-dev : An answer from yesterday, here
http://askubuntu.com/questions/77227...-ltcp-listener

"-ltcp_listener" = libtcp_listener.a , which you must build before building the main apllication.
$ cd rtl-ais/tcp_listener/ && make


-
 
Old 05-24-2016, 08:56 AM   #4
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
Hi, that dir does not exist.

scott@scott-P5QC:~$ $cd rtl-ais/tcp_listener/
bash: rtl-ais/tcp_listener/: No such file or directory
scott@scott-P5QC:~$ $cd rtl-ais/tcp_listener/ && make
bash: rtl-ais/tcp_listener/: No such file or directory
scott@scott-P5QC:~$ $cd rtl-ais/tcp_listener
bash: rtl-ais/tcp_listener: No such file or directory
scott@scott-P5QC:~$

I will look at your link next.
Oh, that was my thread in that link, any other ideas?
This does make on my ubuntu PC.
I took the compiled file with the folder to the mint PC. It does run but with an error talking of blacklisting.

Last edited by sdowney717; 05-24-2016 at 08:59 AM.
 
Old 05-24-2016, 09:00 AM   #5
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
run the same program on the PC it is compiled on gives no error.
Oddly, it did give same error till I followed these instructions in cmake
----------------------------------------------------------------------------------------------
http://m3php.com/2012/10/10/remote-s...tl_tcp/Michele Romanini on April 14, 2014 at 7:55 pm
For the records – to those who might encounter problems “Kernel driver is active, or device is claimed by second instance of librtlsdr […] Failed to open rtlsdr device #0” needs to recompile using this syntax:
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
(honesly, my very first working “make”
Cheers.
Reply

luke on December 11, 2014 at 6:06 pm
ahhhh that can also be actually due to something else using the card… didn’t notice any mention of blacklisting DVB modules, which tbh in the version of the RPI’s software used probably wasn’t needed…
but anyway…
add “blacklist dvb_usb_rtl28xxu” (or something else if you have a different usb device) to a file in /etc/modprobe.d/ (i used raspi-blacklist.conf as it seemed sensible)
-----------------------------------------------------------------------------------------
It did run the program
However says could not capture the device
-----------------------------------------------------------------------------------------------
Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.
------------------------------------------------------------------------------------------------
How to blacklist dvb_usb_rtl28xxu?
Or maybe do this compile time detaching ability?
=--------------------------------------------------

On the MINT 17.3 PC it runs but has the error

boat@boat-MS-7529 ~/rtl-ais $ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64

Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.
boat@boat-MS-7529 ~/rtl-ais $

-------------------------------------------------------------------
NOW ON UBUNTU PC, it runs

scott@scott-P5QC:~/rtl-ais$ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Log NMEA sentences to console OFF
AIS data will be sent to 127.0.0.1 port 10110
Tuner gain set to automatic.
Tuned to 162000000 Hz.
Sampling at 1600000 S/s.
^CSignal caught, exiting!

User cancel, exiting...
Reattached kernel driver
scott@scott-P5QC:~/rtl-ais$

Last edited by sdowney717; 05-24-2016 at 09:03 AM.
 
Old 05-24-2016, 09:11 AM   #6
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
https://opendesignengine.net/news/53
tells me how to blacklist the driver and can rmmod first as a test.

I suppose I should try this.?
 
Old 05-24-2016, 12:26 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #4.

Please have a closer look at https://github.com/dgiardini/rtl-ais
.. to know that you are supposed to have "rtl-ais/tcp_listener/".

Please redo : $ git clone https://github.com/dgiardini/rtl-ais



-
 
Old 05-28-2016, 05:37 AM   #8
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #4.

Please have a closer look at https://github.com/dgiardini/rtl-ais
.. to know that you are supposed to have "rtl-ais/tcp_listener/".

Please redo : $ git clone https://github.com/dgiardini/rtl-ais



-
Hi, thanks, it was not there before, and now it is. Wonder why.I renamed first rtl-ais folder, redid git.
 
Old 06-03-2016, 07:36 AM   #9
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
Hi, it worked.

Code:
boat@boat-MS-7529 ~ $ cd rtl-ais
boat@boat-MS-7529 ~/rtl-ais $ ls
aisdecoder     convenience.h  Makefile  rtl_ais    rtl_ais.o     TODO
convenience.c  convenience.o  README    rtl_ais.c  tcp_listener
boat@boat-MS-7529 ~/rtl-ais $ make
make: Nothing to be done for `all'.
boat@boat-MS-7529 ~/rtl-ais $ make clean
rm -f rtl_ais.o convenience.o ./aisdecoder/aisdecoder.o ./aisdecoder/sounddecoder.o ./aisdecoder/lib/receiver.o ./aisdecoder/lib/protodec.o ./aisdecoder/lib/hmalloc.o ./aisdecoder/lib/filter.o rtl_ais
boat@boat-MS-7529 ~/rtl-ais $ make
cc -c rtl_ais.c -o rtl_ais.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
rtl_ais.c: In function ‘sighandler’:
rtl_ais.c:167:28: warning: unused parameter ‘signum’ [-Wunused-parameter]
 static void sighandler(int signum)
                            ^
rtl_ais.c: In function ‘rtlsdr_callback’:
rtl_ais.c:407:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (i=0; i<len; i++) {
             ^
rtl_ais.c:401:69: warning: unused parameter ‘ctx’ [-Wunused-parameter]
 static void rtlsdr_callback(unsigned char *buf, uint32_t len, void *ctx)
                                                                     ^
rtl_ais.c: In function ‘demod_thread_fn’:
rtl_ais.c:427:36: warning: unused parameter ‘arg’ [-Wunused-parameter]
 static void *demod_thread_fn(void *arg)
                                    ^
cc -c convenience.c -o convenience.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc -c aisdecoder/aisdecoder.c -o aisdecoder/aisdecoder.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc -c aisdecoder/sounddecoder.c -o aisdecoder/sounddecoder.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc -c aisdecoder/lib/receiver.c -o aisdecoder/lib/receiver.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc -c aisdecoder/lib/protodec.c -o aisdecoder/lib/protodec.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
aisdecoder/lib/protodec.c: In function ‘protodec_generate_nmea’:
aisdecoder/lib/protodec.c:156:90: warning: unused parameter ‘received_t’ [-Wunused-parameter]
 void protodec_generate_nmea(struct demod_state_t *d, int bufferlen, int fillbits, time_t received_t)
                                                                                          ^
cc -c aisdecoder/lib/hmalloc.c -o aisdecoder/lib/hmalloc.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc -c aisdecoder/lib/filter.c -o aisdecoder/lib/filter.o -O2 -g -Wall -W  -I./aisdecoder -I ./aisdecoder/lib -I/usr/include/ -I/usr/include/libusb-1.0  
cc rtl_ais.o convenience.o ./aisdecoder/aisdecoder.o ./aisdecoder/sounddecoder.o ./aisdecoder/lib/receiver.o ./aisdecoder/lib/protodec.o ./aisdecoder/lib/hmalloc.o ./aisdecoder/lib/filter.o -o rtl_ais -lpthread -lm -lrtlsdr -lusb-1.0  
boat@boat-MS-7529 ~/rtl-ais $ ls
aisdecoder     convenience.h  Makefile  rtl_ais    rtl_ais.o     TODO
convenience.c  convenience.o  README    rtl_ais.c  tcp_listener
boat@boat-MS-7529 ~/rtl-ais $ rtl_ais
rtl_ais: command not found
boat@boat-MS-7529 ~/rtl-ais $ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
No supported devices found.
boat@boat-MS-7529 ~/rtl-ais $
 
Old 06-03-2016, 07:40 AM   #10
sdowney717
Member
 
Registered: Sep 2015
Posts: 495

Original Poster
Rep: Reputation: Disabled
I need to blacklist the module vb_usb_rtl28xxu

here it is running

boat@boat-MS-7529 ~/rtl-ais $ sudo rmmod dvb_usb_rtl28xxu
[sudo] password for boat:
boat@boat-MS-7529 ~/rtl-ais $ ./rtl_ais
Edge tuning disabled.
DC filter enabled.
RTL AGC disabled.
Internal AIS decoder enabled.
Buffer size: 163.84 mS
Downsample factor: 64
Low pass: 25000 Hz
Output: 48000 Hz
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Log NMEA sentences to console OFF
AIS data will be sent to 127.0.0.1 port 10110
Tuner gain set to automatic.
Tuned to 162000000 Hz.
Sampling at 1600000 S/s.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/ld: cannot find -lusb error?? Hyperion007 Linux - Newbie 5 07-25-2016 07:28 PM
make error: /usr/bin/ld: cannot find -lXext ryedunn Linux - Software 20 11-16-2011 03:28 AM
[SOLVED] make error: /usr/bin/ld: cannot find -lTogl1.7 sagarpareek Linux - Software 2 11-03-2011 03:19 PM
/usr/bin/ld : cannot find -lusb frenchn00b Linux - General 1 01-20-2008 08:36 PM
/usr/bin/ld: cannot find -lusb help??? Hyperion007 Linux - Hardware 1 08-20-2003 05:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration