public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [BUG] Wrong Python2.7 configuration
@ 2013-07-30 15:43 Pavel Fedin
  2013-07-30 15:47 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Fedin @ 2013-07-30 15:43 UTC (permalink / raw)
  To: cygwin

 Hello!

 During building Insight for Cygwin i hit this error:
--- cut ---
gcc -g -O2    -I. -I. -I./common -I./config
-DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
-I./../include/opcode -I./../opcodes/.. -I./../readline/..  -I../bfd
-I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
-I./gnulib/import -Ibuild-gnulib/import   -DTUI=1  -DGDBTK
-I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
-Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body
-Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition
-Wformat-nonliteral -Werror -c -o mi-main.o -MT mi-main.o -MMD -MP  -MF
.deps/mi-main.Tpo ./mi/mi-main.c
In file included from /usr/include/python2.7/Python.h:126:0,
                 from ./python/python-internal.h:95,
                 from ./mi/mi-main.c:56:
/usr/include/python2.7/modsupport.h:27:1: error: '_PyArg_ParseTuple_SizeT'
is an unrecognized format function type [-Werror=format=]
 PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
 ^
cc1: all warnings being treated as errors
--- cut ---

 The problem obviously happens because of incorrect
HAVE_ATTRIBUTE_FORMAT_PARSETUPLE setting in python27/pyconfig.h. Likely
python's configure test is broken. The relevant discussion is here:
https://bugzilla.redhat.com/show_bug.cgi?id=927358

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Wrong Python2.7 configuration
  2013-07-30 15:43 [BUG] Wrong Python2.7 configuration Pavel Fedin
@ 2013-07-30 15:47 ` Corinna Vinschen
  2013-07-30 17:52   ` Alexey Pavlov
  2013-07-31  6:37   ` Pavel Fedin
  0 siblings, 2 replies; 4+ messages in thread
From: Corinna Vinschen @ 2013-07-30 15:47 UTC (permalink / raw)
  To: cygwin

On Jul 30 18:00, Pavel Fedin wrote:
>  Hello!
> 
>  During building Insight for Cygwin i hit this error:
> --- cut ---
> gcc -g -O2    -I. -I. -I./common -I./config
> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
> -I./../include/opcode -I./../opcodes/.. -I./../readline/..  -I../bfd
> -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
> -I./gnulib/import -Ibuild-gnulib/import   -DTUI=1  -DGDBTK
> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
> -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused
> -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
> -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body
> -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition
> -Wformat-nonliteral -Werror -c -o mi-main.o -MT mi-main.o -MMD -MP  -MF
> .deps/mi-main.Tpo ./mi/mi-main.c
> In file included from /usr/include/python2.7/Python.h:126:0,
>                  from ./python/python-internal.h:95,
>                  from ./mi/mi-main.c:56:
> /usr/include/python2.7/modsupport.h:27:1: error: '_PyArg_ParseTuple_SizeT'
> is an unrecognized format function type [-Werror=format=]
>  PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
> Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
>  ^
> cc1: all warnings being treated as errors
> --- cut ---
> 
>  The problem obviously happens because of incorrect
> HAVE_ATTRIBUTE_FORMAT_PARSETUPLE setting in python27/pyconfig.h. Likely
> python's configure test is broken. The relevant discussion is here:
> https://bugzilla.redhat.com/show_bug.cgi?id=927358

This only occurs in 64 bit Cygwin, afaics.  I reported this problem two
weeks ago on cygwin-apps(*) already.

Jason?  Yaakov?  Ping?

As a local workaround, I disabled the definition of
HAVE_ATTRIBUTE_FORMAT_PARSETUPLE in /usr/include/python2.7/pyconfig.h.


Corinna


(*) http://cygwin.com/ml/cygwin-apps/2013-07/msg00214.html

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [BUG] Wrong Python2.7 configuration
  2013-07-30 15:47 ` Corinna Vinschen
