Bug#1066355: spotlighter: FTBFS: spotlighter.c:105:3: error: implicit declaration of function ‘on_window_screen_changed’ [-Werror=implicit-function-declaration]

2024-04-14 Thread Vladimir Petko
Package: spotlighter
Followup-For: Bug #1066355
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Dear Maintainer,

Would it be possible to consider the attached patch as the solution for the
issue?

In Ubuntu, the attached patch was applied to achieve the following:

  * d/p/2_ftbfs_implicit_declaration.patch: declare callback to
resolve -Werror=implicit-function-declaration ftbfs (LP: #2061331).


Thanks for considering the patch.


-- System Information:
Debian Release: trixie/sid
  APT prefers mantic-updates
  APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 
'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-27-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru spotlighter-0.3/debian/patches/02_ftbfs_implicit_declaration.patch 
spotlighter-0.3/debian/patches/02_ftbfs_implicit_declaration.patch
--- spotlighter-0.3/debian/patches/02_ftbfs_implicit_declaration.patch  
1970-01-01 12:00:00.0 +1200
+++ spotlighter-0.3/debian/patches/02_ftbfs_implicit_declaration.patch  
2024-04-15 10:55:20.0 +1200
@@ -0,0 +1,18 @@
+Description: add callback declaration
+ Add callback declaration to resolve -Werror=implicit-function-declaration.
+Author: Vladimir Petko 
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066355
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/spotlighter/+bug/2061331
+Forwarded: no
+Last-Update: 2024-04-15
+
+--- a/src/callbacks.h
 b/src/callbacks.h
+@@ -33,3 +33,7 @@
+  gpointerdata);
+
+
++G_MODULE_EXPORT void
++on_window_screen_changed   (GtkWidget  *widget,
++GdkScreen  *previous_screen,
++gpointeruser_data);
diff -Nru spotlighter-0.3/debian/patches/series 
spotlighter-0.3/debian/patches/series
--- spotlighter-0.3/debian/patches/series   2024-04-01 21:03:10.0 
+1300
+++ spotlighter-0.3/debian/patches/series   2024-04-15 10:55:20.0 
+1200
@@ -1,3 +1,4 @@
 00_desktop.patch
 01_ftbfs_mips.patch
 no_AM_PATH_GTK_3_0.diff
+02_ftbfs_implicit_declaration.patch


Bug#1066355: spotlighter: FTBFS: spotlighter.c:105:3: error: implicit declaration of function ‘on_window_screen_changed’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: spotlighter
Version: 0.3-1.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):
> gcc -DHAVE_CONFIG_H -I. -I..  -DPACKAGE_LOCALE_DIR=\""/usr/share/locale"\" 
> -DPACKAGE_SRC_DIR=\""."\" -DPACKAGE_DATA_DIR=\""/usr/share"\" 
> -I/usr/include/gtk-3.0 -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/gio-unix-2.0 -I/usr/include/cloudproviders 
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 
> -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread  -Wdate-time 
> -D_FORTIFY_SOURCE=2 -I/usr/include/gtk-3.0 -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/gio-unix-2.0 -I/usr/include/cloudproviders 
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 
> -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread  -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -c -o spotlighter-spotlighter.o `test 
> -f 'spotlighter.c' || echo './'`spotlighter.c
> spotlighter.c: In function ‘create_window’:
> spotlighter.c:102:3: warning: ‘gtk_widget_set_double_buffered’ is deprecated 
> [-Wdeprecated-declarations]
>   102 |   gtk_widget_set_double_buffered (window, FALSE);
>   |   ^~
> In file included from /usr/include/gtk-3.0/gtk/gtkapplication.h:27,
>  from /usr/include/gtk-3.0/gtk/gtkwindow.h:33,
>  from /usr/include/gtk-3.0/gtk/gtkdialog.h:32,
>  from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:30,
>  from /usr/include/gtk-3.0/gtk/gtk.h:31,
>  from spotlighter.h:27,
>  from spotlighter.c:23:
> /usr/include/gtk-3.0/gtk/gtkwidget.h:883:23: note: declared here
>   883 | void  gtk_widget_set_double_buffered(GtkWidget
> *widget,
>   |   ^~
> spotlighter.c:105:3: error: implicit declaration of function 
> ‘on_window_screen_changed’ [-Werror=implicit-function-declaration]
>   105 |   on_window_screen_changed (window, NULL, NULL);
>   |   ^~~~
> spotlighter.c:108:3: warning: ‘gtk_window_set_opacity’ is deprecated: Use 
> 'gtk_widget_set_opacity' instead [-Wdeprecated-declarations]
>   108 |   gtk_window_set_opacity (GTK_WINDOW (window), 0);
>   |   ^~
> /usr/include/gtk-3.0/gtk/gtkwindow.h:200:12: note: declared here
>   200 | void   gtk_window_set_opacity  (GtkWindow   
> *window,
>   |^~
> spotlighter.c:110:3: warning: ‘gdk_screen_width’ is deprecated 
> [-Wdeprecated-declarations]
>   110 |   int width = gdk_screen_width ();
>   |   ^~~
> In file included from /usr/include/gtk-3.0/gdk/gdk.h:50,
>  from /usr/include/gtk-3.0/gtk/gtk.h:30:
> /usr/include/gtk-3.0/gdk/gdkmain.h:108:6: note: declared here
>   108 | gint gdk_screen_width  (void) G_GNUC_CONST;
>   |  ^~~~
> spotlighter.c:111:3: warning: ‘gdk_screen_height’ is deprecated 
> [-Wdeprecated-declarations]
>   111 |   int height = gdk_screen_height ();
>   |   ^~~
> /usr/include/gtk-3.0/gdk/gdkmain.h:110:6: note: declared here
>   110 | gint gdk_screen_height (void) G_GNUC_CONST;
>   |  ^
> cc1: some warnings being treated as errors
> make[3]: *** [Makefile:514: spotlighter-spotlighter.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/spotlighter_0.3-1.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&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-