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

Build Instructions not working...again #24

Closed
kawfey opened this issue May 31, 2020 · 10 comments
Closed

Build Instructions not working...again #24

kawfey opened this issue May 31, 2020 · 10 comments

Comments

@kawfey
Copy link

kawfey commented May 31, 2020

Looked through the issues and couldn't find the reason for my build failure.

[ 14%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/acquisition.cxx.o
/home/pi/repos/rtl-power-fftw/src/acquisition.cxx: In member function ‘void Acquisition::run()’:
/home/pi/repos/rtl-power-fftw/src/acquisition.cxx:241:12: warning: catching polymorphic type ‘class RPFexception’ by value [-Wcatch-value=]
     catch (RPFexception) {}
            ^~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:69,
                 from /home/pi/repos/rtl-power-fftw/src/acquisition.h:25,
                 from /home/pi/repos/rtl-power-fftw/src/acquisition.cxx:26:
/usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const double&}; _Tp = double; _Alloc = std::allocator<double>]’:
/usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector<double>::iterator’ {aka ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’} changed in GCC 7.1
       vector<_Tp, _Alloc>::
       ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/vector:64,
                 from /home/pi/repos/rtl-power-fftw/src/acquisition.h:25,
                 from /home/pi/repos/rtl-power-fftw/src/acquisition.cxx:26:
/usr/include/c++/8/bits/stl_vector.h: In function ‘std::vector<T> read_inputfile(std::istream*) [with T = double]’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/stl_vector.h: In constructor ‘AuxData::AuxData(const Params&)’:
/usr/include/c++/8/bits/stl_vector.h:1085:4: note: parameter passing for argument of type ‘__gnu_cxx::__normal_iterator<double*, std::vector<double> >’ changed in GCC 7.1
    _M_realloc_insert(end(), __x);
    ^~~~~~~~~~~~~~~~~
[ 28%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/datastore.cxx.o
[ 42%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o
[ 57%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/interrupts.cxx.o
[ 71%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/params.cxx.o
[ 85%] Building CXX object CMakeFiles/rtl_power_fftw.dir/src/rtl_power_fftw.cxx.o
[100%] Linking CXX executable rtl_power_fftw
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::~Rtlsdr()':
/home/pi/repos/rtl-power-fftw/src/device.cxx:53: undefined reference to `rtlsdr_close'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::gains() const':
/home/pi/repos/rtl-power-fftw/src/device.cxx:57: undefined reference to `rtlsdr_get_tuner_gains'
/usr/bin/ld: /home/pi/repos/rtl-power-fftw/src/device.cxx:64: undefined reference to `rtlsdr_get_tuner_gains'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::sample_rate() const':
/home/pi/repos/rtl-power-fftw/src/device.cxx:73: undefined reference to `rtlsdr_get_sample_rate'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::frequency() const':
/home/pi/repos/rtl-power-fftw/src/device.cxx:83: undefined reference to `rtlsdr_get_center_freq'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::read(std::vector<unsigned char, std::allocator<unsigned char> >&) const':
/home/pi/repos/rtl-power-fftw/src/device.cxx:94: undefined reference to `rtlsdr_reset_buffer'
/usr/bin/ld: /home/pi/repos/rtl-power-fftw/src/device.cxx:95: undefined reference to `rtlsdr_read_sync'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::set_gain(int)':
/home/pi/repos/rtl-power-fftw/src/device.cxx:101: undefined reference to `rtlsdr_set_tuner_gain_mode'
/usr/bin/ld: /home/pi/repos/rtl-power-fftw/src/device.cxx:102: undefined reference to `rtlsdr_set_tuner_gain'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::set_frequency(unsigned int)':
/home/pi/repos/rtl-power-fftw/src/device.cxx:112: undefined reference to `rtlsdr_set_center_freq'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::set_freq_correction(int)':
/home/pi/repos/rtl-power-fftw/src/device.cxx:125: undefined reference to `rtlsdr_set_freq_correction'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::set_sample_rate(unsigned int)':
/home/pi/repos/rtl-power-fftw/src/device.cxx:133: undefined reference to `rtlsdr_set_sample_rate'
/usr/bin/ld: CMakeFiles/rtl_power_fftw.dir/src/device.cxx.o: in function `Rtlsdr::Rtlsdr(int)':
/home/pi/repos/rtl-power-fftw/src/device.cxx:31: undefined reference to `rtlsdr_get_device_count'
/usr/bin/ld: /home/pi/repos/rtl-power-fftw/src/device.cxx:44: undefined reference to `rtlsdr_open'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/rtl_power_fftw.dir/build.make:159: rtl_power_fftw] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/rtl_power_fftw.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
@KlemenBlokar
Copy link
Member

I would suspect that there is some issue with your librtlsdr headers. Can you provide more details (distro, installed packages,...)?

@kawfey
Copy link
Author

kawfey commented May 31, 2020

I would suspect that there is some issue with your librtlsdr headers. Can you provide more details (distro, installed packages,...)?

this is a fresh RasPi 3B+ running the latest Raspberry Pi OS, and librtlsdr installed from the osmocom library (apt install rtl-sdr) following these instructions.

I've tried it on WSL and a laptop running fresh Ubuntu 20.04 with the same error.

@KlemenBlokar
Copy link
Member

KlemenBlokar commented May 31, 2020

Try to install all the packages from the readme.
sudo apt-get install libfftw3-dev libtclap-dev librtlsdr-dev pkg-config
You are missing at least librtlsdr-dev, I believe.

@kawfey
Copy link
Author

kawfey commented Jun 1, 2020

I'm up to date.

pi@hampi:~ $ sudo apt-get install libfftw3-dev libtclap-dev librtlsdr-dev pkg-config
Reading package lists... Done
Building dependency tree
Reading state information... Done
libfftw3-dev is already the newest version (3.3.8-2).
libtclap-dev is already the newest version (1.2.2-1).
pkg-config is already the newest version (0.29-6).
librtlsdr-dev is already the newest version (0.6-1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

@KlemenBlokar
Copy link
Member

It seems ubuntu (and debian) package of librtlsdr-dev is broken in version 0.6-1, there are numerous others that have trouble building against this version of librtlsdr-dev:
antirez/dump1090#142
merbanan/rtl_433#952
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=925916

Try installing a different version of librtlsdr-dev. I think it should work.

@KlemenBlokar
Copy link
Member

Did you manage to build rtl-power-fftw?

@cwalker1969
Copy link

Hi guys! I've the same problem with the MalcolmRobb version of DUMP1090. I've tried others versions, without success. I'm trying to install DUMP1090 on a Raspberry Pi v1 B+ with Raspbian 4.19.118+ #1311. Finally, some DUMP1090 that works without compilation and build issues? Thanks!

@KlemenBlokar
Copy link
Member

The problem is most likely not in the version of the software you are trying to build, but in the librtlsdr-dev package. Try to install a different version of that.

@KlemenBlokar
Copy link
Member

Closing due to inactivity - issue seems to be with the dependencies, not rtl-power-fftw.

@sspickle
Copy link

sspickle commented Mar 6, 2021

Just in case others are struggling with this issue, I too struggled, but found this workaround to be helpful (i.e., it worked)

https://bugs.launchpad.net/ubuntu/+source/rtl-sdr/+bug/1831387/comments/2

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

4 participants