Cannot compile programs that use gtk.h and -Werror
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtk+2.0 (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
To reproduce:
sudo apt install libgtk2.0-dev && echo "#include <gtk/gtk.h>" > foo.c && gcc -Werror -c foo.c $(pkg-config --cflags gtk+-2.0) || echo FAIL
Should complete silently and produce foo.o, but instead, fails as follows:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk2.0-dev is already the newest version (2.24.32-4ubuntu1).
libgtk2.0-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
In file included from /usr/include/
/usr/include/
236 | void gtk_type_init (GTypeDebugFlags debug_flags);
| ^~~~
In file included from /usr/include/
/usr/include/
679 | {
| ^
In file included from /usr/include/
/usr/include/
73 | GTimeVal last_popdown;
| ^~~~~~~~
In file included from /usr/include/
/usr/include/
551 | struct _GTimeVal
| ^~~~~~~~~
cc1: all warnings being treated as errors
FAIL
This is a regression since ubuntu 19.04.
Noticed while building cef.
Workaround: -DGTK_DISABLE_
ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: libgtk2.0-dev 2.24.32-4ubuntu1
ProcVersionSign
Uname: Linux 5.3.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
Date: Fri Oct 25 09:48:14 2019
InstallationDate: Installed on 2019-10-18 (7 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: gtk+2.0
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in gtk+2.0 (Ubuntu): | |
importance: | Undecided → Low |
status: | New → Triaged |
Filed https:/ /gitlab. gnome.org/ GNOME/gtk/ issues/ 2221 in case it's an upstream bug.
I'll probably regret that.