• Bug#1066463: gnome-paint: FTBFS: cv_resize.c:368:9: error: implicit dec

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:20:08 2024
    Source: gnome-paint
    Version: 0.4.0-9
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@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-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 -Wdate-time -D_FORTIFY_SOURCE=2 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_
    INCLUDES -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -c -o gnome_paint-pixbuf-file-chooser.o `test -f 'pixbuf-file-
    chooser.c' || echo './'`pixbuf-file-chooser.c
    cv_resize.c: In function ‘cv_resize_stop’:
    cv_resize.c:368:9: error: implicit declaration of function ‘undo_add_resize’ [-Werror=implicit-function-declaration]
    368 | undo_add_resize ( width, height );
    | ^~~~~~~~~~~~~~~
    toolbar.c: In function ‘get_gtk_image’:
    toolbar.c:505:48: warning: passing argument 1 of ‘gdk_pixbuf_new_from_xpm_data’ from incompatible pointer type [-Wincompatible-pointer-types]
    505 | pixbuf = gdk_pixbuf_new_from_xpm_data (xpm);
    | ^~~
    | |
    | gchar ** {aka char **} In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h:34,
    from /usr/include/gtk-2.0/gdk/gdkpixbuf.h:37,
    from /usr/include/gtk-2.0/gdk/gdkcairo.h:28,
    from /usr/include/gtk-2.0/gdk/gdk.h:33,
    from /usr/include/gtk-2.0/gtk/gtk.h:32,
    from toolbar.h:28,
    from toolbar.c:27: /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:294:55: note: expected ‘const char **’ but argument is of type ‘gchar **’ {aka ‘char **’}
    294 | GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data);
    | ~~~~~~~~~~~~~^~~~
    color.c: In function ‘on_color_palette_entry_button_press_event’: color.c:178:17: error: implicit declaration of function ‘notify_brush_of_fg_color_change’ [-Werror=implicit-function-declaration]
    178 | notify_brush_of_fg_color_change();
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pixbuf-file-chooser.c: In function ‘pixbuf_file_chooser_class_init’: pixbuf-file-chooser.c:91:9: warning: ‘g_type_class_add_private’ is deprecated [-Wdeprecated-declarations]
    91 | g_type_class_add_private (object_class, sizeof (PixbufFileChooserPrivate));
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
    from /usr/include/glib-2.0/gobject/gbinding.h:31,
    from /usr/include/glib-2.0/glib-object.h:24,
    from /usr/include/glib-2.0/gio/gioenums.h:30,
    from /usr/include/glib-2.0/gio/giotypes.h:30,
    from /usr/include/glib-2.0/gio/gio.h:28,
    from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
    from /usr/include/gtk-2.0/gdk/gdk.h:32,
    from /usr/include/gtk-2.0/gtk/gtk.h:32,
    from pixbuf-file-chooser.h:29,
    from pixbuf-file-chooser.c:30: /usr/include/glib-2.0/gobject/gtype.h:1495:10: note: declared here
    1495 | void g_type_class_add_private (gpointer g_class,
    | ^~~~~~~~~~~~~~~~~~~~~~~~
    pixbuf-file-chooser.c: In function ‘pixbuf_file_chooser_init’: pixbuf-file-chooser.c:97:20: warning: Deprecated pre-processor symbol: replace with "G_ADD_PRIVATE"
    97 | chooser->priv = PIXBUF_FILE_CHOOSER_GET_PRIVATE (chooser);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    main.c: In function ‘main’:
    main.c:83:9: error: implicit declaration of function ‘gtk_set_locale’; did you mean ‘gdk_set_locale’? [-Werror=implicit-function-declaration]
    83 | gtk_set_locale ();
    | ^~~~~~~~~~~~~~
    | gdk_set_locale
    cc1: some warnings being treated as errors
    main.c: In function ‘on_menu_about_activate’:
    main.c:195:9: error: implicit declaration of function ‘gtk_about_dialog_set_name’; did you mean ‘gtk_about_dialog_set_logo’? [-Werror=implicit-function-declaration]
    195 | gtk_about_dialog_set_name ( dlg, "gnome-paint" );
    | ^~~~~~~~~~~~~~~~~~~~~~~~~
    | gtk_about_dialog_set_logo
    make[4]: *** [Makefile:706: gnome_paint-cv_resize.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/gnome-paint_0.4.0-9_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Langasek@21:1/5 to All on Wed Apr 10 07:40:01 2024
    This is a multi-part MIME message sent by reportbug.


    Package: gnome-paint
    Followup-For: Bug #1066463
    User: ubuntu-devel@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/ slangasek@ubuntu.com vorlon@debian.org

    diff -Nru gnome-paint-0.4.0/debian/patches/no-implicit-declarations.patch gnome-paint-0.4.0/debian/patches/no-implicit-declarations.patch
    --- gnome-paint-0.4.0/debian/patches/no-implicit-declarations.patch 1969-12-31 16:00:00.000000000 -0800
    +++ gnome-paint-0.4.0/debian/patches/no-implicit-declarations.patch 2024-04-09 22:03:59.000000000 -0700
    @@ -0,0 +1,192 @@
    +Description: Add missing includes, don't set GTK_DISABLE_DEPRECATED
    + deprecated APIs are in use.
    +Author: Steve Langasek <steve.langasek@canonical.com>
    +Bug-Debian: https://bugs.debian.org/1066463
    +Last-Update: 2024-04-09
    +Forwarded: no
    +
    +Index: gnome-paint-0.4.0/src/Makefile.am +===================================================================
    +--- gnome-paint-0.4.0.orig/src/Makefile.am
    ++++ gnome-paint-0.4.0/src/Makefile.am
    +@@ -78,7 +78,6 @@
    + gnome_paint_CFLAGS = \
    + -DG_DISABLE_DEPRECATED\
    + -DG_DISABLE_SINGLE_INCLUDES\
    +- -DGTK_DISABLE_DEPRECATED\
    + -DGDK_DISABLE_SINGLE_INCLUDES\
    + -DGTK_DISABLE_SINGLE_INCLUDES
    +
    +Index: gnome-paint-0.4.0/src/color.c +===================================================================
    +--- gnome-paint-0.4.0.orig/src