analogdevicesinc / iio-oscilloscope

A GTK+ based oscilloscope application for interfacing with various IIO devices

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation Fails when install IIO-Oscilloscope

John132-LI opened this issue · comments

On Ubuntu20.04,I follow https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope to install ,but when I compile, the error occurs.Here's the log

user@user-virtual-machine:~/Desktop/iio-oscilloscope$ sudo make install
[ 1%] Building C object CMakeFiles/osc.dir/osc.c.o
In file included from /usr/include/gtkdatabox.h:24,
from /home/user/Desktop/iio-oscilloscope/osc.c:8:
/usr/include/gtkdatabox_graph.h:86:7: error: unknown type name ‘GdkGC’
86 | GdkGC* (create_gc) (GtkDataboxGraph * graph, GtkDatabox * box);
| ^~~~~
/usr/include/gtkdatabox_graph.h:91:4: error: unknown type name ‘GdkGC’; did you mean ‘GdkRGBA’?
91 | GdkGC
gtk_databox_graph_get_gc (GtkDataboxGraph * graph);
| ^~~~~
| GdkRGBA
/usr/include/gtkdatabox_graph.h:92:60: error: unknown type name ‘GdkGC’; did you mean ‘GdkRGBA’?
92 | void gtk_databox_graph_set_gc (GtkDataboxGraph * graph, GdkGC gc);
| ^~~~~
| GdkRGBA
/usr/include/gtkdatabox_graph.h:111:4: error: unknown type name ‘GdkGC’; did you mean ‘GdkRGBA’?
111 | GdkGC
gtk_databox_graph_create_gc (GtkDataboxGraph * graph, GtkDatabox * box);
| ^~~~~
| GdkRGBA
In file included from /home/user/Desktop/iio-oscilloscope/osc.c:8:
/usr/include/gtkdatabox.h:196:1: error: unknown type name ‘GdkPixmap’; did you mean ‘GdkPixbuf’?
196 | GdkPixmap* gtk_databox_get_backing_pixmap(GtkDatabox * box);
| ^~~~~~~~~
| GdkPixbuf
make[2]: *** [CMakeFiles/osc.dir/build.make:63: CMakeFiles/osc.dir/osc.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:183: CMakeFiles/osc.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Could anyone teach me how to deal with it? Much appreciation.

Hi,

Looks like the build is trying to use GTK3 dependency together with an older version of gtkdatabox, which is based on GTK2 and doesn't work with GTK3.
The IIO-Oscilloscope has recently been ported to GTK3.
You can:

  • use some release branches (https://github.com/analogdevicesinc/iio-oscilloscope/tree/2021_R2) that are still based on GTK2 but these won't include the changes that are on main branch
  • update gtkdatabox dependency. Version 0.9.x is GTK2 based while version 1.0.x is GTK3 based. You need version 1.0.x.
  • update ubuntu to 22.04 which will allow you to easily get gtkdatabox via apt

Thanks a lot!! :)
I take you first method and finnaly get it. But when I try to use it , i was told to enter my password ,I do as it said but then nothing happen.There is no interface or HUD. It would be appreciated if you could give me some suggetions 👍

Can you try to run iio-osc from the build folder? If something goes wrong, some error messages might be printed on the console helping me understand the issue.

cd /home/user/Desktop/iio-oscilloscope/build
cp ../glade .
./osc

Very grateful!It seems that I must run it through that. Don't know exactly how it works.
Thanks again for you help! Hope everything is fine when I run the test. :)