Post Go back to editing

GTK Errors while building IIE Oscilloscope on Ubuntu

Category: Software

I am trying to build IIO Oscilloscope from source for weeks. I have followed this instruction step by step, several times: https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope#linux

I have ended with reinstalling my whole Ubuntu desktop due to reinstalling dependencies. As I read on previous solutions, I have checked out origin/master for both libiio and iio-oscilloscope.

I have tried changing GTK+ version in CMakeLists file, but with every version, I am getting color related errors. I have chosen to go with libgtk version 2 due to least number of errors, all of which were:

error: unknown type name ‘GdkRGBA’; did you mean ‘GdkGC’?
   99 |                                           GdkRGBA * color, guint size);
      |                                           ^~~~~~~
      |                                           GdkGC

I went through all files manually (/usr/include/gtkdatabox_grid.h, _points.h, _lines.h and _markers.h) and changed GdkRGBA to GdkGC. Now I am getting different errors about wrong struct type GdkColor * should be GdkGC * color etc etc...
What am I doing wrong and how to fix this? All packages are fresh and updated.

In the end, I have multiple versions of GTK+:

i  libgtk-3-0:amd64           3.24.33-1ubuntu2  amd64        GTK graphical user interface library
ii  libgtk-3-bin               3.24.33-1ubuntu2  amd64        programs for the GTK graphical user interface library
ii  libgtk-3-common            3.24.33-1ubuntu2  all          common files for the GTK graphical user interface library
ii  libgtk-3-dev:amd64         3.24.33-1ubuntu2  amd64        development files for the GTK library
ii  libgtk-4-1:amd64           4.6.6+ds-0ubuntu1 amd64        GTK graphical user interface library
ii  libgtk-4-bin               4.6.6+ds-0ubuntu1 amd64        programs for the GTK graphical user interface library
ii  libgtk-4-common            4.6.6+ds-0ubuntu1 all          common files for the GTK graphical user interface library
ii  libgtk-4-dev:amd64         4.6.6+ds-0ubuntu1 amd64        development files for the GTK library
ii  libgtk2.0-0:amd64          2.24.33-2ubuntu2  amd64        GTK graphical user interface library - old version
ii  libgtk2.0-bin              2.24.33-2ubuntu2  amd64        programs for the GTK graphical user interface library
ii  libgtk2.0-common           2.24.33-2ubuntu2  all          common files for the GTK graphical user interface library
ii  libgtk2.0-dev:amd64        2.24.33-2ubuntu2  amd64        development files for the GTK library

Thank you so much for your time and help