AdaCore / gnatcoll-bindings

GNAT Components Collection – Bindings to C libraries
Other
14 stars 15 forks source link

python3/setup.py build fails with undefined Py_TPFLAGS_HAVE_VECTORCALL #16

Open rogermc2 opened 1 year ago

rogermc2 commented 1 year ago

Mac OSX 10.13.6 Xcode 10.1 GNAT Community 2021 (20210519)

My attempt to compile Python3 python_support.c failed with:

MacBook-Air:gnatcoll-bindings-23.0.0 rogermcmurtrie$ python3/setup.py build
Launch: /opt/gnat-ce-2021/bin/gprbuild -j0 -p -gargs -P/Ada_Source/gnatcoll-bindings-23.0.0/python3/gnatcoll_python.gpr --relocate-build-tree --target=x86_64-darwin -XGNATCOLL_PYTHON_STATIC_LIB=/Users/rogermcmurtrie/.pyenv/versions/3.8.6/lib/python3.8/config-3.8-darwin/libpython3.8.a -XGNATCOLL_PYTHON_LIBS=-lintl -ldl   -framework CoreFoundation -XGNATCOLL_LIBPYTHON_KIND=static -XGNATCOLL_PYTHON_CFLAGS=-I/Users/rogermcmurtrie/.pyenv/versions/3.8.6/include/python3.8 -I/Users/rogermcmurtrie/.pyenv/versions/3.8.6/include/python3.8 -XGNATCOLL_VERSION=0.0 -XBUILD=PROD -XGNATCOLL_OS=osx -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -XGPR_BUILD=static
Compile
   [C]            python_support.c
   [Ada]          gnatcoll-python-ctypes.ads
   [Ada]          gnatcoll-scripts-python.adb
   [Ada]          gnatcoll-python-errors.ads
   [Ada]          gnatcoll-python-exceptions.ads
   [Ada]          gnatcoll-python.adb
/Ada_Source/gnatcoll-bindings-23.0.0/python3/python_support.c: In function 'PyDescr_NewAdaMethod':
/Ada_Source/gnatcoll-bindings-23.0.0/python3/python_support.c:251:33: error: 'Py_TPFLAGS_HAVE_VECTORCALL' undeclared (first use in this function); did you mean 'Py_TPFLAGS_HAVE_VERSION_TAG'?
  251 |         Py_TPFLAGS_DEFAULT && !(Py_TPFLAGS_HAVE_VECTORCALL);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 Py_TPFLAGS_HAVE_VERSION_TAG
/Ada_Source/gnatcoll-bindings-23.0.0/python3/python_support.c:251:33: note: each undeclared identifier is reported only once for each function it appears in
   compilation of python_support.c failed