After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631656 - Allow configuring with CFLAGS=-Werror
Allow configuring with CFLAGS=-Werror
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.99.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on: 641640
Blocks:
 
 
Reported: 2010-10-08 01:53 UTC by Stef Walter
Modified: 2012-08-10 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch which fixes the problem. (1.27 KB, patch)
2010-10-08 01:54 UTC, Stef Walter
none Details | Review
Remove AC_C_CONST from configure.ac as well (1.50 KB, patch)
2010-10-08 02:42 UTC, Stef Walter
committed Details | Review

Description Stef Walter 2010-10-08 01:53:59 UTC
To build gtk+ with the -Werror option, one would normally specify it on the ./configure or autogen.sh command line like so:

CFLAGS=-Werror sh autogen.sh --prefix=/xxx

However this currently fails during configure with:

checking if <X11/extensions/XIproto.h> is needed for xReply... unknown
configure: error: xReply type unavailable. X11 is too old

Will attach fix.
Comment 1 Stef Walter 2010-10-08 01:54:31 UTC
Created attachment 171935 [details] [review]
Patch which fixes the problem.
Comment 2 Stef Walter 2010-10-08 02:42:24 UTC
Created attachment 171938 [details] [review]
Remove AC_C_CONST from configure.ac as well

In order to work with -Werror we need to remove AC_C_CONST.

AC_C_CONST was added in the initial revision of the configure.ac. It's no longer necessary according to autoconf developers:

http://www.mail-archive.com/bug-autoconf@gnu.org/msg01867.html

With these changes, gtk+ builds with -Werror which is a real asset to development.
Comment 3 Javier Jardón (IRC: jjardon) 2012-08-10 18:15:09 UTC
Comment on attachment 171938 [details] [review]
Remove AC_C_CONST from configure.ac as well

committed a reworked version in 094fcd6fb7609361a864c6f3473791bf849c6bbc
Comment 4 Javier Jardón (IRC: jjardon) 2012-08-10 18:15:33 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.