AdaCore / AdaCore/gnatcoll-bindings
python3/setup.py build fails with undefined Py_TPFLAGS_HAVE_VECTORCALL
Open
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 15
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in python3/python_support.c around line 251 and reproduce the failure with python3/setup.py build using the reported Python 3.8.6 environment. Trace the Python C API flag usage and confirm that the build completes without the undefined Py_TPFLAGS_HAVE_VECTORCALL error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100