[New-bugs-announce] [issue45404] Undefined I_* macros when building 3.10 on Ubuntu?

Diego Alonso report at bugs.python.org
Thu Oct 7 07:57:28 EDT 2021


New submission from Diego Alonso <diego at mathisart.org>:

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_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
      |                                                                   ^
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:622:33: error: ‘I_PEEK’ undeclared (first use in this function)
  622 |     if (PyModule_AddIntMacro(m, I_PEEK)) 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:623:33: error: ‘I_SRDOPT’ undeclared (first use in this function)
  623 |     if (PyModule_AddIntMacro(m, I_SRDOPT)) 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:624:33: error: ‘I_GRDOPT’ undeclared (first use in this function)
  624 |     if (PyModule_AddIntMacro(m, I_GRDOPT)) 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:625:33: error: ‘I_NREAD’ undeclared (first use in this function); did you mean ‘FIONREAD’?
  625 |     if (PyModule_AddIntMacro(m, I_NREAD)) 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:626:33: error: ‘I_FDINSERT’ undeclared (first use in this function)
  626 |     if (PyModule_AddIntMacro(m, I_FDINSERT)) 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:627:33: error: ‘I_STR’ undeclared (first use in this function)
  627 |     if (PyModule_AddIntMacro(m, I_STR)) 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:628:33: error: ‘I_SWROPT’ undeclared (first use in this function)
  628 |     if (PyModule_AddIntMacro(m, I_SWROPT)) 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)
      |                                                                   ^
gcc -pthread -shared -fno-semantic-interposition -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -fprofile-generate build/temp.linux-x86_64-3.10/home/da/git/Python-3.10.0/Modules/_contextvarsmodule.o -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -o build/lib.linux-x86_64-3.10/_contextvars.cpython-310-x86_64-linux-gnu.so
/home/da/git/Python-3.10.0/Modules/fcntlmodule.c:633:33: error: ‘I_SENDFD’ undeclared (first use in this function)
  633 |     if (PyModule_AddIntMacro(m, I_SENDFD)) 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:634:33: error: ‘I_RECVFD’ undeclared (first use in this function)
  634 |     if (PyModule_AddIntMacro(m, I_RECVFD)) 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:635:33: error: ‘I_LIST’ undeclared (first use in this function)
  635 |     if (PyModule_AddIntMacro(m, I_LIST)) 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:636:33: error: ‘I_ATMARK’ undeclared (first use in this function)
  636 |     if (PyModule_AddIntMacro(m, I_ATMARK)) 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:637:33: error: ‘I_CKBAND’ undeclared (first use in this function)
  637 |     if (PyModule_AddIntMacro(m, I_CKBAND)) 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:638:33: error: ‘I_GETBAND’ undeclared (first use in this function)
  638 |     if (PyModule_AddIntMacro(m, I_GETBAND)) 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:639:33: error: ‘I_CANPUT’ undeclared (first use in this function)
  639 |     if (PyModule_AddIntMacro(m, I_CANPUT)) 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:640:33: error: ‘I_SETCLTIME’ undeclared (first use in this function)
  640 |     if (PyModule_AddIntMacro(m, I_SETCLTIME)) 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:644:33: error: ‘I_LINK’ undeclared (first use in this function); did you mean ‘EMLINK’?
  644 |     if (PyModule_AddIntMacro(m, I_LINK)) 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:645:33: error: ‘I_UNLINK’ undeclared (first use in this function)
  645 |     if (PyModule_AddIntMacro(m, I_UNLINK)) 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:646:33: error: ‘I_PLINK’ undeclared (first use in this function)
  646 |     if (PyModule_AddIntMacro(m, I_PLINK)) 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:647:33: error: ‘I_PUNLINK’ undeclared (first use in this function)
  647 |     if (PyModule_AddIntMacro(m, I_PUNLINK)) 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)
      |

----------
components: Build
messages: 403396
nosy: etale-cohomology
priority: normal
severity: normal
status: open
title: Undefined I_* macros when building 3.10 on Ubuntu?
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45404>
_______________________________________


More information about the New-bugs-announce mailing list