[issue45404] Undefined I_* macros when building 3.10 on Ubuntu?

2021-10-07 Thread Diego Alonso

New submission from Diego Alonso :

Trying to build Python 3.10 on Ubuntu 20.04. It builds everything but the fcntl 
module; ie. at the end it says:

Failed to build these modules:
fcntl.

Here are the compilation errors. It's trying to use certain macros that are 
undefined: I_PUSH, I_POP, I_LOOK, I_FLUSH, I_FLUSHBAND, I_SETSIG, I_GETSIG, 
I_FIND, I_PEEK, I_SRDOPT, I_GRDOPT, I_NREAD, I_FDINSERT, I_STR, I_SWROPT, 
I_SENDFD, I_RECVFD, I_LIST, I_ATMARK, I_CKBAND, I_GETBAND, I_CANPUT, 
I_SETCLTIME, I_LINK, I_UNLINK, I_PLINK, I_PUNLINK


Modules/_xxsubinterpretersmodule.o
In file included from ./Include/Python.h:140,
 from /home/da/git/Python-3.10.0/Modules/fcntlmodule.c:6:
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c: In function ‘all_ins’:
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:614:33: error: ‘I_PUSH’ 
undeclared (first use in this function)
  614 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
  | ^~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:614:33: note: each undeclared 
identifier is reported only once for each function it appears in
  614 | if (PyModule_AddIntMacro(m, I_PUSH)) return -1;
  | ^~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:615:33: error: ‘I_POP’ 
undeclared (first use in this function)
  615 | if (PyModule_AddIntMacro(m, I_POP)) return -1;
  | ^
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:616:33: error: ‘I_LOOK’ 
undeclared (first use in this function); did you mean ‘F_LOCK’?
  616 | if (PyModule_AddIntMacro(m, I_LOOK)) return -1;
  | ^~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:617:33: error: ‘I_FLUSH’ 
undeclared (first use in this function); did you mean ‘CFLUSH’?
  617 | if (PyModule_AddIntMacro(m, I_FLUSH)) return -1;
  | ^~~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:618:33: error: ‘I_FLUSHBAND’ 
undeclared (first use in this function)
  618 | if (PyModule_AddIntMacro(m, I_FLUSHBAND)) return -1;
  | ^~~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:619:33: error: ‘I_SETSIG’ 
undeclared (first use in this function); did you mean ‘F_SETSIG’?
  619 | if (PyModule_AddIntMacro(m, I_SETSIG)) return -1;
  | ^~~~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:620:33: error: ‘I_GETSIG’ 
undeclared (first use in this function); did you mean ‘F_GETSIG’?
  620 | if (PyModule_AddIntMacro(m, I_GETSIG)) return -1;
  | ^~~~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
  |   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:621:33: error: ‘I_FIND’ 
undeclared (first use in this function)
  621 | if (PyModule_AddIntMacro(m, I_FIND)) return -1;
  | ^~
./Include/modsupport.h:154:67: note: in definition of macro 
‘PyModule_AddIntMacro’
  154 | #define PyModule_AddIntMa

[issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc

2021-10-07 Thread Diego Alonso


Diego Alonso  added the comment:

Yes, I have the same problem. The empty file is needed to avoid compilation 
errors in certain builds, but in this case it creates an error...

--
nosy: +etale-cohomology

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



[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-10-14 Thread Diego Alonso


Diego Alonso  added the comment:

I had an empty stropts.h lying around somewhere in /usr/* (can't remember 
where) because some programs don't compile if they don't see that file (even an 
empty one suffices). But Python doesn't compile if it sees it... So I deleted 
stropts.h and then ran ./configure again, compiled, and it worked.

The Python build code should be modified to set HAVE_STROPTS_H to 0 on 
platforms (like Linux) that don't support stropts.h

--

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