py-evm icon indicating copy to clipboard operation
py-evm copied to clipboard

Template building failure at "Building wheels for collected packages: typed-ast"

Open ghost opened this issue 5 years ago • 2 comments

It is a problem of carver/ethereum-python-project-template but sent here because that repo does not accept issue report.

  • py-evm Version: 0.2.0a40
  • OS: linux
  • Python Version (python --version): 3.8.2
  • Environment (output of pip freeze):
apipkg==1.5
appdirs==1.4.3
attrs==19.3.0
backcall==0.1.0
blake2b-py==0.1.3
bleach==3.1.4
bumpversion==0.5.3
cached-property==1.5.1
certifi==2019.11.28
cffi==1.14.0
chardet==3.0.4
colorama==0.4.3
cryptography==2.8
cytoolz==0.10.1
decorator==4.4.2
distlib==0.3.0
docopt==0.6.2
docutils==0.16
eth-bloom==1.0.3
eth-hash==0.2.0
eth-keys==0.2.4
eth-typing==2.2.1
eth-utils==1.8.4
execnet==1.7.1
filelock==3.0.12
flake8==3.4.1
idna==2.9
ipython==7.13.0
ipython-genutils==0.2.0
isort==4.3.21
jedi==0.16.0
jeepney==0.4.3
keyring==21.2.0
lru-dict==1.1.6
mccabe==0.6.1
more-itertools==8.2.0
mypy-extensions==0.4.3
packaging==20.3
parso==0.6.2
pathtools==0.1.2
pexpect==4.8.0
pickleshare==0.7.5
pkginfo==1.5.0.1
pluggy==0.13.1
prompt-toolkit==3.0.5
ptyprocess==0.6.0
py==1.8.1
py-ecc==1.7.1
py-evm==0.2.0a40
pycodestyle==2.3.1
pycparser==2.20
pyethash==0.1.27
pyflakes==1.5.0
Pygments==2.6.1
pyparsing==2.4.6
pytest==5.4.1
pytest-forked==1.1.3
pytest-watch==4.2.0
pytest-xdist==1.31.0
readme-renderer==25.0
requests==2.23.0
requests-toolbelt==0.9.1
rlp==1.2.0
SecretStorage==3.1.2
six==1.14.0
toolz==0.10.0
tox==2.9.1
tqdm==4.44.1
traitlets==4.3.3
trie==1.4.0
twine==3.1.1
urllib3==1.25.8
virtualenv==20.0.15
watchdog==0.10.2
wcwidth==0.1.9
webencodings==0.5.1

What is wrong?

Follow the steps in https://github.com/ethereum/py-evm/blob/master/docs/guides/building_an_app_that_uses_pyevm.rst (pytest==3.3.2 in setup.py has been changed to pytest>=4.4.0 to meet the requirement of building pytest-xdist 1.31.0)

When building the demo application with:

pip install -e .[dev]

Failed with error at Building wheels for collected packages: typed-ast:

...
Building wheel for typed-ast (setup.py): started
Building wheel for typed-ast (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
 command: /home/user/example/demo-app/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kkz2ekvv/typed-ast/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kkz2ekvv/typed-ast/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-l430lpv3
     cwd: /tmp/pip-install-kkz2ekvv/typed-ast/
Complete output (78 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/typed_ast
copying typed_ast/conversions.py -> build/lib.linux-x86_64-3.8/typed_ast
copying typed_ast/__init__.py -> build/lib.linux-x86_64-3.8/typed_ast
copying typed_ast/ast3.py -> build/lib.linux-x86_64-3.8/typed_ast
copying typed_ast/ast27.py -> build/lib.linux-x86_64-3.8/typed_ast
package init file 'ast3/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-x86_64-3.8/typed_ast/tests
copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-3.8/typed_ast/tests
running build_ext
building '_ast27' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/ast27
creating build/temp.linux-x86_64-3.8/ast27/Custom
creating build/temp.linux-x86_64-3.8/ast27/Parser
creating build/temp.linux-x86_64-3.8/ast27/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-3.8/ast27/Custom/typed_ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/bitset.c -o build/temp.linux-x86_64-3.8/ast27/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/grammar.c -o build/temp.linux-x86_64-3.8/ast27/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/grammar1.c -o build/temp.linux-x86_64-3.8/ast27/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/node.c -o build/temp.linux-x86_64-3.8/ast27/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/parser.c -o build/temp.linux-x86_64-3.8/ast27/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/parsetok.c -o build/temp.linux-x86_64-3.8/ast27/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Parser/tokenizer.c -o build/temp.linux-x86_64-3.8/ast27/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Python/Python-ast.c -o build/temp.linux-x86_64-3.8/ast27/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Python/asdl.c -o build/temp.linux-x86_64-3.8/ast27/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Python/ast.c -o build/temp.linux-x86_64-3.8/ast27/Python/ast.o
ast27/Python/ast.c: In function ‘ast_for_print_stmt’:
ast27/Python/ast.c:2432:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
 2432 |         if (!dest)
      |         ^~
ast27/Python/ast.c:2434:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
 2434 |             start = 4;
      |             ^~~~~
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Python/graminit.c -o build/temp.linux-x86_64-3.8/ast27/Python/graminit.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast27/Include -I/usr/include/python3.8 -c ast27/Python/mystrtoul.c -o build/temp.linux-x86_64-3.8/ast27/Python/mystrtoul.o
gcc -pthread -shared build/temp.linux-x86_64-3.8/ast27/Custom/typed_ast.o build/temp.linux-x86_64-3.8/ast27/Parser/acceler.o build/temp.linux-x86_64-3.8/ast27/Parser/bitset.o build/temp.linux-x86_64-3.8/ast27/Parser/grammar.o build/temp.linux-x86_64-3.8/ast27/Parser/grammar1.o build/temp.linux-x86_64-3.8/ast27/Parser/node.o build/temp.linux-x86_64-3.8/ast27/Parser/parser.o build/temp.linux-x86_64-3.8/ast27/Parser/parsetok.o build/temp.linux-x86_64-3.8/ast27/Parser/tokenizer.o build/temp.linux-x86_64-3.8/ast27/Python/Python-ast.o build/temp.linux-x86_64-3.8/ast27/Python/asdl.o build/temp.linux-x86_64-3.8/ast27/Python/ast.o build/temp.linux-x86_64-3.8/ast27/Python/graminit.o build/temp.linux-x86_64-3.8/ast27/Python/mystrtoul.o -L/usr/lib64 -o build/lib.linux-x86_64-3.8/typed_ast/_ast27.cpython-38-x86_64-linux-gnu.so
building '_ast3' extension
creating build/temp.linux-x86_64-3.8/ast3
creating build/temp.linux-x86_64-3.8/ast3/Custom
creating build/temp.linux-x86_64-3.8/ast3/Parser
creating build/temp.linux-x86_64-3.8/ast3/Python
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Custom/typed_ast.c -o build/temp.linux-x86_64-3.8/ast3/Custom/typed_ast.o
In file included from ast3/Custom/typed_ast.c:3:
ast3/Include/compile-ast3.h:6: warning: "Py_func_type_input" redefined
    6 | #define Py_func_type_input 343
      |
In file included from /usr/include/python3.8/Python.h:138,
                 from ast3/Custom/typed_ast.c:1:
/usr/include/python3.8/compile.h:98: note: this is the location of the previous definition
   98 | #define Py_func_type_input 345
      |
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/acceler.c -o build/temp.linux-x86_64-3.8/ast3/Parser/acceler.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/bitset.c -o build/temp.linux-x86_64-3.8/ast3/Parser/bitset.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/grammar.c -o build/temp.linux-x86_64-3.8/ast3/Parser/grammar.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/grammar1.c -o build/temp.linux-x86_64-3.8/ast3/Parser/grammar1.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/node.c -o build/temp.linux-x86_64-3.8/ast3/Parser/node.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/parser.c -o build/temp.linux-x86_64-3.8/ast3/Parser/parser.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/parsetok.c -o build/temp.linux-x86_64-3.8/ast3/Parser/parsetok.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Parser/tokenizer.c -o build/temp.linux-x86_64-3.8/ast3/Parser/tokenizer.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Python/Python-ast.c -o build/temp.linux-x86_64-3.8/ast3/Python/Python-ast.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/include/python3.8 -c ast3/Python/asdl.c -o build/temp.linux-x86_64-3.8/ast3/Python/asdl.o
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -DOPENSSL_LOAD_CONF -fwrapv -fno-semantic-interposition -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g -fPIC -Iast3/Include -I/usr/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’
   22 | _PyObject_FastCall(PyObject *func, PyObject *const *args, int nargs)
      | ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/python3.8/abstract.h:837,
                 from /usr/include/python3.8/Python.h:147,
                 from ast3/Python/ast.c:6:
/usr/include/python3.8/cpython/abstract.h:145:1: note: previous definition of ‘_PyObject_FastCall’ was here
  145 | _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
      | ^~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1

How can it be fixed

I have no idea how to fix it so far.

ghost avatar Apr 02 '20 04:04 ghost

Happened to me too, while pre-commit was installing a dependency. It tried to build typed-ast-1.3.5.tar.gz anmd failed with this message:

In file included from ast3/Custom/typed_ast.c:3:
ast3/Include/compile-ast3.h:6: warning: "Py_func_type_input" redefined
    6 | #define Py_func_type_input 343
      |
In file included from /usr/include/python3.9/Python.h:151,
                 from ast3/Custom/typed_ast.c:1:
/usr/include/python3.9/compile.h:111: note: this is the location of the previous definition
  111 | #define Py_func_type_input 345
      |

flying-sheep avatar Oct 18 '21 09:10 flying-sheep

See https://github.com/python/typed_ast/issues/166

flying-sheep avatar Oct 18 '21 09:10 flying-sheep