[issue31748] configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

2017-10-11 Thread STINNER Victor

STINNER Victor  added the comment:

"Different people generate ./configure different ways.  Some insert runstatedir 
in configure, others don't.  E.g. on 14 April 2017 runstatedir was added to 
configure, on 9 June it was removed from configure, on 29 June it was added to 
configure.  It needs to be clarified once forever, whether runstatedir belongs 
to configure or not and then everybody has to stick to this, in order to avoid 
useless changes in the version control."

For practical reasons, we decided to include the generated file configure in 
Git. You are right that not all developers use the same autoconf version, and 
so that the generated file includes or not the runstatedir change. I don't know 
how to fix this issue. If you consider that it's a bug and should be fixed, 
please open a new dedicated issue, since it's unrelated to your fchdir + 
-Werror bug.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31748] configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

2017-10-11 Thread Дилян Палаузов

Дилян Палаузов  added the comment:

The patch puts in "Misc/NEWS.d/next/Core and 
Builtins/2017-10-11-10-42-02.bpo-31748.oaEZcq.rst":

+Support configure with -Wall by avoiding unused variables.

but likely means "-Werror" (or both)

Different people generate ./configure different ways.  Some insert runstatedir 
in configure, others don't.  E.g. on 14 April 2017 runstatedir was added to 
configure, on 9 June it was removed from configure, on 29 June it was added to 
configure.  It needs to be clarified once forever, whether runstatedir belongs 
to configure or not and then everybody has to stick to this, in order to avoid 
useless changes in the version control.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31748] configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

2017-10-11 Thread Christian Heimes

Change by Christian Heimes :


--
keywords: +patch
pull_requests: +3924
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31748] configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

2017-10-10 Thread STINNER Victor

STINNER Victor  added the comment:

Python 2.7 is also affected by the issue.

--
versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31748] configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

2017-10-10 Thread STINNER Victor

STINNER Victor  added the comment:

I can reproduce the issue on Fedora 26:

haypo@selma$ ./configure CFLAGS="-Werror -Wall" 2>&1|tee log
haypo@selma$ grep fchdir log
checking for fchdir... no

The problem is not posixmodule.c. The problem is configure which emits a 
compiler warning.

configure.ac contains:
---
AC_MSG_CHECKING(for fchdir)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[void 
*x=fchdir]])],
  [AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
   AC_MSG_RESULT(yes)],
  [AC_MSG_RESULT(no)
])
---

Extract of config.log, without the long confdefs.h part:
---
configure:11258: checking for fchdir
configure:11271: gcc -c -Werror -Wall -Wextra  conftest.c >&5
conftest.c: In function 'main':
conftest.c:256:7: error: unused variable 'x' [-Werror=unused-variable]
 void *x=fchdir
   ^
cc1: all warnings being treated as errors
configure:11271: $? = 1
configure: failed program was:
| /* confdefs.h */
| (...)
| /* end confdefs.h.  */
| #include 
| int
| main ()
| {
| void *x=fchdir
|   ;
|   return 0;
| }
configure:11278: result: no
---

--
title: Modules/posixmodule.c: skip compiling jka4NaPmmQ37 and posix_fildes_fd 
-> configure fails to detect fchdir() using CFLAGS="-Werror -Wall"

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com