@ 2013-07-30 17:52   ` Alexey Pavlov
  2013-07-31  6:37   ` Pavel Fedin
  1 sibling, 0 replies; 4+ messages in thread
From: Alexey Pavlov @ 2013-07-30 17:52 UTC (permalink / raw)
  To: cygwin

2013/7/30 Corinna Vinschen:
> On Jul 30 18:00, Pavel Fedin wrote:
>>  Hello!
>>
>>  During building Insight for Cygwin i hit this error:
>> --- cut ---
>> gcc -g -O2    -I. -I. -I./common -I./config
>> -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H
>> -I./../include/opcode -I./../opcodes/.. -I./../readline/..  -I../bfd
>> -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber
>> -I./gnulib/import -Ibuild-gnulib/import   -DTUI=1  -DGDBTK
>> -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall
>> -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused
>> -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts
>> -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body
>> -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition
>> -Wformat-nonliteral -Werror -c -o mi-main.o -MT mi-main.o -MMD -MP  -MF
>> .deps/mi-main.Tpo ./mi/mi-main.c
>> In file included from /usr/include/python2.7/Python.h:126:0,
>>                  from ./python/python-internal.h:95,
>>                  from ./mi/mi-main.c:56:
>> /usr/include/python2.7/modsupport.h:27:1: error: '_PyArg_ParseTuple_SizeT'
>> is an unrecognized format function type [-Werror=format=]
>>  PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
>> Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
>>  ^
>> cc1: all warnings being treated as errors
>> --- cut ---
>>
>>  The problem obviously happens because of incorrect
>> HAVE_ATTRIBUTE_FORMAT_PARSETUPLE setting in python27/pyconfig.h. Likely
>> python's configure test is broken. The relevant discussion is here:
>> https://bugzilla.redhat.com/show_bug.cgi?id=927358
>
> This only occurs in 64 bit Cygwin, afaics.  I reported this problem two
> weeks ago on cygwin-apps(*) already.
>
> Jason?  Yaakov?  Ping?
>
> As a local workaround, I disabled the definition of
> HAVE_ATTRIBUTE_FORMAT_PARSETUPLE in /usr/include/python2.7/pyconfig.h.
>
>
This problem is resolved by next patch:

diff -Naur Python-3.2.5-cygwin/configure.ac Python-3.2.5/configure.ac
--- Python-3.2.5-cygwin/configure.ac 2013-07-22 13:54:55.758789100 +0400
+++ Python-3.2.5/configure.ac 2013-07-22 15:41:55.582031300 +0400
@@ -1177,7 +1182,7 @@
 then
   AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
   save_CFLAGS=$CFLAGS
-  CFLAGS="$CFLAGS -Werror"
+  CFLAGS="$CFLAGS -Werror -Wformat"
   AC_COMPILE_IFELSE([
     AC_LANG_PROGRAM([[void
f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]])
   ],[


The same patch for python2.x

Regards,
Alexey.
> Corinna
>
>
> (*) http://cygwin.com/ml/cygwin-apps/2013-07/msg00214.html
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Maintainer                 cygwin AT cygwin DOT com
> Red Hat
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [BUG] Wrong Python2.7 configuration
  2013-07-30 15:47 ` Corinna Vinschen
  2013-07-30 17:52   ` Alexey Pavlov
@ 2013-07-31  6:37   ` Pavel Fedin
  1 sibling, 0 replies; 4+ messages in thread
From: Pavel Fedin @ 2013-07-31  6:37 UTC (permalink / raw)
  To: cygwin

 Hello!

> As a local workaround, I disabled the definition of
> HAVE_ATTRIBUTE_FORMAT_PARSETUPLE in /usr/include/python2.7/pyconfig.h.

 Me too. Just decided to report this in order to be fixed in subsequent releases.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-31  5:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-30 15:43 [BUG] Wrong Python2.7 configuration Pavel Fedin
2013-07-30 15:47 ` Corinna Vinschen
2013-07-30 17:52   ` Alexey Pavlov
2013-07-31  6:37   ` Pavel Fedin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).