New submission from Manjusaka <lizheao940...@gmail.com>:

Hello everyone

When I try to compile the code from the master branch on my Manjaro, one of the 
Linux system based on the Arch and based on the glibc-2.31 && gcc-10.1.0 . the 
compiler show me that the fcntl module has been failed to be compiled

Here's the message 

/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: error: 
‘I_PUSH’ undeclared (first use in this function)
  618 |     if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:618:33: note: 
each undeclared identifier is reported only once for each function it appears in
  618 |     if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
      |                                 ^~~~~~
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:619:33: error: 
‘I_POP’ undeclared (first use in this function)
  619 |     if (PyModule_AddIntMacro(m, I_POP)) return -1;
      |                                 ^~~~~
./Include/modsupport.h:146:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  146 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/manjusaka/Documents/project/cpython/Modules/fcntlmodule.c:620:33: error: 
‘I_LOOK’ undeclared (first use in this function); did you mean ‘F_LOCK’?
  620 |     if (PyModule_AddIntMacro(m, I_LOOK)) return -1;
      |                                 ^~~~~~


I have figured out the reason because the stropts.h has been deprecated since 
the glic-2.30, but some of the distribution of Linux keep an empty file on the 
/usr/include, so the configure process will recognize stropts.h is existed and 
open HAVE_STROPTS_H flag.

So should we add an extra content check in the configure process to avoid the 
empty file problem?

----------
components: Build
messages: 372254
nosy: Manjusaka
priority: normal
severity: normal
status: open
title: Add some extra content check  for some who has been deprecated by glibc
type: compile error
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to