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

Parents
  • 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:~$

Reply
  • 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:~$

Children
  • 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

  • I do not understand your comment Paul.

    How can there be a version that's installed system-wide along with the new plugins on a clean Ubuntu?

    When I built it, there would be only one version?

    For me ./osc does not work, nowhere,

    erwin@UBU2004:~$ ./osc
    bash: ./osc: No such file or directory
    erwin@UBU2004:~$ cd iio-oscilloscope
    erwin@UBU2004:~/iio-oscilloscope$ ./osc
    bash: ./osc: No such file or directory

    And with both tries of osc, both start iio-oscilloscope, just with 2 different reactions in the terminal, but both the same version and both the same version of libiio.

  • The generated binary "osc" will be within the folder you use to build the project. Running "./osc" within that folder will run that version. Running "osc" without the "./" will run the global one in your cache. You can force cache/link updates by running "sudo ldconfig"

    The two different outputs you see when running IIO-Scope are related to state that existed from a previous session. IIO-Scope will place a file (~/.osc_profile.ini) in your home directory. This will keep track of old sessions so things will auto-connect when re-launch IIO-Scope. It looks like the first time it was looking for a USB device like Pluto but you never connected to it. Session 2 looks like you did attach to the device.

    It is possible you have a corrupt .osc_profile.ini file if the IIO-Scope installs were broken or incomplete. I would recommend just deleting that file from your home folder.

    -Travis

  • [IIO Oscilloscope]
    window_x_pos=735
    window_y_pos=196
    tooltips_enable=1
    startup_version_check=1
    uri=0456:b673 104000323198000ffbff3300d0d1024a0e

    initial contents of .osc_profile.ini

    Deleted - Restarted machine

    erwin@UBU2004:~$ cd iio-oscilloscope
    erwin@UBU2004:~/iio-oscilloscope$ ./osc
    bash: ./osc: No such file or directory
    erwin@UBU2004:~/iio-oscilloscope$

    Still. A simple osc works and starts the program

    The profile is now a lot  more complete showing 223 lines including debug messages.

    sudo ldconfig makes no difference

    The states shown are not in parallel to each other but after each other as you can not start a second osc when the Adalm Pluto is already occupied/connected to the first

    erwin@UBU2004:~$ cd iio-oscilloscope
    erwin@UBU2004:~/iio-oscilloscope$ ./osc
    bash: ./osc: No such file or directory
    erwin@UBU2004:~/iio-oscilloscope$

    But my main point remains : for me ./osc NEVER works where osc always works. On Ubuntu 1804 and on 2004. Both with same versions of libiio and iio-oscilloscope.

    Another point: 

    Plot Type has no Spectrum Mode choice although the Settings Spectrum Analyzer window works (I do have a Spectrum Mode as Plot Type when Start Sweep was activated on the IIO-Oscilloscope install on my UBU1804 laptop created in the same way as the one on the UBU2004 Oracle Virtual Box machine.). I can not do Start Sweep on 2004. When Start Sweep has been active and Spectrum Mode is highlighted I loose my Start and Stop buttons to acquire other types of plots. I have to Start New plot to get back the Capture/Stop green arrow. It looks as if the Sweep only works with the Rev.C and not with the Rev.B HW?

    When switching these I now have Ubuntu2004 doing a sweep and showing Spectrum Mode with the Rev.C hardware.

  • erwin@UBU2004:~$ cd iio-oscilloscope
    erwin@UBU2004:~/iio-oscilloscope$ ./osc
    bash: ./osc: No such file or directory
    erwin@UBU2004:~/iio-oscilloscope$

    This pathing assumes you built the library in the same place as the source. In the exact same folder. Now if you built it in say a subfolder named build you would have to run:

    cd iio-oscilloscope

    cd build

    ./osc

    The states shown are not in parallel to each other but after each other as you can not start a second osc when the Adalm Pluto is already occupied/connected to the first

    This is expected if you are using the USB contexts to connect to Pluto. Only one can be used at a time. Using the IP address will allow multiple connections to the same device.

    It looks as if the Sweep only works with the Rev.C and not with the Rev.B HW?

    You likely have different versions of IIO-Scope between the two machines. Rev B vs Rev C makes no difference. IIO-Scope does not treat them any differently. There is a known bug with the spectrum analyzer sweeper that might be related to the different versions: https://github.com/analogdevicesinc/iio-oscilloscope/issues/315

    We usually recommend the users stick with the standard capture window and Frequency Domain plot. The sweeper tab only works well when run on the device itself, when you have low latency access to the fastlock profile selection. Not over USB or Ethernet. This would apply to something like a FMComms3+ZC706 or ADRV9361-Z7035.

    -Travis

  • cd iio-oscilloscope

    cd build

    ./osc

    Thank you, that put me on the right spot. Works. Just like osc did from many other places.

    Second item.

    "You likely have different versions of IIO-Scope between the two machines."

    No, this is not the case and also not what I wrote in my observations. I reported my B. does not work with SWEEP on both machines and my C. works with SWEEP on both machines.

    So there is a HW related difference. My version B. is Adalm Pluto, my version C. is Pluto+. Which might explain my observation. It is a different situation compared to Rev.B and Rev.C of a true Adalm Pluto as you explain.

    SWEEP.Messages from Terminal when using Adalm Pluto version B.

    Loaded plugin: Spectrum Analyzer

    Failed to set the rx sampling rate to 61440000in configure_data_capture

    In settings window can be seen : The max in the receive chain settings is 61,439999, same number as DMA buffer.

    Another observation. When I use the icon to start iio-oscilloscope the .osc_profile.ini file is not touched and not generated when not existing in the first place and not found on the system afterwards at all.

  • Another observation. When I use the icon to start iio-oscilloscope the .osc_profile.ini file is not touched and not generated when not existing in the first place and not found on the system afterwards at all.

    If the launcher asks for a password it will be running as sudo, so the profile file will likely be in the /root folder.

    -Travis

  • Yes, and that is not seen by searching from the normal user. It is indeed here /root

    Thanks a lot for all your patience and quick and detailed explanations. That helped me to correct my mistakes and improve my understanding a lot.

  • I still need to find somebody to do the corrections on the iio-oscilloscope instructions page that I offered and this one as well:

    erwin@UBU2004:~$ cd iio-oscilloscope
    erwin@UBU2004:~/iio-oscilloscope$ ./osc
    bash: ./osc: No such file or directory
    erwin@UBU2004:~/iio-oscilloscope$

    This pathing assumes you built the library in the same place as the source. In the exact same folder. Now if you built it in say a subfolder named build you would have to run:

    cd iio-oscilloscope

    cd build

    ./osc

    rgetz@pinky:~/iio-oscilloscope$ ./osc 
    as it should be actioned from withing the build dir as well

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

    If you are cd build you are in directory build and the next 2 lines should be done from there