Skip to content
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

make fails with reference errors #13

Open
SebiTimeWaster opened this issue Jun 2, 2019 · 4 comments
Open

make fails with reference errors #13

SebiTimeWaster opened this issue Jun 2, 2019 · 4 comments

Comments

@SebiTimeWaster
Copy link

SebiTimeWaster commented Jun 2, 2019

on make i get these (more than i pasted here):

/usr/bin/ld: usrp_source.cc:(.text+0x3c3): undefined reference to `rtlsdr_get_device_name'
/usr/bin/ld: usrp_source.cc:(.text+0x3fe): undefined reference to `rtlsdr_get_device_name'
/usr/bin/ld: usrp_source.cc:(.text+0x42a): undefined reference to `rtlsdr_open'
/usr/bin/ld: usrp_source.cc:(.text+0x440): undefined reference to `rtlsdr_set_sample_rate'
/usr/bin/ld: usrp_source.cc:(.text+0x44d): undefined reference to `rtlsdr_reset_buffer'
/usr/bin/ld: usrp_source.cc:(.text+0x482): undefined reference to `rtlsdr_reset_buffer'

i have "rtl-sdr" and "librtlsdr-dev" installed, configure runs ok, i have no clue what causes this. I'm on Kubuntu 19.04

@viraptor
Copy link
Owner

viraptor commented Jun 2, 2019

Thanks for the notice.
It looks like the package resolver in autoconf doesn't quite work as expected. The compile command ends up being:

g++  -I/ ... -lfftw3 -L -lrtlsdr -lrt 

Which is both weird for -I and invalid for -L.

It looks like an upstream packaging issue:

root@6eedf8391cfd:/kalibrate-rtl# pkg-config --libs librtlsdr
-L -lrtlsdr
root@6eedf8391cfd:/kalibrate-rtl# pkg-config --cflags librtlsdr
-I/

@viraptor
Copy link
Owner

viraptor commented Jun 2, 2019

Raised upstream in https://bugs.launchpad.net/ubuntu/+source/rtl-sdr/+bug/1831387

I can't really hack this to work in a reasonable way on this side. (unless anyone's got some idea?)

@SebiTimeWaster
Copy link
Author

It's not a problem, i can wait. thanks for finding the issue that fast!

@MatsA
Copy link

MatsA commented Aug 8, 2019

Hi !

On Raspberry Pi !!

Picking the file /usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr.pc from a Stretch install this made it work on Buster.

Edit the file so it looks like this

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib/arm-linux-gnueabihf
includedir=${prefix}/includ

Name: RTL-SDR Library
Description: C Utility Library
Version: 0.6.0
Cflags: -I${includedir}/
Libs: -L${libdir} -lrtlsdr
Libs.private: -lusb-1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants