Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Python 3.8 build fails #124

Closed
Closed

Description

@HarrySky

After commit bd75088ea9b03df1618f1e0b8423a496412ae663 (I guess, because it changes _PyObject_FastCall related code) build fails with this message:

gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -Iast3/Include -I/usr/local/include/python3.8 -c ast3/Python/ast.c -o build/temp.linux-x86_64-3.8/ast3/Python/ast.o
    ast3/Python/ast.c:22:1: error: conflicting types for '_PyObject_FastCall'
     _PyObject_FastCall(PyObject *func, PyObject *const *args, int nargs)
     ^~~~~~~~~~~~~~~~~~
    In file included from /usr/local/include/python3.8/abstract.h:837,
                     from /usr/local/include/python3.8/Python.h:147,
                     from ast3/Python/ast.c:6:
    /usr/local/include/python3.8/cpython/abstract.h:142:1: note: previous definition of '_PyObject_FastCall' was here
     _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
     ^~~~~~~~~~~~~~~~~~

Environment: Docker Alpine 3.9 Python 3.8 (3.8-rc-alpine3.9)
Related bug report in Red Hat tracker

Activity

  1. gvanrossum commented on Jun 14, 2019

    @gvanrossum
    Member

    That's odd, since that definition in typed_ast's ast.c (at line 22) should not be used with Python 3.8. It is inside #if PY_MINOR_VERSION < 6.

    What's the value of PY_MINOR_VERSION at that point? (Also, what version of Python 3.8 is being used? beta 1, or the head of upstream cpython's 3.8 branch? Though it probably doesn't matter.)

    I cannot repro this in my own environment (Mac).

  2. apalala commented on Jun 15, 2019

    @apalala

    I can confirm that the build fails with 3.8b1 over pip instally mypy.

  3. msullivan commented on Jun 15, 2019

    @msullivan
    Collaborator

    typed-ast 1.3.5 doesn't build on 3.8 but 1.4.0 does. The latest mypy release still depends on <1.4.0, though

  4. gvanrossum commented on Jun 15, 2019

    @gvanrossum
    Member

    So there's nothing for us to do here, right? This will right itself with the next mypy release. Until then, Red Hat can choose to patch mypy's setup.py to allow typed_ast 1.4.0.

  5. msullivan commented on Jun 16, 2019

    @msullivan
    Collaborator
  6. soffes commented on Feb 5, 2020

    @soffes

    I ran into this because the latest brew install pre-commit depends on Python 3.8. Bumping mypy to v0.761 in .pre-commit-config.yaml fixed the problem for me.

  7. rnegron commented on May 8, 2020

    @rnegron

    Thanks soffes, your solution worked for me :)

  8. stephensmithlyft commented on Jun 15, 2020

    @stephensmithlyft

    @soffes Had a pre-commit problem, so I searched conflicting types for '_PyObject_FastCall' on Google, and followed the instructions at the first hit. It was an unexpected delight that the solution to my problems was provided by you! Hope you are well!

  9. cah-david-weirich commented on Aug 4, 2020

    @cah-david-weirich

    Thank you @soffes ! This ended two days of headaches for me!

  10. jcomo commented on Oct 17, 2020

    @jcomo

    Hello @stephensmithlyft and @soffes 👋 - I'm equally delighted to see both of you in this thread, and thanks Sam for the fix :)

  11. soffes commented on Oct 17, 2020

    @soffes

    Haha hi @jcomo 😃

  12. stephensmithlyft commented on Oct 19, 2020

    @stephensmithlyft

    Hi @jcomo and thanks again @soffes -- I had to repeat this fix in a different repository last week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions