Build 8.0.0 failed for Fedora GNU/Linux
/builddir/build/BUILD/easyeffects-8.0.0-build/easyeffects-8.0.0/src/autostart.cpp:21:10: fatal error: gio/gio.h: No such file or directory
21 | #include <gio/gio.h>
| ^~~~~~~~~~~
compilation terminated.
What should I do to fix it? Dependency pkgconfig(gio-2.0) added.
Use %cmake -DCMAKE_CXX_FLAGS='-isystem /usr/include/glib-2.0' -DCMAKE_CXX_FLAGS='-isystem /usr/lib64/glib-2.0/include' to add glib to search paths or use %cmake_kf6 macro instead.
I am already use %cmake_kf6 macro.
I used the former one on openSUSE OBS and built successfully, but I've seen another user also succeed their build using %cmake_kf6 even without pkgconfig(gio-2.0). Here's mine and their spec file. Maybe they could be of some help.
/builddir/build/BUILD/easyeffects-8.0.0-build/easyeffects-8.0.0/src/autostart.cpp:21:10: fatal error: gio/gio.h: No such file or directory 21 | #include <gio/gio.h>
Strange. As far as I remember libportal already forces gio as dependency.
I think the problem here may be that the %cmake macro would not include /usr/include/glib-2.0 and /usr/lib64/glib-2.0/include to the search paths. So I used explicit CXX_FLAGS as a workaround. There might be a better solution.
On openSUSE, pkgconfig(libportal-qt6) can bring up glib and gio dependencies with search paths correctly, it turns out.
Only dirty hack helps me :)
%global optflags %optflags -I/usr/include/glib-2.0 -I%{_libdir}/glib-2.0/include