Bug#1066222: gtk-chtheme: FTBFS: theme_sel.c:113:5: error: implicit declaration of function ‘gtk_timeout_add’; did you mean ‘g_timeout_add’? [-Werror=implicit-function-declaration]

2024-04-09 Thread Steve Langasek
Package: gtk-chtheme
Followup-For: Bug #1066222
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Please find attached a patch for this issue which has been uploaded to
Ubuntu.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru gtk-chtheme-0.3.1/debian/patches/no-implicit-declarations.patch 
gtk-chtheme-0.3.1/debian/patches/no-implicit-declarations.patch
--- gtk-chtheme-0.3.1/debian/patches/no-implicit-declarations.patch 
1969-12-31 16:00:00.0 -0800
+++ gtk-chtheme-0.3.1/debian/patches/no-implicit-declarations.patch 
2024-04-09 22:44:20.0 -0700
@@ -0,0 +1,19 @@
+Description: don't set GTK_DISABLE_DEPRECATED, deprecated APIs in use.
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1066222
+Last-Update: 2024-04-09
+Forwarded: no
+
+Index: gtk-chtheme-0.3.1/Makefile
+===
+--- gtk-chtheme-0.3.1.orig/Makefile
 gtk-chtheme-0.3.1/Makefile
+@@ -5,7 +5,7 @@
+ 
+ LDFLAGS = $(shell $(PKG_CONFIG) --libs gtk+-2.0)
+ CFLAGS += -Wall
+-CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0) -DGTK_DISABLE_BROKEN 
-DGTK_DISABLE_DEPRECATED
++CFLAGS += $(shell $(PKG_CONFIG) --cflags gtk+-2.0) -DGTK_DISABLE_BROKEN
+ CFLAGS += -DPROJNAME='"$(PROJNAME)"' -DVERSION='"$(VERSION)"'
+ CPPFLAGS =
+ CXXFLAGS =
diff -Nru gtk-chtheme-0.3.1/debian/patches/series 
gtk-chtheme-0.3.1/debian/patches/series
--- gtk-chtheme-0.3.1/debian/patches/series 2020-03-28 16:34:21.0 
-0700
+++ gtk-chtheme-0.3.1/debian/patches/series 2024-04-09 22:43:09.0 
-0700
@@ -2,3 +2,4 @@
 deprecated-on-gtk3+.patch
 cross.patch
 fix_ftbfs.patch
+no-implicit-declarations.patch


Bug#1066222: gtk-chtheme: FTBFS: theme_sel.c:113:5: error: implicit declaration of function ‘gtk_timeout_add’; did you mean ‘g_timeout_add’? [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: gtk-chtheme
Version: 0.3.1-6.1
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

This is most likely caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration. For more information, see
https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

Relevant part (hopefully):
> cc  -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -Wall -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include 
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz 
> -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount 
> -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo 
> -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 
> -I/usr/include/x86_64-linux-gnu -I/usr/include/webp -I/usr/include/atk-1.0 
> -pthread  -DGTK_DISABLE_BROKEN -DGTK_DISABLE_DEPRECATED -DPROJNAME='"Gtk+ 2.0 
> Change Theme"' -DVERSION='"0.3.1"'   -c -o main.o main.c
> In file included from font_sel.c:19:
> main.h:29:13: warning: ‘backup_gtkrc’ declared ‘static’ but never defined 
> [-Wunused-function]
>29 | static void backup_gtkrc(gchar *path_to_gtkrc);
>   | ^~~~
> In file included from mainwin.c:19:
> main.h:29:13: warning: ‘backup_gtkrc’ declared ‘static’ but never defined 
> [-Wunused-function]
>29 | static void backup_gtkrc(gchar *path_to_gtkrc);
>   | ^~~~
> theme_sel.c: In function ‘create_theme_sel’:
> theme_sel.c:113:5: error: implicit declaration of function ‘gtk_timeout_add’; 
> did you mean ‘g_timeout_add’? [-Werror=implicit-function-declaration]
>   113 | gtk_timeout_add(0, (GSourceFunc)theme_list_focus, theme_list);
>   | ^~~
>   | g_timeout_add
> In file included from theme_sel.c:20:
> main.h: At top level:
> main.h:29:13: warning: ‘backup_gtkrc’ declared ‘static’ but never defined 
> [-Wunused-function]
>29 | static void backup_gtkrc(gchar *path_to_gtkrc);
>   | ^~~~
> cc1: some warnings being treated as errors
> make[1]: *** [: theme_sel.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/gtk-chtheme_0.3.1-6.1_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.