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.

  • 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
Reply
  • 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
Children
No Data