-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is not a PR !! #15
Conversation
Sorry but couldn't create an Issue, so trying this way instead. Two issues on RPi 4 and buster 1/ A bug which soon will be fixed raspberrypi/linux#3060 2/ I'm a C newbie and can't compile the code, but works nice on RPi 3 and Stretch. Please check log below. Any ideas ? i@raspberrypi:~/rtl-ais $ make cc main.o 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 -L -lrtlsdr /usr/bin/ld: rtl_ais.o: in function `rtlsdr_thread_fn': /home/pi/rtl-ais/rtl_ais.c:368: undefined reference to `rtlsdr_read_async' /usr/bin/ld: rtl_ais.o: in function `rtl_ais_start': /home/pi/rtl-ais/rtl_ais.c:570: undefined reference to `rtlsdr_open' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:610: undefined reference to `rtlsdr_set_agc_mode' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:595: undefined reference to `rtlsdr_cancel_async' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:596: undefined reference to `rtlsdr_close' /usr/bin/ld: rtl_ais.o: in function `rtl_ais_cleanup': /home/pi/rtl-ais/rtl_ais.c:657: undefined reference to `rtlsdr_cancel_async' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:668: undefined reference to `rtlsdr_cancel_async' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:673: undefined reference to `rtlsdr_close' /usr/bin/ld: convenience.o: in function `nearest_gain': /home/pi/rtl-ais/convenience.c:116: undefined reference to `rtlsdr_set_tuner_gain_mode' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:121: undefined reference to `rtlsdr_get_tuner_gains' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:126: undefined reference to `rtlsdr_get_tuner_gains' /usr/bin/ld: convenience.o: in function `verbose_set_frequency': /home/pi/rtl-ais/convenience.c:142: undefined reference to `rtlsdr_set_center_freq' /usr/bin/ld: convenience.o: in function `verbose_set_sample_rate': /home/pi/rtl-ais/convenience.c:154: undefined reference to `rtlsdr_set_sample_rate' /usr/bin/ld: convenience.o: in function `verbose_direct_sampling': /home/pi/rtl-ais/convenience.c:166: undefined reference to `rtlsdr_set_direct_sampling' /usr/bin/ld: convenience.o: in function `verbose_offset_tuning': /home/pi/rtl-ais/convenience.c:183: undefined reference to `rtlsdr_set_offset_tuning' /usr/bin/ld: convenience.o: in function `verbose_auto_gain': /home/pi/rtl-ais/convenience.c:195: undefined reference to `rtlsdr_set_tuner_gain_mode' /usr/bin/ld: convenience.o: in function `verbose_gain_set': /home/pi/rtl-ais/convenience.c:207: undefined reference to `rtlsdr_set_tuner_gain_mode' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:212: undefined reference to `rtlsdr_set_tuner_gain' /usr/bin/ld: convenience.o: in function `verbose_ppm_set': /home/pi/rtl-ais/convenience.c:226: undefined reference to `rtlsdr_set_freq_correction' /usr/bin/ld: convenience.o: in function `verbose_ppm_eeprom': /home/pi/rtl-ais/convenience.c:241: undefined reference to `rtlsdr_get_usb_strings' /usr/bin/ld: convenience.o: in function `verbose_reset_buffer': /home/pi/rtl-ais/convenience.c:266: undefined reference to `rtlsdr_reset_buffer' /usr/bin/ld: convenience.o: in function `verbose_device_search': /home/pi/rtl-ais/convenience.c:277: undefined reference to `rtlsdr_get_device_count' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:284: undefined reference to `rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:297: undefined reference to `rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:301: undefined reference to `rtlsdr_get_device_name' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:307: undefined reference to `rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:317: undefined reference to `rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:324: undefined reference to `rtlsdr_get_device_name' collect2: error: ld returned 1 exit status make: *** [Makefile:56: rtl_ais] Error 1
Hi !
Seems that you don't have installed the librtlsdr, or the compiler can't
link to that lib.
Please check if the librtlsd is already installed. Also try running "make
clean" inside the rtl-ais dir before "make" so all the objects files will
be recompiled.
David
…On Sun, Jul 14, 2019 at 12:28 PM MatsA ***@***.***> wrote:
Sorry but couldn't create an "Issue", so trying this way instead.
I really like this software and have written a blogpost about it for some
time ago
https://pysselilivet.blogspot.com/2018/06/ais-reciever-for-raspberry.html
but now there are two issues on RPi 4 and buster
1/ A bug which soon will be fixed raspberrypi/linux#3060
<raspberrypi/linux#3060>
2/ I'm a C newbie and can't compile the code, but it works nice on RPi 3
and Stretch. Please check log below. Any ideas ?
***@***.***:~/rtl-ais $ make
cc main.o 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 -L -lrtlsdr
/usr/bin/ld: rtl_ais.o: in function rtlsdr_thread_fn':
/home/pi/rtl-ais/rtl_ais.c:368: undefined reference to rtlsdr_read_async'
/usr/bin/ld: rtl_ais.o: in function rtl_ais_start':
/home/pi/rtl-ais/rtl_ais.c:570: undefined reference to rtlsdr_open'
/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:610: undefined reference to rtlsdr_set_agc_mode'
/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:595: undefined reference to
rtlsdr_cancel_async'
/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:596: undefined reference to rtlsdr_close'
/usr/bin/ld: rtl_ais.o: in function rtl_ais_cleanup':
/home/pi/rtl-ais/rtl_ais.c:657: undefined reference to rtlsdr_cancel_async'
/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:668: undefined reference to
rtlsdr_cancel_async'
/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:673: undefined reference to rtlsdr_close'
/usr/bin/ld: convenience.o: in function nearest_gain':
/home/pi/rtl-ais/convenience.c:116: undefined reference to rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:121: undefined reference to
rtlsdr_get_tuner_gains'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:126: undefined reference to rtlsdr_get_tuner_gains'
/usr/bin/ld: convenience.o: in function verbose_set_frequency':
/home/pi/rtl-ais/convenience.c:142: undefined reference to rtlsdr_set_center_freq'
/usr/bin/ld: convenience.o: in function verbose_set_sample_rate':
/home/pi/rtl-ais/convenience.c:154: undefined reference to rtlsdr_set_sample_rate'
/usr/bin/ld: convenience.o: in function verbose_direct_sampling':
/home/pi/rtl-ais/convenience.c:166: undefined reference to rtlsdr_set_direct_sampling'
/usr/bin/ld: convenience.o: in function verbose_offset_tuning':
/home/pi/rtl-ais/convenience.c:183: undefined reference to rtlsdr_set_offset_tuning'
/usr/bin/ld: convenience.o: in function verbose_auto_gain':
/home/pi/rtl-ais/convenience.c:195: undefined reference to rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: convenience.o: in function verbose_gain_set':
/home/pi/rtl-ais/convenience.c:207: undefined reference to rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:212: undefined reference to
rtlsdr_set_tuner_gain'
/usr/bin/ld: convenience.o: in function verbose_ppm_set':
/home/pi/rtl-ais/convenience.c:226: undefined reference to
rtlsdr_set_freq_correction'
/usr/bin/ld: convenience.o: in function verbose_ppm_eeprom':
/home/pi/rtl-ais/convenience.c:241: undefined reference to
rtlsdr_get_usb_strings'
/usr/bin/ld: convenience.o: in function verbose_reset_buffer':
/home/pi/rtl-ais/convenience.c:266: undefined reference to
rtlsdr_reset_buffer'
/usr/bin/ld: convenience.o: in function verbose_device_search':
/home/pi/rtl-ais/convenience.c:277: undefined reference to
rtlsdr_get_device_count'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:284: undefined reference to rtlsdr_get_device_usb_strings'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:297: undefined reference to
rtlsdr_get_device_usb_strings'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:301: undefined reference to rtlsdr_get_device_name'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:307: undefined reference to
rtlsdr_get_device_usb_strings'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:317: undefined reference to rtlsdr_get_device_usb_strings'
/usr/bin/ld: /home/pi/rtl-ais/convenience.c:324: undefined reference to
rtlsdr_get_device_name'
collect2: error: ld returned 1 exit status
make: *** [Makefile:56: rtl_ais] Error 1
------------------------------
You can view, comment on, or merge this pull request online at:
#15
Commit Summary
- This is not a PR !!
File Changes
- *M* README
<https://github.com/dgiardini/rtl-ais/pull/15/files#diff-0> (1)
Patch Links:
- https://github.com/dgiardini/rtl-ais/pull/15.patch
- https://github.com/dgiardini/rtl-ais/pull/15.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15?email_source=notifications&email_token=ADBJPTZLNDQUTO3TIXDPG3TP7NA2ZA5CNFSM4IDQU5SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7C3VLA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADBJPT3JGKZDGXSSHA4ZT5LP7NA2ZANCNFSM4IDQU5SA>
.
|
Hi and thanks for Your quick answer and time. |
The librtlsdr is located in a unusual place: /usr/lib/arm-linux-gnueabihf/
That should be handled by the Makefile. The line "LDFLAGS+=$(shell
pkg-config --libs librtlsdr)" should return
that path.
You can test this from a command line running
#pkg-config --libs librtlsdr
; that should show you the path.
If the path is empty or is pointing to other place, there is some issue
with the rtlsdr package.
Anyway you sholud be able to compile editing the Makefile, look at the 3rd
line and change it to:
LDFLAGS+=-lpthread -lm -L /usr/lib/arm-linux-gnueabihf/
…-D
On Mon, Jul 15, 2019 at 4:00 AM MatsA ***@***.***> wrote:
Hi and thanks for Your quick answer and time.
Started all over with a fresh Buster Lite install on a RPi 4 which ended
up with the same fault. Please find enclosed the installation log and hope
that it will give a hint.
Did a sudo find -name "librtlsdr*" at the end.
Thanks Mats
rtl-ais_install_2019-07-15.txt
<https://github.com/dgiardini/rtl-ais/files/3391117/rtl-ais_install_2019-07-15.txt>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15?email_source=notifications&email_token=ADBJPT7BNU5TE7E47NSH3H3P7QOBNA5CNFSM4IDQU5SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ43OBQ#issuecomment-511293190>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADBJPT54H667LOM4AU6ZBXDP7QOBNANCNFSM4IDQU5SA>
.
--
----------------------------------------------------------------------------------------------
This message represents the official view of the voices in my head
|
.... getting closer |
Ok, try this (Makefile, line 3)
LDFLAGS+=-lpthread -lm -lrtlsdr -L /usr/lib/arm-linux-gnueabihf/
You're are telling the compiler to use lib rtlsdr and add
/usr/lib/arm-linux-gnueabihf/ to the lib search path.
Hope this helps
-D
…On Mon, Jul 15, 2019 at 12:58 PM MatsA ***@***.***> wrote:
.... getting closer
$ pkg-config --libs librtlsdr just returned
-L -lrtlsdr
which seems to be wrong, so edited the Makefile and changed to
LDFLAGS+=-lpthread -lm /usr/lib/arm-linux-gnueabihf/, without the "-L" it
worked better.
and the compile vent much further but still some error.
Please check enclosed log file.
rtl-ais_install_2019-07-15_II.txt
<https://github.com/dgiardini/rtl-ais/files/3393141/rtl-ais_install_2019-07-15_II.txt>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#15?email_source=notifications&email_token=ADBJPTYSGWZH2PI2OAYROLDP7SNC7A5CNFSM4IDQU5SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ6EVXQ#issuecomment-511462110>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADBJPT2VQOCYX5BGMSQZQMLP7SNC7ANCNFSM4IDQU5SA>
.
--
----------------------------------------------------------------------------------------------
This message represents the official view of the voices in my head
|
Nice ! Worked ! pi@raspberrypi:~/rtl-ais $ file rtl_ais Is there someone who should be notified about the pkg "thing" ? |
Is there someone who schould be notified about the pkg "thing" ?
I don't know who is it, would be nice to locate the mantainer of the
rtlsdr package and telling about this. I think the problem is the
weird path where the lib was copied; it should be tipically in
/usr/lib
David
|
Hi ! Seems that this is already reported https://bugs.launchpad.net/ubuntu/+source/rtl-sdr/+bug/1831387 |
FTR, I just test it with my setup and it. Also append on minimal Debian buster, armbian(Pine64so), qemu-armhf and qemu-arm64. So pretty much anywhere I could test it. |
Maybe it's time to close this tread |
Sorry but couldn't create an "Issue", so trying this way instead.
I really like this software and have written a blogpost about it for some time ago https://pysselilivet.blogspot.com/2018/06/ais-reciever-for-raspberry.html
but now there are two issues on RPi 4 and buster
1/ A bug which soon will be fixed raspberrypi/linux#3060
2/ I'm a C newbie and can't compile the code, but it works nice on RPi 3 and Stretch. Please check log below. Any ideas ?
i@raspberrypi:~/rtl-ais $ make
cc main.o 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 -L -lrtlsdr
/usr/bin/ld: rtl_ais.o: in function
rtlsdr_thread_fn': /home/pi/rtl-ais/rtl_ais.c:368: undefined reference to
rtlsdr_read_async'/usr/bin/ld: rtl_ais.o: in function
rtl_ais_start': /home/pi/rtl-ais/rtl_ais.c:570: undefined reference to
rtlsdr_open'/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:610: undefined reference to
rtlsdr_set_agc_mode' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:595: undefined reference to
rtlsdr_cancel_async'/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:596: undefined reference to
rtlsdr_close' /usr/bin/ld: rtl_ais.o: in function
rtl_ais_cleanup':/home/pi/rtl-ais/rtl_ais.c:657: undefined reference to
rtlsdr_cancel_async' /usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:668: undefined reference to
rtlsdr_cancel_async'/usr/bin/ld: /home/pi/rtl-ais/rtl_ais.c:673: undefined reference to
rtlsdr_close' /usr/bin/ld: convenience.o: in function
nearest_gain':/home/pi/rtl-ais/convenience.c:116: undefined reference to
rtlsdr_set_tuner_gain_mode' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:121: undefined reference to
rtlsdr_get_tuner_gains'/usr/bin/ld: /home/pi/rtl-ais/convenience.c:126: undefined reference to
rtlsdr_get_tuner_gains' /usr/bin/ld: convenience.o: in function
verbose_set_frequency':/home/pi/rtl-ais/convenience.c:142: undefined reference to
rtlsdr_set_center_freq' /usr/bin/ld: convenience.o: in function
verbose_set_sample_rate':/home/pi/rtl-ais/convenience.c:154: undefined reference to
rtlsdr_set_sample_rate' /usr/bin/ld: convenience.o: in function
verbose_direct_sampling':/home/pi/rtl-ais/convenience.c:166: undefined reference to
rtlsdr_set_direct_sampling' /usr/bin/ld: convenience.o: in function
verbose_offset_tuning':/home/pi/rtl-ais/convenience.c:183: undefined reference to
rtlsdr_set_offset_tuning' /usr/bin/ld: convenience.o: in function
verbose_auto_gain':/home/pi/rtl-ais/convenience.c:195: undefined reference to
rtlsdr_set_tuner_gain_mode' /usr/bin/ld: convenience.o: in function
verbose_gain_set':/home/pi/rtl-ais/convenience.c:207: undefined reference to
rtlsdr_set_tuner_gain_mode' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:212: undefined reference to
rtlsdr_set_tuner_gain'/usr/bin/ld: convenience.o: in function
verbose_ppm_set': /home/pi/rtl-ais/convenience.c:226: undefined reference to
rtlsdr_set_freq_correction'/usr/bin/ld: convenience.o: in function
verbose_ppm_eeprom': /home/pi/rtl-ais/convenience.c:241: undefined reference to
rtlsdr_get_usb_strings'/usr/bin/ld: convenience.o: in function
verbose_reset_buffer': /home/pi/rtl-ais/convenience.c:266: undefined reference to
rtlsdr_reset_buffer'/usr/bin/ld: convenience.o: in function
verbose_device_search': /home/pi/rtl-ais/convenience.c:277: undefined reference to
rtlsdr_get_device_count'/usr/bin/ld: /home/pi/rtl-ais/convenience.c:284: undefined reference to
rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:297: undefined reference to
rtlsdr_get_device_usb_strings'/usr/bin/ld: /home/pi/rtl-ais/convenience.c:301: undefined reference to
rtlsdr_get_device_name' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:307: undefined reference to
rtlsdr_get_device_usb_strings'/usr/bin/ld: /home/pi/rtl-ais/convenience.c:317: undefined reference to
rtlsdr_get_device_usb_strings' /usr/bin/ld: /home/pi/rtl-ais/convenience.c:324: undefined reference to
rtlsdr_get_device_name'collect2: error: ld returned 1 exit status
make: *** [Makefile:56: rtl_ais] Error 1