Open peabee opened 5 months ago
g_vprintf() is a glib function and it's present in my dpup (Debian testing, glib 2.78). lunar has 2.76, so it should have it too.
This was Noble which has glib 2.80
? printing.c needs:
? but conditionally?
https://packages.ubuntu.com/hu/noble/i386/libglib2.0-dev/filelist
gprintf.h contains: GLIB_AVAILABLE_IN_ALL gint g_vprintf (gchar const *format, va_list args) G_GNUC_PRINTF(1, 0);
glib 2.70 (2021?) docs say:
glib/gprintf.h must be explicitly included in order to use this function.
If it's been this way for at least 3 years, it needs to be mandatory and not conditional.
(The Wayback Machine doesn't have older copies of the glib API docs)
Searching for gprintf.h within the gtkdialog code base shows that it is not included anywhere.
It should be added to printing.h I assume?
I'd do this in printing.c, it's the only file that uses g_vprintf().
Made the update - but although a build was actioned it doesn't seem to have resulted in a new release.....
build.yml only builds, it doesn't create a tag on success.
And for a new release generally bump the version number in https://github.com/puppylinux-woof-CE/gtkdialog/blob/967cc40ed745163a48299c0bb09cda99edb9ec42/configure.ac#L2.
Made release 0.8.5d
Sadly.... still failing to build gtkdialog with gcc-14:
gtkdialog.c: In function 'main':
gtkdialog.c:557:9: warning: 'g_thread_init' is deprecated [-Wdeprecated-declarations]
557 | g_thread_init (NULL);
| ^~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/glib.h:115:
/usr/include/glib-2.0/glib/deprecated/gthread.h:271:10: note: declared here
271 | void g_thread_init (gpointer vtable);
| ^~~~~~~~~~~~~
gtkdialog.c:631:17: error: implicit declaration of function 'run_program_by_glade' [-Wimplicit-function-declaration]
631 | run_program_by_glade(option_glade_file, option_input_variable);
| ^~~~~~~~~~~~~~~~~~~~
In file included from macros.h:26,
from gtkdialog.c:52:
printing.h: At top level:
printing.h:55:1: warning: inline function 'pip_message_print_warning' declared but never defined
55 | pip_message_print_warning(
| ^~~~~~~~~~~~~~~~~~~~~~~~~
printing.h:49:1: warning: inline function 'pip_message_print_debug' declared but never defined
49 | pip_message_print_debug(
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
from /usr/include/gtk-2.0/gtk/gtk.h:33,
from gtkdialog.h:30,
from variables.c:23:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: 'GTypeDebugFlags' is deprecated [-Wdeprecated-declarations]
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
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:
/usr/include/glib-2.0/gobject/gtype.h:725:1: note: declared here
725 | {
| ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
from /usr/include/gtk-2.0/gtk/gtk.h:126:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: 'GTimeVal' is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/glib-2.0/gobject/gbinding.h:30:
/usr/include/glib-2.0/glib/gtypes.h:580:8: note: declared here
580 | struct _GTimeVal
| ^~~~~~~~~
variables.c: In function 'variables_set_value':
variables.c:472:25: error: implicit declaration of function 'yywarning'; did you mean 'g_warning'? [-Wimplicit-function-declaration]
472 | yywarning("Set-value not implemented for this widget.");
| ^~~~~~~~~
| g_warning
variables.c: In function 'do_variables_count_widgets':
variables.c:1122:17: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
1122 | return;
| ^~~~~~
variables.c:1116:13: note: declared here
1116 | static gint do_variables_count_widgets(variable *actual, gint n)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:549: gtkdialog.o] Error 1
make[2]: *** Waiting for unfinished jobs....
I think variables.c:1122 should be return n;
not return;
. The function needs to return an integer value.
The other error, "implicit declaration of yywarning" is less clear without more information. Is your build running bison to overwrite the parser.c file? It think the build shouldn't mess with the included parser.[ch] because they were generated a long time ago with an old bison version.
Hi Step - thanks for your interest The petbuild is at: https://github.com/puppylinux-woof-CE/woof-CE/blob/testing/woof-code/rootfs-petbuilds/gtkdialog/petbuild
I'm doing a GTK+2 build so the build instructions are:
cd gtkdialog-0.8.5d
./autogen.sh --prefix=/usr --bindir=/usr/sbin
make install
ln -s gtkdialog /usr/sbin/gtk2dialog
No mention of bison....
Hi peebee, please see if PR 161 can help. I can't reproduce your exact environment because I only have access to gcc-12.
I bet the problem is missing or broken bison or flex and/or a gcc/glibc mismatch (let me guess: mix of Ubuntu and Debian packages). The build passes in a clean ubuntu:noble
container with all dependencies.
EDIT: nope, undefined functions when forcing use of GCC 14 in noble although it defaults to 13
Closing this issue for the moment. Have incorporated recent changes (thanks both) and re-released version 0.8.5d. Looks like Ubuntu Noble Numbat is shipping with gcc-13 and gcc-14, although available, is "experimental". I will probably stick with gcc-12 for NoblePup32 - Dimkr is probably correct that my "devx" for gcc-13 is probably inconsistent and maybe incomplete.
For reference later: Porting to GCC 14 https://gcc.gnu.org/gcc-14/porting_to.html
Slackware-Current has just moved to GCC-14 As a result, the following petbuilds fail: gtkdialog - https://github.com/puppylinux-woof-CE/woof-CE/tree/testing/woof-code/rootfs-petbuilds/gtkdialog
#if HAVE_SYS_INOTIFY_H && GTK_CHECK_VERSION(3,0,0)
return FALSE;
#else
return;
#endif
Should return; return a value as per #161 ?
Depends on HAVE_SYS_INOTIFY_H && GTK_CHECK_VERSION(3,0,0)
- if true, it should return a boolean, otherwise there's no return value
Applied the patch via a temporary cp - @ line 4
Next problem: maybe line 686: gtkdialog.c:361:40: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
Just change it from int to size_t, the types are incorrect
- int tmp, result;
+ size_t tmp;
+ ssize_t result;
from gtkdialog.c:32:
/usr/include/bits/stdio.h:118:36: note: expected 'size_t *' {aka 'long unsigned int *'} but argument is of type 'int *'
Next problems are different for GTK2 and GTK3 builds:
fail3-gtk2-gtkdialog.txt multiple instances of: glade_support.c:65:24: error: passing argument 1 of 'execute_action' from incompatible pointer type [-Wincompatible-pointer-types]
fail3-gtk3-gtkdialog.txt couple of places: ../src/signals.c: In function 'on_any_widget_file_changed_event': /usr/include/glib-2.0/glib/gmacros.h:929:17: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
@peabee
You can just copy/paste the code here instead of having to download: like so
<details>
<summary> some bug </summary> # if using backticks next line must be blank
#3 bacticks go here so code shows up
a big looong bug report
#3 more backticks
</details>
Demo:
OK - going to follow the advice at: https://gcc.gnu.org/gcc-14/porting_to.html
and create a gcc wrapper script /usr/bin/gcc:
#!/bin/sh
exec /usr/bin/gcc-14.1.0 -fpermissive "$@"
This "reverts" GCC-14 to GCC-13 behaviour so fixes the problem for now..... but allows gtkdialog to build with GCC-14
However the stricter error checking in GCC-14 is exposing some coding problems in gtkdialog which probably need to be fixed "properly" for the future.
The code base is ancient . Thunor did what he could and he certainly was a fine programmer, but he's been awol for years. Unfortunately, none of the big distros (apart from pclinuxos - a mandrake fork - and we all know what happened to mandrake) ever picked up on it.
Without a few fine software engineers I'm afraid that gtkdialog is on it's last legs.
Next problems are different
These functions return bool
but only in some build configurations - just make them return;
instead of return TRUE;
when they're void
instead of bool
.
Do you read these build logs before you share them here?
error: 'return' with a value, in function returning void
Tried building gtkdialog with gcc-14 for NoblePup32 and got:
builds OK with gcc-12 (and I think gcc-13)