geoffreybennett / alsa-scarlett-gui

alsa-scarlett-gui is a Gtk4 GUI for the ALSA controls presented by the Linux kernel Focusrite Scarlett2 Mixer Driver
577 stars 34 forks source link

gtk4 4.10 deprecates many functions; `-Werror` causes build failures #50

Closed fenugrec closed 1 year ago

fenugrec commented 1 year ago

For example,

file.c: In function ‘add_state_filter’:
file.c:65:3: error: ‘gtk_file_chooser_add_filter’ is deprecated [-Werror=deprecated-declarations]
   65 |   gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(native), filter);

According to https://docs.gtk.org/gtk4/class.FileChooserNative.html , this is deprecated since 4.10 which is fairly recent anyway.

I suggest modifying the Makefile to remove the -Werror flag - I can patch that when packaging at my end, but perhaps should be addressed here too.

cmake build configurations can help with this : a debug build can enable -Werror where it is useful, and a quieter release build that makes it easier / for packagers. Is there any interest in moving beyond plain makefiles to something else - cmake or other ?

antode commented 1 year ago

If someone can't build binary and looking for workaround, try to:

geoffreybennett commented 1 year ago

Fixed in commit fb9ccfed.

geoffreybennett commented 1 year ago

@fenugrec "Is there any interest in moving beyond plain makefiles to something else - cmake or other ?"

Is cmake the preferred way to build Gtk4 apps? I have no idea what the standard practice is here; developing desktop apps is not my area of expertise. If anyone wants to make this better, contributions are welcome.

saxa commented 1 year ago

Hi, AFAIK meson is the way for most of the gtk/gnome apps. I think its also simple and easy to use and a well stabilized project. https://mesonbuild.com/