hal
hal copied to clipboard
grammar.h is missing in Python 3.10
Describe the bug I just want to note here that with python 3.10 the project cannot be built anymore, because the grammar.h including the parser module has been removed.
See https://docs.python.org/3/whatsnew/3.10.html#removed
Removed the parser module, which was deprecated in 3.9 due to the switch to the new PEG parser, as well as all the C source and header files that were only being used by the old parser, including node.h, parser.h, graminit.h and grammar.h.
To Reproduce
-
mkdir build && cd build
-
cmake .. -DHAL_STUDY=0 -DBUILD_ALL_PLUGINS=1 -DCMAKE_INSTALL_PREFIX=/usr -GNinja
-
ninja
The error message looks something like this:
[433/720] Building CXX object plugins/gui/CMakeFiles/gui.dir/src/python/python_context.cpp.o
FAILED: plugins/gui/CMakeFiles/gui.dir/src/python/python_context.cpp.o
/usr/bin/ccache /usr/bin/c++ -DFMT_LOCALE -DFMT_SHARED -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_NO_KEYWORDS -DQT_SVG_LIB -DQT_WIDGETS_LIB -DSPDLOG_COMPILED_LIB -DSPDLOG_FMT_EXTERNAL -DSPDLOG_SHARED_LIB -Dgui_EXPORTS -I/home/daniel/Desktop/other_repos/hal/include -I/home/daniel/Desktop/other_repos/hal/hal_plugins -I/home/daniel/Desktop/other_repos/hal/plugins -I/home/daniel/Desktop/other_repos/hal/build -isystem /home/daniel/Desktop/other_repos/hal/plugins/gui/include -isystem /usr/include/python3.10 -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -isystem /usr/lib/qt/mkspecs/linux-g++ -isystem /usr/include/qt/QtConcurrent -isystem /usr/include/qt/QtSvg -fopenmp -pthread -O3 -DNDEBUG -fPIC -O3 -DNDEBUG -Wall -Wextra -pedantic -Wshadow -Wno-undef -Werror=return-type -fdiagnostics-color=always -fsized-deallocation -fPIC -std=gnu++17 -MD -MT plugins/gui/CMakeFiles/gui.dir/src/python/python_context.cpp.o -MF plugins/gui/CMakeFiles/gui.dir/src/python/python_context.cpp.o.d -o plugins/gui/CMakeFiles/gui.dir/src/python/python_context.cpp.o -c /home/daniel/Desktop/other_repos/hal/plugins/gui/src/python/python_context.cpp
/home/daniel/Desktop/other_repos/hal/plugins/gui/src/python/python_context.cpp:19:10: schwerwiegender Fehler: grammar.h: Datei oder Verzeichnis nicht gefunden
19 | #include <grammar.h>
| ^~~~~~~~~~~
Kompilierung beendet.
Expected behavior I suppose we would have to switch to the PEG parser.
Desktop (please complete the following information):
- OS: Arch Linux 5.16.1-arch1-1
Additional context Since only Ubuntu 20.04 is officially supported at the moment, this is not very urgent.