pothosware / SoapyPlutoSDR

Soapy SDR plugin for PlutoSDR
https://github.com/pothosware/SoapyPlutoSDR/wiki
GNU Lesser General Public License v2.1
53 stars 22 forks source link

Needs updates to work with future libiio 1.0 #60

Open nmaster2042 opened 6 months ago

nmaster2042 commented 6 months ago

I built last libiio (v1.0) and libad9361 (v0.2).

Now I got errors liking SoapyPlutoSDR

[100%] Linking CXX shared module libPlutoSDRSupport.so
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Registration.cpp.o: in function `find_PlutoSDR(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Registration.cpp:(.text+0x11ab): undefined reference to `iio_create_scan_context'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x11d5): undefined reference to `iio_scan_context_get_info_list'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x132c): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x1336): undefined reference to `iio_scan_context_destroy'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x143c): undefined reference to `iio_create_network_context'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x2045): undefined reference to `iio_context_info_get_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x204d): undefined reference to `iio_create_context_from_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x206a): undefined reference to `iio_context_info_get_uri'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x22d5): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x22df): undefined reference to `iio_scan_context_destroy'
/usr/bin/ld: PlutoSDR_Registration.cpp:(.text+0x2fe7): undefined reference to `iio_context_info_list_free'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setAntenna(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
PlutoSDR_Settings.cpp:(.text+0x1ae): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1f3): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setGainMode(int, unsigned long, bool)':
PlutoSDR_Settings.cpp:(.text+0x272): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x297): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setGain(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x307): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x358): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getGain(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
PlutoSDR_Settings.cpp:(.text+0x3dd): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x43a): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setFrequency(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, double, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Settings.cpp:(.text+0x4c3): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x513): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getFrequency(int, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
PlutoSDR_Settings.cpp:(.text+0x59d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x5fd): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getSampleRate(int, unsigned long) const':
PlutoSDR_Settings.cpp:(.text+0x68d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x6ea): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setBandwidth(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x763): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x7b0): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getBandwidth(int, unsigned long) const':
PlutoSDR_Settings.cpp:(.text+0x82d): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x88a): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::setSampleRate(int, unsigned long, double)':
PlutoSDR_Settings.cpp:(.text+0x953): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x987): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xa30): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xa5d): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::~SoapyPlutoSDR()':
PlutoSDR_Settings.cpp:(.text+0xcea): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd10): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd43): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0xd6c): undefined reference to `iio_channel_attr_write_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::get_sensor_value(iio_channel*) const':
PlutoSDR_Settings.cpp:(.text+0x137b): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x13c3): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1401): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1448): undefined reference to `iio_channel_attr_read'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::SoapyPlutoSDR(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Settings.cpp:(.text+0x1b25): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1ba0): undefined reference to `iio_channel_attr_write'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1df1): undefined reference to `iio_create_context_from_uri'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1ef7): undefined reference to `iio_create_network_context'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x1f01): undefined reference to `iio_create_default_context'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Settings.cpp.o: in function `SoapyPlutoSDR::getHardwareInfo[abi:cxx11]() const':
PlutoSDR_Settings.cpp:(.text+0x4111): undefined reference to `iio_library_get_version'
/usr/bin/ld: PlutoSDR_Settings.cpp:(.text+0x4289): undefined reference to `iio_context_get_version'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `SoapyPlutoSDR::closeStream(SoapySDR::Stream*)':
PlutoSDR_Streaming.cpp:(.text+0x274): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x30b): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::recv(void* const*, unsigned long, int&, long long&, long)':
PlutoSDR_Streaming.cpp:(.text+0x460): undefined reference to `iio_buffer_refill'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x478): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x4a2): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x4d9): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x537): undefined reference to `iio_buffer_first'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x675): undefined reference to `iio_buffer_start'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::start(int, long long, unsigned long)':
PlutoSDR_Streaming.cpp:(.text+0xbc1): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xbd0): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xbe2): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::has_direct_copy()':
PlutoSDR_Streaming.cpp:(.text+0xe7e): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xe9d): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xeaf): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::flush()':
PlutoSDR_Streaming.cpp:(.text+0xf84): undefined reference to `iio_buffer_push'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xf9d): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfc9): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfd5): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0xfe6): undefined reference to `iio_buffer_end'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::send_buf()':
PlutoSDR_Streaming.cpp:(.text+0x1024): undefined reference to `iio_buffer_push'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x103d): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1069): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1075): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1086): undefined reference to `iio_buffer_end'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::send(void const* const*, unsigned long, int&, long long, long)':
PlutoSDR_Streaming.cpp:(.text+0x10ee): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x117b): undefined reference to `iio_buffer_first'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x13ae): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x13e2): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x1454): undefined reference to `iio_buffer_start'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::has_direct_copy()':
PlutoSDR_Streaming.cpp:(.text+0x182e): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x184d): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x185f): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `rx_streamer::rx_streamer(iio_device const*, plutosdrStreamFormat, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x1cba): undefined reference to `iio_channel_attr_read_longlong'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `tx_streamer::tx_streamer(iio_device const*, plutosdrStreamFormat, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x20e1): undefined reference to `iio_buffer_step'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x20f0): undefined reference to `iio_buffer_start'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x2102): undefined reference to `iio_buffer_first'
/usr/bin/ld: CMakeFiles/PlutoSDRSupport.dir/PlutoSDR_Streaming.cpp.o: in function `SoapyPlutoSDR::setupStream(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&)':
PlutoSDR_Streaming.cpp:(.text+0x2212): undefined reference to `iio_channel_attr_write_bool'
/usr/bin/ld: PlutoSDR_Streaming.cpp:(.text+0x2332): undefined reference to `iio_channel_attr_write_bool'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/PlutoSDRSupport.dir/build.make:152: libPlutoSDRSupport.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:123: CMakeFiles/PlutoSDRSupport.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

Any issue with these lib versions ?

zuckschwerdt commented 6 months ago

libiio is at 0.25 (there is no 1.0) and the errors look like the lib is not present.

nmaster2042 commented 6 months ago

OK, I understand my mistake:

Here is what we can read on the gihub of libiio:

Since August 22th 2023, the "master" branch of libiio contains what will eventually become libiio v1.0. It features a brand new API, which is incompatible with libiio v0.25 and older. Have a look at the wiki for a description of the API changes.

The old v0.x API can still be found in the libiio-v0 branch. Libiio v0.x is now considered legacy, and as such, only important bug fixes will be accepted into this branch.

Old programs compiled against libiio v0.x will still be able to run with libiio v1.0 and newer, as it provides a compatibility layer.

So there is a new V1 but seems to be very early stage for now.

zuckschwerdt commented 6 months ago

Interesting! Let's keep this open as tracker until there is a stable libiio 1.0 to upgrade to.