Lots of warnings compiling on stock Ubuntu 19.10

30 views
Skip to first unread message

Paul Jolly

unread,
Nov 12, 2019, 8:32:32 AM11/12/19
to Vim Dev Mailing List
Hi Bram,

I'm seeing lots of warnings compiling on stock Ubuntu 19.10:

/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:32,
from /usr/include/glib-2.0/glib.h:30,
from /usr/include/glib-2.0/gobject/gbinding.h:28,
from /usr/include/glib-2.0/glib-object.h:23,
from /usr/include/glib-2.0/gio/gioenums.h:28,
from /usr/include/glib-2.0/gio/giotypes.h:28,
from /usr/include/glib-2.0/gio/gio.h:26,
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/gtkwidget.h:34,
from beval.h:17,
from vim.h:1810,
from gui_gtk_f.c:28:
/usr/include/glib-2.0/glib/gtypes.h:551:8: note: declared here
551 | struct _GTimeVal
| ^~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
from beval.h:17,
from vim.h:1810,
from gui_beval.c:11:

Here is my config.log:

https://gist.github.com/myitcv/fef487a5e00f7b170140d371f12b028f

Please let me know if there are any other details you need.

Thanks,


Paul

Christian Brabandt

unread,
Nov 12, 2019, 8:41:30 AM11/12/19
to Vim Dev Mailing List

On Di, 12 Nov 2019, Paul Jolly wrote:

> I'm seeing lots of warnings compiling on stock Ubuntu 19.10:
>
> /usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is
> deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
> 73 | GTimeVal last_popdown;
> | ^~~~~~~~

This looks like https://github.com/vim/vim/issues/4987

Best,
Christian
--
Es ist besser, man betrügt sich an seinen Freunden, als dass man
seine Freunde betrüge.
-- Goethe, Maximen und Reflektionen, Nr. 650

Paul Jolly

unread,
Nov 12, 2019, 8:44:38 AM11/12/19
to Vim Dev Mailing List
Indeed (apologies, I totally forgot to search there too)

Although I'm unclear on the resolution - isn't a Vim fix required here?


Paul

Bram Moolenaar

unread,
Nov 12, 2019, 8:58:06 AM11/12/19
to vim...@googlegroups.com, Paul Jolly
I had the same issue after upgrading to 19.10.
The only solution I found so far is adding a flag to the compiler:
-Wno-deprecated-declarations

--
hundred-and-one symptoms of being an internet addict:
73. You give your dog used motherboards instead of bones

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Nov 12, 2019, 9:33:00 AM11/12/19
to Vim Dev Mailing List

On Di, 12 Nov 2019, Paul Jolly wrote:

It looks like the gtk2 libraries declared something deprecated, so we
might need to adapt our code indeed. (apparently replacing GTimeVal by
GDateTime works according to the user opening this issue).

Best,
Christian
--
Manche Dinge sind so ernst, daß man nur im Spaß über sie reden kann.
-- Werner Heisenberg

Paul Jolly

unread,
Nov 12, 2019, 9:33:55 AM11/12/19
to Bram Moolenaar, Vim Dev Mailing List

> Although I'm unclear on the resolution - isn't a Vim fix required here?

I had the same issue after upgrading to 19.10.
The only solution I found so far is adding a flag to the compiler:
        -Wno-deprecated-declarations

Thanks Bram - would it make sense to do something on the Vim side (assuming we can?) rather than relying on each Ubuntu 19.10 developer compiling Vim to tweak something?

Bram Moolenaar

unread,
Nov 12, 2019, 11:52:31 AM11/12/19
to vim...@googlegroups.com, Paul Jolly
I have no idea if changing this would break it on older systems.
Updating to a newer GTK version is no small thing, some users/systems
may not be willing/able to do that.

Perhaps the changes could be done with some #ifdef ?
We do that for GTK 3.

--
hundred-and-one symptoms of being an internet addict:
74. Your most erotic dreams are about cybersex
Reply all
Reply to author
Forward
0 new messages