I executed the command yb_build.sh release to compile version v2.17.2 of yugabyteDB, but failed due to a fatal error. The error message is as follows:
DEPRECATION: typed-ast is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for typed-ast ... error
× Running setup.py install for typed-ast did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
/Users/simon/Documents/yugabyte-db-2.17.2/build/venv-arm64/lib/python3.11/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
copying typed_ast/conversions.py -> build/lib.macosx-13-arm64-cpython-311/typed_ast
copying typed_ast/__init__.py -> build/lib.macosx-13-arm64-cpython-311/typed_ast
copying typed_ast/ast3.py -> build/lib.macosx-13-arm64-cpython-311/typed_ast
copying typed_ast/ast27.py -> build/lib.macosx-13-arm64-cpython-311/typed_ast
copying ast3/tests/test_basics.py -> build/lib.macosx-13-arm64-cpython-311/typed_ast/tests
building '_ast27' extension
clang -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/opt/homebrew/opt/openjdk@11/include -Iast27/Include -I/Users/simon/Documents/yugabyte-db-2.17.2/build/venv-arm64/include -Iemail@example.com/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c ast27/Custom/typed_ast.c -o build/temp.macosx-13-arm64-cpython-311/ast27/Custom/typed_ast.o
In file included from ast27/Custom/typed_ast.c:3:
ast27/Custom/../Include/compile.h:5:10: fatal error: 'code.h' file not found
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Maybe it was running setup.py install for typed-ast, but it did not run successfully.
So far, I don’t know how to solve it.
May I ask if you can provide a solution or suggestion?
OS: macOS Ventura 13.1
The Python version on my macOS is 3.9.6, but I see that when compiling yugabyteDB, there will be its own Python directory, which is yugabyte-db-2.17.2/build/venv-arm64/lib/python3.11.
Does it need to install wheel package first ?
I installed the relevant package according to the following link, but it was not mentioned above that the wheel package needs to be installed
When I execute the command pip3 install wheel to prepare to install the wheel package, I am prompted that Requirement already satisfied. The details are as follows:
Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: wheel in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages (0.37.0)
By the way, executing pip3 install typed-ast separately does not cause any exceptions and can be installed normally.