Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler problem with gcc >= 4.8 #489

Closed
dl1ksv opened this issue Nov 15, 2015 · 4 comments
Closed

compiler problem with gcc >= 4.8 #489

dl1ksv opened this issue Nov 15, 2015 · 4 comments

Comments

@dl1ksv
Copy link
Contributor

dl1ksv commented Nov 15, 2015

compiling python2 with gcc >= 4.8 results in alot of warnings like:

............... -o Python/ast.o Python/ast.c
In file included from Include/Python.h:126:0,
from Python/ast.c:6:
Include/modsupport.h:27:1: warning: 'PyArg_ParseTuple' is an unrecognized format function type [-Wformat]

You can see a discussion of this topic

https://bugzilla.redhat.com/show_bug.cgi?id=927358

To fix use this patch:

--- Python-2.7.2/configure.orig 2015-06-24 17:47:39.181473779 +0200
+++ Python-2.7.2/configure      2015-06-24 17:48:31.646173137 +0200
@@ -5731,7 +5731,7 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
 $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
 save_CFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -Werror"
+  CFLAGS="$CFLAGS -Werror -Wformat"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext

/* end confdefs.h. */

@inclement
Copy link
Member

Does this patch cause any problems for older gcc versions? We could just apply it every time if so.

Thanks!

@dl1ksv
Copy link
Contributor Author

dl1ksv commented Nov 15, 2015

I tried to use 4.6 with this patch and got no errors.

@inclement
Copy link
Member

Looks like it's probably good then. If you or anyone else would like to contribute a PR, I'll look at merging it, otherwise I'll add it when I get time.

@inclement
Copy link
Member

Closing as fixed by the linked PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants