Post Go back to editing

Errors when building IIO-oscilloscope on Ubuntu

[  7%] Building C object CMakeFiles/osc.dir/fru.c.o
/home/erwin/iio-oscilloscope/iio_utils.c: In function ‘get_iio_device_label_or_name’:
/home/erwin/iio-oscilloscope/iio_utils.c:148:7: error: implicit declaration of function ‘iio_device_get_label’; did you mean ‘iio_device_get_name’? [-Werror=implicit-function-declaration]
  id = iio_device_get_label(dev);
       ^~~~~~~~~~~~~~~~~~~~
       iio_device_get_name
/home/erwin/iio-oscilloscope/iio_utils.c:148:5: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
  id = iio_device_get_label(dev);
     ^
cc1: all warnings being treated as errors
CMakeFiles/osc.dir/build.make:158: recipe for target 'CMakeFiles/osc.dir/iio_utils.c.o' failed
make[2]: *** [CMakeFiles/osc.dir/iio_utils.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/osc.dir/all' failed
make[1]: *** [CMakeFiles/osc.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Did anybody see the same? What could be the reason and a solution?

Thanks

Erwin

  • Hi Erwin,

    If you are building iio-oscilloscope from git master, make sure that you are also using libiio from git master. The iio_device_get_label function it fails to see was added to libiio after the 0.21 release, and will be available in the 0.22 release.

    Cheers,

    -Paul

  • That did not help a lot. I freshly built libiio from source, also built libad9361-iio again after make clean. I have a IIO-oscilloscope icon in my list of installed applications. A click results in nothing.

    Rebuilding libiio killed a working CubicSDR that now opens and closes in a flash.

    URH and GNU-radio still work with the Pluto.

  • Which branches of libiio and IIO-Scope are you using?

    -Travis

  • I am strictly following the wiki documentation :

    https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope

    on Oracle VirtualBox / Ubuntu 1804

    I am just starting a new build on a clean Ubuntu 2004 to see if this gives different results

    BUT with this libiio 

    Install the libiio Library: OS: ubuntu Type : .deb Version : ubuntu-20.04-amd64 : libiio-0.21.g565bf68-ubuntu-20.04-amd64.deb

    As that is where the pluto html page brings me before doing anything else

    If that fails again I will start fresh and do a complete build libiio from the iio-oscilloscope page reference to the instructions for libiio 

  • Where this instruction appears to be a bit wrong:

    and run `make` and `make install`. If you did not do a make install of the libiio, the libiio install location needs to be set in your path ie: (PATH=/usr/lib:$PATH“) or else an error “Package libiio not found..” will occur.

    rgetz@pinky:~/iio-oscilloscope$ mkdir build && cd build
    rgetz@pinky:~/iio-oscilloscope$ cmake ../ && make -j $(nproc)
    rgetz@pinky:~/iio-oscilloscope$ sudo make install

    As for the last 2 steps we are in ../build as the first step brought us there via cd build

  • Done both, both fail, differently.

    The first with the libiio from the base instructions throws the same error.

    When doing the second by building libiio from git the Oscilloscope icon is there, clicking it requests su authorisation and then nothing start and you rest with an still empty screen.

    The green line below is not correct, I made a mistake in using ./osc instead of osc to start IIO_Oscilloscope

    Conclusion: there is no way to build IIO-Oscilloscope currently based on the instructions and available libiio releases or git versions

     

  • The first with the libiio from the base instructions throws the same error.

    As Paul mentioned you must install libiio from source if you want to use the master branch of IIO-Scope. Using the deb from the release is not the git master.

    When doing the second by building libiio from git the Oscilloscope icon is there, clicking it requests su authorisation and then nothing start and you rest with an still empty screen.

    Please launch IIO-Scope directly from the command line. Typing osc from the command line will launch it.

    -Travis

  • I set aside my troubles with IIO-Oscilloscope and started to build GNURADIO 3.8 from source to get to the gr-iio blocks for the Pluto (as on 20.04 gnuradio 3.9 is pre-installed which does not work with the gr-iio blocks)

    That process did not work well so far BUT I can now start IIO Oscilloscope with the icon!

    As if a part of the gnuradio install or its dependencies solved an issue with my setup.

    Still, I can NOT start it with ./osc from within the iio-oscilloscope directory. (EDIT: no because I should use osc and not ./osc)

    The ABOUT tells me I am using libiio version 0.22-5587c8e

    and the osc is HEAD-g1cc52ea

    Also in the check for updates pop up window :

    This software is newer than the latest release

    Latest version: IIO_Oscilloscope - v0.14-master

  • Starting with osc shows some errors  (even though the IIO-Oscilloscope windows open) :

    erwin@UBU2004:~/iio-oscilloscope$ osc

    (osc:3692): Gtk-WARNING **: 11:01:53.572: Could not load image 'osc128.png': Failed to open file “./glade/osc128.png”: No such file or directory

    (osc:3692): Gtk-WARNING **: 11:01:53.590: Could not load image 'IIOlogo.png': Failed to open file “./glade/IIOlogo.png”: No such file or directory

    (osc:3692): Gtk-WARNING **: 11:01:53.591: Could not load image 'ADIlogo.png': Failed to open file “./glade/ADIlogo.png”: No such file or directory
    ERROR: Unable to claim interface 1:2:5: Device or resource busy (16)
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name
    ERROR: Unable to claim interface 1:2:5: Device or resource busy (16)
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name
    ERROR: Unable to claim interface 1:2:5: Device or resource busy (16)
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name
    ERROR: Unable to create Avahi DNS-SD browser: Invalid host name

    (osc:3692): Gtk-WARNING **: 11:03:42.403: Could not load image 'ADIlogo.png': Failed to open file “./glade/ADIlogo.png”: No such file or directory

    And see what happens when doing osc from my home directory, and IIO-Oscilloscope windows open

    erwin@UBU2004:~$ osc
    Found plugin: CN0540
    Could not find expected iio devices
    Found plugin: ad9739a
    Found plugin: CN0511
    Found plugin: Debug
    Found plugin: FMComms6
    Found plugin: DAC Data Manager
    Found plugin: AD936X
    Found plugin: AD9371
    Found plugin: AD9371 Advanced
    Found plugin: AD6676
    Found plugin: AD7303
    Found plugin: CN0357
    Found plugin: AD936X Advanced
    Found plugin: AD5628-1
    Found plugin: DMM
    Found plugin: ADRV9009
    Found plugin: FMCOMMS11
    Found plugin: CN0508
    Found plugin: DAQ1/2/3
    Found plugin: FMComms1
    Found plugin: Spectrum Analyzer
    Found plugin: FMComms5
    Found plugin: Partial Reconfiguration
    Found plugin: LIDAR
    Found plugin: FMCADC3
    Found plugin: SCPI
    Found plugin: Motor Control
    Loaded plugin: Debug
    Updating widgets...
    Updating FIR filter...
    Loaded plugin: AD936X
    Loaded plugin: AD936X Advanced
    Loaded plugin: DMM
    Loaded plugin: Spectrum Analyzer
    set to peak
    error parsing /home/erwin/.osc_profile.ini file: Could not find AD936X
    error parsing /home/erwin/.osc_profile.ini file: Could not find AD936X
    error parsing /home/erwin/.osc_profile.ini file: Could not find AD936X Advanced
    Closing plugin: Debug
    Closing plugin: AD936X
    Closing plugin: AD936X Advanced
    Closing plugin: DMM
    Closing plugin: Spectrum Analyzer
    erwin@UBU2004:~$

  • Hi,

    To run the iio-oscilloscope that you just built, in the ~/iio-oscilloscope folder, run "./osc" and not "osc", otherwise you are actually running the version that's installed system-wide along with the new plugins and that won't work.

    -Paul